Octane can be started from the command line, and supports command line options for loading scenes, meshes, and automated rendering.
Loading and rendering a scene.
To load an OCS scene file, give the filename as an argument: octane.exe "scene.ocs".
You can specify a mesh or a rendertarget to be rendered.
-t node : Render a rendertarget node.
-m node : Render a mesh node. You need to give the name of the mesh node, not the filename of the OBJ file (but they are often the same). If used in
combination with -t it will render this mesh instead of the mesh attached to the rendertarget.
There are two ways to load an additional OBJ mesh file:
-l file.obj : load file.obj into a new mesh node called file.obj . You can use this in combination with -m to start rendering this new node.
-r file.obj -m node : load file.obj into an existing mesh node, and render this node. This keeps the existing materials connected to this mesh node.
Some examples:
Load an OBJ file as a mesh node, and render the newly loaded mesh (using the settings in the preview render target). Since no scene file is given it will create a new scene.
octane.exe -l "mesh.obj" -m "mesh.obj"
Load a scene, and render a render target
octane.exe "scene.ocs" -t "myrendertarget"
Load a scene, load an OBJ file into an existing mesh node and render using settings from a render target
octane.exe "scene.ocs" -t "myrendertarget" -m "meshnode" -r "mesh.obj"
Changing render settings.
The rendering settings are normally taken from the selected rendertarget, or the default preview render target if only a mesh node is given. Many of
these settings can be overridden with additional options. For example -s 1000 will set the maximum amount of samples to render to 1000.
--film-width 1280 --film-height 720 changes the resolution. There are also options to change camera, daylight and exposure settings.
The output file is specified with -o for a standard PNG file. There are a few other output options, --output-exr for instance saves HDR output
to an EXR file.
Other options
Use -g 0 to render on the first GPU only. This option can be given multiple times to render on multiple GPU's.
Use -e to exit Octane after the rendering is done, and -q to suppress popup windows when loading a scene.
Run octane.exe --help for an overview of all options.
--
Roeland
TUTORIAL: Using the command line options
Forum rules
Please do not post any material that is copyrighted or restricted from public use in any way. OTOY NZ LTD and it's forum members are not liable for any copyright infringements on material in this forum. Please contact us if this is the case and we will remove the material in question.
Please do not post any material that is copyrighted or restricted from public use in any way. OTOY NZ LTD and it's forum members are not liable for any copyright infringements on material in this forum. Please contact us if this is the case and we will remove the material in question.
Thanks. I've never tried this before, but for sure i'll test it out now, 'cos it seems to be pretty useful! Just a simple QUESTION:
Let's say i have scene with 5targets. Everything is set uped & ready to render.
How to write a code so it would render target & saveout, target two & save out, etc.?
p.s. HELP file is detail enought, so i'll try to figure out myself =)
Let's say i have scene with 5targets. Everything is set uped & ready to render.
How to write a code so it would render target & saveout, target two & save out, etc.?
p.s. HELP file is detail enought, so i'll try to figure out myself =)
- AndreaMannori
- Posts: 153
- Joined: Thu Feb 24, 2011 8:25 am
- Location: Bergamo
So I did it:
Pay attention to enclose all the path with "..."
Don't enclose the mesh argument with "..."
Continue adding as many lines of code as many pictures do you need
You can obviously "freeze" the render target and then change the mesh node (by changing the OBJ file)... in this way you render many different products with the same scene setup
(I found some issues with this code... first of all the -q --quite & -s --samples commands doesn't work with 2.58c)
I hope this will help you...
Cheers!
Code: Select all
C:\Users\xxx\xxx\OctaneRender_BETA\octane.exe -e -r "Z:\project\batch_test_1.obj" -m Project_1 -q -s 128 -t "RenderTarget" -o "Z:\project\batch_test_1.png" "Z:\project\batch_test_1.ocs"
C:\Users\xxx\xxx\OctaneRender_BETA\octane.exe -e -r "Z:\project\batch_test_2.obj" -m Project_2 -q -s 128 -t "RenderTarget" -o "Z:\project\batch_test_1.png" "Z:\project\batch_test_2.ocs"
....
Don't enclose the mesh argument with "..."
Continue adding as many lines of code as many pictures do you need
You can obviously "freeze" the render target and then change the mesh node (by changing the OBJ file)... in this way you render many different products with the same scene setup
(I found some issues with this code... first of all the -q --quite & -s --samples commands doesn't work with 2.58c)
I hope this will help you...
Cheers!
Andrea Mannori
win 8.1 x64; nvidia 770M driver 340.52; octane standalone 2 + c4doctane 2.
win 8.1 x64; nvidia 770M driver 340.52; octane standalone 2 + c4doctane 2.
They work here (2.58c)renderfarmsrl wrote: (I found some issues with this code... first of all the -q --quite & -s --samples commands doesn't work with 2.58c)
SW: Octane 3.05 | Linux Mint 18.1 64bit | Blender 2.78 HW: EVGA GTX 1070 | i5 2500K | 16GB RAM Drivers: 375.26
cgmo.net
cgmo.net
- AndreaMannori
- Posts: 153
- Joined: Thu Feb 24, 2011 8:25 am
- Location: Bergamo
Great... so, what's wrong in my code? ...octane won't accept those 2 parameters... it does continue with the original ones..
Andrea Mannori
win 8.1 x64; nvidia 770M driver 340.52; octane standalone 2 + c4doctane 2.
win 8.1 x64; nvidia 770M driver 340.52; octane standalone 2 + c4doctane 2.
ok, I only now looked at your commandrenderfarmsrl wrote:Great... so, what's wrong in my code? ...octane won't accept those 2 parameters... it does continue with the original ones..

--samples is ignored if you use -t switch (to specify a render target), this will be corrected in a future release.
--quit should work always. Try to move -q at the beginning of the command.
SW: Octane 3.05 | Linux Mint 18.1 64bit | Blender 2.78 HW: EVGA GTX 1070 | i5 2500K | 16GB RAM Drivers: 375.26
cgmo.net
cgmo.net
- AndreaMannori
- Posts: 153
- Joined: Thu Feb 24, 2011 8:25 am
- Location: Bergamo
Hi, -q stands for "quiet" ... Start Application without splash and minimized window... but it doesn't work perfectly beacause I allways see the voxeling informations etc... For future releases I hope to see octane running in background (hahaha I don't want to see anything in fact!).
Talking about -t command: I have read the specifications written by Roeland.... but if I don't use the -t command...it won't render anything because a simple window appears telling me that a syntax error occurred.
I'm not a programmer but only a geek for now so please be patient for my questions.
Thank you!
Talking about -t command: I have read the specifications written by Roeland.... but if I don't use the -t command...it won't render anything because a simple window appears telling me that a syntax error occurred.
I'm not a programmer but only a geek for now so please be patient for my questions.
Thank you!
Andrea Mannori
win 8.1 x64; nvidia 770M driver 340.52; octane standalone 2 + c4doctane 2.
win 8.1 x64; nvidia 770M driver 340.52; octane standalone 2 + c4doctane 2.
Yeah, -q is "quiet", I confused it with --exit.
Even if you use -q those annoying pupups still show (so it's more like --loud
). This has been already asked to be fixed and I hope they will see to it in the next release.
-t command takes as parameter the name of the render target node you set up in your scene (the same as -o takes the name of the mesh object to render). You don't need to put names in parenthesis (atleast I don't do it here on Linux - maybe you need them if you have spaces in filenames, but spaces are bad, bad!!). I think you wrongly use the -r option in your example, you don't need that. An example without render targets (assuming all the files are in the current directory):
Even if you use -q those annoying pupups still show (so it's more like --loud

-t command takes as parameter the name of the render target node you set up in your scene (the same as -o takes the name of the mesh object to render). You don't need to put names in parenthesis (atleast I don't do it here on Linux - maybe you need them if you have spaces in filenames, but spaces are bad, bad!!). I think you wrongly use the -r option in your example, you don't need that. An example without render targets (assuming all the files are in the current directory):
Code: Select all
octane.exe --exit --quiet -m test-scene.obj --samples 1024 --output-png test-scene.png test-scene.ocs
SW: Octane 3.05 | Linux Mint 18.1 64bit | Blender 2.78 HW: EVGA GTX 1070 | i5 2500K | 16GB RAM Drivers: 375.26
cgmo.net
cgmo.net
You can put any argument inside quotes if you want. These two commands do the same (at least in the Windows Command Prompt and in bash):
You need to put quotes around any paths or node names that contain spaces, and depending on your shell some other special characters.
--
Roeland
Code: Select all
"octane.exe" "-m" "test-scene.obj" "--output-png" "test-scene.png" "test-scene.ocs"
octane.exe -m test-scene.obj --output-png test-scene.png test-scene.ocs
--
Roeland
@Roeland, yes that makes sense. I just never needed quotes because I never ever use spaces or special characters in filenames. It's a hassle escaping spaces when typing in the console, so I grow accustomed to write all names with underscores or hypens instead.
SW: Octane 3.05 | Linux Mint 18.1 64bit | Blender 2.78 HW: EVGA GTX 1070 | i5 2500K | 16GB RAM Drivers: 375.26
cgmo.net
cgmo.net