Page 1 of 1

batch render views

Posted: Mon Sep 03, 2018 5:20 pm
by reberts2
I am happy with the ability to export views from Rhino as OCS files and render them with Octane standalone.
However I'm looking for a way to batch render each of these OCS filse and save the output.
Are there any simple mechanisms to do this?

Thanks in advance.
-Rick

Re: batch render views

Posted: Wed Sep 05, 2018 6:07 am
by face_off
The only way to do this would be to write some python/rhino script to render out each view, save the file, then progress to the next view. I am aware some users have done this, but unfortunately I don't have any code that I can share. The available python documentation is at https://docs.otoy.com/RhinoH/RhinoPlugi ... erface.htm

Thanks

Paul

Re: batch render views

Posted: Wed Sep 05, 2018 12:01 pm
by reberts2
Thanks Paul,
I'm hoping between the Rhinoscript/Python docs and samples and maybe someone sharing their work, I'll come up with a simple solution.
Sincerely,
Rick

PS Here is the python script I have modified that is workinng well for me.
The only hitch is that custom Parallel projection viewports (views) MUST actually be Perspective projection viewports (views) with long lens legnth (1000mm) to render correctly.

import rhinoscriptsyntax as rs
RViews = ["1 left facing" , "2 front facing", "3 right facing", "4 top view",
"5 left view", "6 front view", "7 back view", "8 right view", "9 bottom view"]
Outpath = r"C:\batch" #do NOT add trailing backslash
for i in range(len(RViews)):
rs.RestoreNamedView(RViews)
rs.Command("!_-Render")
command = "_-SaveRenderWindowAs \"" + Outpath + "\\" + RViews + ".png\""
rs.Command(command)
#print command
rs.Command("_-CloseRenderWindow")