Page 1 of 5

animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 8:15 pm
by radiance
Hi all,

I'd like to share the command line flags that the upcoming beta2.1 will be supporting to automate rendering of OBJ files in batch,
so users can render animations with beta2.1.

I'm posting the flags here so people who like to tinker and program can create scripts to make them.
We are also working on some scripts for people to use with blender and maybe other packages.

If you would like to make a script that could be usefull, please share it.

Code: Select all

syntax: octane <options> scenefile.ocs


COMMAND OPTIONS
---------------

-e --exit                          quit after maxsamples/image save

-o --output-png		<string> filename (png to save)

-s --samples		<integer> samples/px to stop at

-g --gpu		<integer> gpu to use (0 = primary, 1 = secondary, etc...)

   --cam-pos-x		<float> manually specify camera position X
   --cam-pos-y		<float> manually specify camera position Y
   --cam-pos-z		<float> manually specify camera position Z

   --cam-target-x	<float> manually specify camera target position X
   --cam-target-y	<float> manually specify camera target position Y
   --cam-target-z	<float> manually specify camera target position Z

   --cam-up-x		<float> manually specify camera up vector X
   --cam-up-y		<float> manually specify camera up vector Y
   --cam-up-z		<float> manually specify camera up vector Z

   --cam-fov		<float> manually specify camera field of view in degrees
   --cam-aperture	<float> manually specify camera lens aperture radius

-m --mesh-node		<string> the name of the meshnode to render

-r --relink-meshnode	<string> a new filename of a new OBJ file to relink the rendered meshnode (specified with -m above) with, keeping materials intact by material name


EXAMPLES
--------

Example: render a named mesh node in a OCS project file with camera controls:
octane -e -m meshnodename -s 4096 --output-png file0001.png --cam-pos-x 0.0 --cam-pos-y 0.0 --cam-pos-z 10.0 --cam-target-x 0.0 --cam-target-y 0.0 --cam-target-z 0.0 --cam-up-x 0.0 --cam-up-y 1.0 --cam-up-z 0.0 --cam-fov 90.0 --cam-aperture 1.0  projectfile.ocs

Example: render a named mesh node, relinking it with a new OBJ file (preserving materials by name):
octane -e -m meshnodename -r newobject.obj -s 4096 --output-png file0001.png  projectfile.ocs

offcourse you can also add camera controls to the 2nd ;)


Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 8:26 pm
by understand
jippeee..

Can you pleeaaaaase add batch .OCS file rendering also

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 8:27 pm
by radiance
understand wrote:jippeee..

Can you pleeaaaaase add batch .OCS file rendering also
that's the last argument without a flag, you can do that too.

Radiance

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 8:44 pm
by understand

Code: Select all

octane -e -s 4096 -o file001.png file.ocs file2.ocs file3.ocs 
?
:?

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 8:48 pm
by radiance
no, that would be:

Code: Select all

octane -e -s 4096 -o file001.png file.ocs
octane -e -s 4096 -o file002.png file2.ocs
octane -e -s 4096 -o file003.png file3.ocs
Radiance

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 8:59 pm
by understand
ahh and that save that in a script or do you type that in octane somewhere? I was in a command string mindset

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 9:01 pm
by radiance
understand wrote:ahh and that save that in a script or do you type that in octane somewhere? I was in a command string mindset
the info is for people who are into programming scripts that launch octane in batch like that, eg to render X amount of images.

Radiance

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 9:31 pm
by understand
so where do you type that in to run it? i want to be one of those people too

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 9:42 pm
by PhilBo
This would be from a command line. So from the terminal in Linux/Mac or from the command prompt (cmd.exe) in Windows.

Eventually, people will be able to write scripts for their modeling package that can take advantage of this. The workflow might be something like this:

1) Export your scene to Obj.
2) Open in Octane and tweak the scene / materials / render settings.
3) Save the OCS file
4) In modeling application, launch a script which will then start exporting the geometry and camera settings for each frame, relinking the geometry with the OCS file,setting the camera position, and then rendering the frame until X samples are complete.

The script would then keep rendering the OCS file with the changes in geometry and camera settings and outputting the images which can then be assembled into an animation.

Re: animation / batch scripting support syntax for tinkerers

Posted: Thu Apr 15, 2010 10:09 pm
by James
Sweet! This is fantastic!

Now if only I could work out what the hell the units are that the blender camera uses for FoV...