Batch Render from command line _ LUA script

Forum for OctaneRender Lua scripting examples, discussion and support.
Post Reply
calus
Licensed Customer
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Octane command line doesn't provide a built-in way for batch rendering animation,
so here is an advanced LUA script for that.
cmdBatchRender.lua
(22.23 KiB) Downloaded 1466 times
This is a hack based on the batch rendering script shipping with Octane.


USAGE:

--script path to this script -a output path -a render targets -a image format -a start frame -a end frame -a max samples

(arguments -a are optional)


- If no render targets name arguments are provided in the command line, then all render targets are rendered.
- if no start/end frame argument is provided then the entire timeline is rendered.
- If no output path argument is provided, an "images" folder is created for that next to the orbx/ocs file.
- Number arguments have an expected order : start frame, end frame, max samples. (as the script have no way to guess which number argument is for what)
- Image format for a specific render target must be declared before the render target.


Windows command line example :

Code: Select all

octane.exe C:\test.orbx --no-gui --script C:\cmdBatchRender.lua -a C:/images/ -a 1 -a 100 -a 1024 -a EXR16 -a renderTarget1 
keywords for image format : PNG8, PNG16, EXR16, EXR16TONEMAPPED, EXR, EXRTONEMAPPED


Default settings are easy to change at the top of the script.
Pascal ANDRE
User avatar
glimpse
Licensed Customer
Posts: 3740
Joined: Wed Jan 26, 2011 2:17 pm
Contact:

thank You!
cgpanda
Licensed Customer
Posts: 60
Joined: Mon Sep 09, 2013 3:58 pm

Thanks for the script!

Is there a way to render multiple projects? Like a render queue.

I have for example 17 stand alone projects. I would love to let it render overnight one by one.

Thanks in advance!
psclcr
Posts: 2
Joined: Fri May 01, 2020 12:23 pm

Thanks!
This is exactly what i am looking for!

But i could not figure out how to make it work... :?

i am using Octane Stand alone 3.07.
I have 5 .ocs files
Each have 30 Render Target in it
No animation , just one PNG8 image to render

Actually i do with command line that will "open ocs+render 1 target+exit" so it means 5x30=150 times! open/exit time loss.
What i would like is "open+render all 30 targets+exit" ... one ocs file after the other (5 times)

Any help would be much appreciated
Hesekiel2517
Licensed Customer
Posts: 457
Joined: Mon Nov 23, 2015 10:57 pm

I would love to use this, but it gives me errors. Is there a quick way to fix this?
BadArgument.JPG
Thank you in advance!
Renbry
Licensed Customer
Posts: 42
Joined: Fri Nov 23, 2018 9:09 am

Hey there. seems to be a bug i'm chasing down with support. I'll post any fixes i can get asap. i know this is a while after you posted but it's a big problem that i'd like to solve.
karl
OctaneRender Team
Posts: 394
Joined: Sun Oct 13, 2019 11:26 pm

Here is an updated version of the script that works with Octane 2020.2.

Usage is the same, except that you now specify the image save format (PNG_8 (default), PNG_16, EXR_16, EXR_32) and the color space (SRGB (default), LINEAR_SRGB, ACES2065_1, ACESCG) separately.

To get the same behavior as the old EXR16 you would pass EXR_16 LINEAR_SRGB now.

(Outputting to OCIO color spaces doesn't work - hooking up the OCIO color space name and look name to the script's command line parameters is left as an exercise for the reader).
Attachments
cmdBatchRender_2020.2.lua
(23.89 KiB) Downloaded 1254 times
Hesekiel2517
Licensed Customer
Posts: 457
Joined: Mon Nov 23, 2015 10:57 pm

Hi Karl,

i really love this script. It's the best way imho to batch render orbx files locally. Sadly the script does not work in 2023. It would be really nice, if you could look into it. Thanks in advance!
karl
OctaneRender Team
Posts: 394
Joined: Sun Oct 13, 2019 11:26 pm

Here's an updated version of the script that works in 2023.1.x. Let me know if there are any problems.
Attachments
cmdBatchRender_2023.1.lua
(22.79 KiB) Downloaded 430 times
Hesekiel2517
Licensed Customer
Posts: 457
Joined: Mon Nov 23, 2015 10:57 pm

Thank you so much!
Post Reply

Return to “Lua Scripting”