Render and save to PNG all render targets

Forums: Render and save to PNG all render targets
Forum for OctaneRender Lua scripting examples, discussion and support.

Re: Render and save to PNG all render targets

Postby MB » Tue Apr 01, 2014 10:48 pm

MB Tue Apr 01, 2014 10:48 pm
Here is a newer version with better manners.

Will behave more elegantly when you cancel the script mid render.
Names files with the number of samples and time to render appended.
Shortcut Key added (ctrl + B)
Upon completion, main window remains visible with total time (seconds) to render entire batch displayed.
Attachments
Batch Output RenderTargets.lua
(10.42 KiB) Downloaded 260 times
Windows 7 Enterprise, 2x Intel Xeon X5650 2.66 GHz, 24GB Ram, GTX 590, Quadro 5000, Quadro K4200
User avatar
MB
Licensed Customer
Licensed Customer
 
Posts: 119
Joined: Tue Jan 15, 2013 3:41 am
Location: Washington, D.C.

Re: Render and save to PNG all render targets

Postby Eznit » Tue Apr 01, 2014 11:01 pm

Eznit Tue Apr 01, 2014 11:01 pm
Hi

Thank You

When the Troop render target and do ctrl + b gives error
but do not be grouped works perfectly
Is this normal?
Eznit
Licensed Customer
Licensed Customer
 
Posts: 36
Joined: Wed Mar 21, 2012 11:27 am

Re: Render and save to PNG all render targets

Postby MB » Tue Apr 01, 2014 11:18 pm

MB Tue Apr 01, 2014 11:18 pm
Probabaly, there is no code to handle anything in groups.
Windows 7 Enterprise, 2x Intel Xeon X5650 2.66 GHz, 24GB Ram, GTX 590, Quadro 5000, Quadro K4200
User avatar
MB
Licensed Customer
Licensed Customer
 
Posts: 119
Joined: Tue Jan 15, 2013 3:41 am
Location: Washington, D.C.

Re: Render and save to PNG all render targets

Postby rosol » Wed Apr 02, 2014 1:49 am

rosol Wed Apr 02, 2014 1:49 am
Thomas and MB
Thank you very much. It saves a lot of time. :D
rosol
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Wed Mar 09, 2011 8:17 am

Re: Render and save to PNG all render targets

Postby smicha » Wed Apr 02, 2014 6:47 am

smicha Wed Apr 02, 2014 6:47 am
Guys,
Your help and work is far beyond my expectations.

Thanks you again.
Win7, Modo 10.1, Octane for Modo and Sketchup, nVidia latest, TITAN+3x780 6GB, 2600K, P8P67WS, 32GB, 1350W
SMH10, EK, Airplex_480, SR1_560, 20xNB_PL2, 2xD5, Aquaero 6XT
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
smicha
Licensed Customer
Licensed Customer
 
Posts: 3145
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: Render and save to PNG all render targets

Postby kavorka » Wed Apr 02, 2014 3:06 pm

kavorka Wed Apr 02, 2014 3:06 pm
Would it be possible to have a check box option type of thing for whether you want to add the "01" or "02" at the end of the image when it is saved?
I would rather it just save the image as my render target name and not add anything.

It looks like I can just edit that on the script myself to not do it (maybe, I'm no programmer), but I would much rather just keep using any updates posted here instead of using my own version.
Intel quad core i5 @ 4.0 ghz | 8 gigs of Ram | Geforce GTX 470 - 1.25 gigs of Ram
kavorka
Licensed Customer
Licensed Customer
 
Posts: 1351
Joined: Sat Feb 04, 2012 6:40 am

Re: Render and save to PNG all render targets

Postby Eznit » Wed Apr 02, 2014 6:51 pm

Eznit Wed Apr 02, 2014 6:51 pm
MB wrote:Probabaly, there is no code to handle anything in groups.


Ok MB :P

Obrigado Thank you
Eznit
Licensed Customer
Licensed Customer
 
Posts: 36
Joined: Wed Mar 21, 2012 11:27 am

Re: Render and save to PNG all render targets

Postby MB » Thu Apr 03, 2014 1:06 am

MB Thu Apr 03, 2014 1:06 am
Kavorka,

Of course having an option like that is possible, if you don't check it however, and then export a batch of render targets where all names are not unique, you will end up overwriting one or more of them which could be pretty annoying. The numbers guarantee that file names are unique regardless of what silly things a user might instruct the software to do. It is also faily easy for you to remove the number appended to the file name in the script.

I have another question, should there be an option to ignore the max samples value if a kernal node is attatched to the render target, this way you could do differnt numbers of samples depending on what type of kernal is being used.

best

Mark
Windows 7 Enterprise, 2x Intel Xeon X5650 2.66 GHz, 24GB Ram, GTX 590, Quadro 5000, Quadro K4200
User avatar
MB
Licensed Customer
Licensed Customer
 
Posts: 119
Joined: Tue Jan 15, 2013 3:41 am
Location: Washington, D.C.

Re: Render and save to PNG all render targets

Postby kavorka » Thu Apr 03, 2014 2:17 am

kavorka Thu Apr 03, 2014 2:17 am
That makes sense.
The only reason why I asked for that is because I will be rendering ~80 images this weekend with the script. But, I'll just rename them after. For any other project, its not actually a problem.

Is it possible to add a pause button?
Right now there is no way to pause once you start.
If you are rendering lots of images (like me) or a couple that take several hours, your GPUs are tied up for a while.

Thanks for this awesome script, just tested it with the first 8 images and it went great!
Intel quad core i5 @ 4.0 ghz | 8 gigs of Ram | Geforce GTX 470 - 1.25 gigs of Ram
kavorka
Licensed Customer
Licensed Customer
 
Posts: 1351
Joined: Sat Feb 04, 2012 6:40 am

Re: Render and save to PNG all render targets

Postby stratified » Thu Apr 03, 2014 3:16 am

stratified Thu Apr 03, 2014 3:16 am
Hi guys,

First of all thanks to Mark for improving this script. It was a massive effort to add a user interface to this script!

I modified the script a bit:

  • Detect render targets nested in a nodegraph.
  • Allow to select which render targets should be rendered in the batch.
  • assign an index to each render target and use that one in the output name (instead of the render time), this prevents overwrites as well. (Ofcourse it's stupid to have 120 render targets named "Render Target" in the first place).

There might still be bugs in it.

batch_render.lua
(12.34 KiB) Downloaded 211 times


Some general tips for script writers, things I noticed when looking through user's scripts (not only yours Mark, don't take it personal ;).

  • Don't use tabs in your scripts, configure your editor to emit 4 spaces for a tab (the editor in Octane does this automatically).
  • Respect the indentation, it's hard for others to read your scripts if everything is jumping around.
  • We have shortcuts for getProperties() and updateProperties, you can use node.name or button.enable instead.
  • Setting the width on a table is counter productive, they are designed to calculate their width for you.

Of course this is not all your fault, the documentation in the API browser isn't always too great but we're trying to improve it.

cheers,
Thomas
User avatar
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand
PreviousNext

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 0 guests

Sun Mar 29, 2020 5:41 am [ UTC ]