Batch Render from command line _ LUA script

Forums: Batch Render from command line _ LUA script
Forum for OctaneRender Lua scripting examples, discussion and support.

Batch Render from command line _ LUA script

Postby calus » Thu Feb 28, 2019 9:31 pm

calus Thu Feb 28, 2019 9:31 pm
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 1086 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
calus
Licensed Customer
Licensed Customer
 
Posts: 1308
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Batch Render from command line _ LUA script

Postby glimpse » Fri Mar 01, 2019 2:15 pm

glimpse Fri Mar 01, 2019 2:15 pm
thank You!
User avatar
glimpse
Licensed Customer
Licensed Customer
 
Posts: 3715
Joined: Wed Jan 26, 2011 2:17 pm

Re: Batch Render from command line _ LUA script

Postby cgpanda » Tue Apr 02, 2019 10:34 pm

cgpanda Tue Apr 02, 2019 10:34 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!
cgpanda
Licensed Customer
Licensed Customer
 
Posts: 60
Joined: Mon Sep 09, 2013 3:58 pm

Re: Batch Render from command line _ LUA script

Postby psclcr » Fri May 01, 2020 12:32 pm

psclcr Fri May 01, 2020 12:32 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
psclcr
 
Posts: 1
Joined: Fri May 01, 2020 12:23 pm

Re: Batch Render from command line _ LUA script

Postby Hesekiel2517 » Fri Sep 18, 2020 7:17 am

Hesekiel2517 Fri Sep 18, 2020 7:17 am
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!
Hesekiel2517
Licensed Customer
Licensed Customer
 
Posts: 449
Joined: Mon Nov 23, 2015 10:57 pm

Re: Batch Render from command line _ LUA script

Postby Renbry » Wed Aug 04, 2021 2:41 am

Renbry Wed Aug 04, 2021 2:41 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.
Renbry
Licensed Customer
Licensed Customer
 
Posts: 38
Joined: Fri Nov 23, 2018 9:09 am

Re: Batch Render from command line _ LUA script

Postby karl » Wed Aug 04, 2021 4:54 am

karl Wed Aug 04, 2021 4:54 am
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 606 times
karl
OctaneRender Team
OctaneRender Team
 
Posts: 363
Joined: Sun Oct 13, 2019 11:26 pm

Re: Batch Render from command line _ LUA script

Postby Hesekiel2517 » Tue Feb 27, 2024 9:26 pm

Hesekiel2517 Tue Feb 27, 2024 9:26 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!
Hesekiel2517
Licensed Customer
Licensed Customer
 
Posts: 449
Joined: Mon Nov 23, 2015 10:57 pm

Re: Batch Render from command line _ LUA script

Postby karl » Tue Feb 27, 2024 10:46 pm

karl Tue Feb 27, 2024 10:46 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 62 times
karl
OctaneRender Team
OctaneRender Team
 
Posts: 363
Joined: Sun Oct 13, 2019 11:26 pm

Re: Batch Render from command line _ LUA script

Postby Hesekiel2517 » Wed Mar 13, 2024 3:47 pm

Hesekiel2517 Wed Mar 13, 2024 3:47 pm
Thank you so much!
Hesekiel2517
Licensed Customer
Licensed Customer
 
Posts: 449
Joined: Mon Nov 23, 2015 10:57 pm

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 11 guests

Thu Mar 28, 2024 1:27 pm [ UTC ]