Camera Path Animation

Forum for OctaneRender Lua scripting examples, discussion and support.
gmillas
Licensed Customer
Posts: 45
Joined: Fri Jun 25, 2010 6:15 am
Location: Greece
Contact:

Here is a script that animates a camera from a camera-target position file. It uses ffmpeg for the video creation.
Attachments
camera_animation_shot.png
Load Animation Path.lua
(21.66 KiB) Downloaded 526 times
Last edited by gmillas on Wed Apr 09, 2014 9:41 am, edited 1 time in total.
Tugpsx
Licensed Customer
Posts: 1150
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL
Contact:

Thanks, can you provide an example of the camera path file, we would need to know the format in order to create the proper file.
Win 11 64GB | NVIDIA RTX3060 12GB
gmillas
Licensed Customer
Posts: 45
Joined: Fri Jun 25, 2010 6:15 am
Location: Greece
Contact:

The format is realy simple
6 numbers comma sepparated for each frame
ct= camera target
cp= camera position
ct_x,ct_y,ct_z,cp_x,cp_y,cp_z
this is 10 frames below
0.711095,0.006908,0.740605,1.506082,0.006908,1.289226
0.711095,0.017258,0.740605,1.506082,0.017258,1.289226
0.711095,0.027608,0.740605,1.506082,0.027608,1.289226
0.711095,0.037958,0.740605,1.506082,0.037958,1.289226
0.711095,0.048308,0.740605,1.506082,0.048308,1.289226
0.711095,0.058658,0.740605,1.506082,0.058658,1.289226
0.711095,0.069008,0.740605,1.506082,0.069008,1.289226
0.711095,0.079358,0.740605,1.506082,0.079358,1.289226
0.711095,0.089708,0.740605,1.506082,0.089708,1.289226
0.711095,0.100058,0.740605,1.506082,0.100058,1.289226
Tugpsx
Licensed Customer
Posts: 1150
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL
Contact:

Getting error

Code: Select all

Expecting a 3-component vector
so it appears there may be an issue with the formatting

Also note that ffmpeg.exe is required but not included http://www.ffmpeg.org/download.html
Windows build http://ffmpeg.zeranoe.com/builds/
Win 11 64GB | NVIDIA RTX3060 12GB
gmillas
Licensed Customer
Posts: 45
Joined: Fri Jun 25, 2010 6:15 am
Location: Greece
Contact:

Are you putting the given data in a file and gives you this error ?

for ffmpeg the only till now solution is to be in c:\Program Files\OTOY\OctaneRender\ffmpeg.exe

i will figure later on hoe i can setup the script to find it on its own ...

( do you have the 1.50 standalone version of octane ?)
Attachments
Load Animation Path.lua
with frame progress
(22.16 KiB) Downloaded 462 times
gmillas
Licensed Customer
Posts: 45
Joined: Fri Jun 25, 2010 6:15 am
Location: Greece
Contact:

And time estimation
Attachments
Load Animation Path.lua
(22.75 KiB) Downloaded 449 times
Tugpsx
Licensed Customer
Posts: 1150
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL
Contact:

Using 1.52 standalone will try this new script.
Yes I copied the coordinates portion into a text file without headers.
ffmpeg
ffmpeg
Win 11 64GB | NVIDIA RTX3060 12GB
gmillas
Licensed Customer
Posts: 45
Joined: Fri Jun 25, 2010 6:15 am
Location: Greece
Contact:

Ok fixed ...
Thanks

in this version you must put ffmpeg.exe in the lua script directory


..
Attachments
Screenshot 2014-04-10 09.58.58.png
Load Animation Path.lua
(23.81 KiB) Downloaded 807 times
User avatar
MB
Licensed Customer
Posts: 168
Joined: Tue Jan 15, 2013 3:41 am
Location: Washington, D.C.
Contact:

I think there is a problem with the command line that this script builds and send to ffmpeg, it will not handle file names or directory paths with spaces in them.

Does anyone know what the correct syntax would be to fix this.

many thanks

Mark
Windows 11, 2x Intel I9, 64GB Ram, 2x GTX 1080 TI, 1 x RTX 380 TI, Oculus Quest 2
kavorka
Licensed Customer
Posts: 1351
Joined: Sat Feb 04, 2012 6:40 am

How do you create the camera path position file?
Intel quad core i5 @ 4.0 ghz | 8 gigs of Ram | Geforce GTX 470 - 1.25 gigs of Ram
Post Reply

Return to “Lua Scripting”