Octane render batch render script

Rhino 3D (Export script developed by SamPage; Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

Post Reply
franchais
Licensed Customer
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm

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!
I7 2600k | EVGA gtx 680 FTW 4gb | Win 7 x64 | 16gb RAM
User avatar
face_off
Octane Plugin Developer
Posts: 15696
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

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
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
maray29
Licensed Customer
Posts: 9
Joined: Wed Feb 14, 2018 10:26 am

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
User avatar
face_off
Octane Plugin Developer
Posts: 15696
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

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
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
Post Reply

Return to “Rhinoceros 3D”