Page 1 of 1

Octane render batch render script

PostPosted: Thu Dec 06, 2018 2:52 am
by franchais
Hi, I'm just wondering if anyone has a batch render script set up so that it saves the render passes as well?

Or are they any good plugins that handle this already?

Any help appreciated!

Re: Octane render batch render script

PostPosted: Sun Dec 09, 2018 10:27 am
by face_off
This is possible with the plugin python interface, and some users have posted code to do this in the forums here from time to time (but you might have to do some searching). There is a page in Rhino manual at docs.otoy.com that will get you started. It would be great if someone maintained a Rhino script to do this available to all users.

Thanks

Paul

Re: Octane render batch render script

PostPosted: Mon Dec 17, 2018 7:29 am
by maray29
Hey guys, I tried to write the script but some things don't work properly.

The logic is following:
1. Get the list on named views
2. Start rendering
3. Check the sample count, if it's less than 100, continue rendering
4. Save the image
5. Repeat steps 1-4 until all the named views are finished

However, I don't understand a few things:

1. How to properly count the current number of samples per pixel. I tried this:
Code: Select all
resStats = octane.ResultStatistics()
currentSamples = resStats.samplesPerPixel


2. rs.RestoreNamedView() sometimes doesn't restore the view and the rendering is done on the wrong view. Maybe it's doing too fast and Octane can't catch up? I tried time.sleep(), but still works in an unexpected way

3. Images with the same names are not overwritten.

The code: https://github.com/claes-mayne/pythonBa ... hRendering

Hope someone with more experience can contribute and all the people who need can use it.
Thanks,
Ayk

Re: Octane render batch render script

PostPosted: Wed Dec 19, 2018 12:05 pm
by face_off
resStats = octane.ResultStatistics()
currentSamples = resStats.samplesPerPixel
What is actually being returned in resStats.samplesPerPixel? Suggest you print the value out to determine what is going on.

There is definitely a python script to do this somewhere in this forum, but I have not been able to find it unfortunately.

Paul