batch render views

Forums: batch render views
Rhino 3D (Export script developed by SamPage; Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

batch render views

Postby reberts2 » Mon Sep 03, 2018 5:20 pm

reberts2 Mon Sep 03, 2018 5:20 pm
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
Win 7 64 | GTX260 x 2 | Core i7 860 | 4GB & OSX 10.6 | 8600M GT | Core 2 Duo | 4GB
reberts2
Licensed Customer
Licensed Customer
 
Posts: 103
Joined: Tue Feb 23, 2010 2:48 pm

Re: batch render views

Postby face_off » Wed Sep 05, 2018 6:07 am

face_off Wed Sep 05, 2018 6:07 am
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/RhinoPluginManual.htm#Rhinoceros/PythonInterface.htm

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

Re: batch render views

Postby reberts2 » Wed Sep 05, 2018 12:01 pm

reberts2 Wed Sep 05, 2018 12:01 pm
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[i])
rs.Command("!_-Render")
command = "_-SaveRenderWindowAs \"" + Outpath + "\\" + RViews[i] + ".png\""
rs.Command(command)
#print command
rs.Command("_-CloseRenderWindow")
Win 7 64 | GTX260 x 2 | Core i7 860 | 4GB & OSX 10.6 | 8600M GT | Core 2 Duo | 4GB
reberts2
Licensed Customer
Licensed Customer
 
Posts: 103
Joined: Tue Feb 23, 2010 2:48 pm

Return to Rhinoceros 3D


Who is online

Users browsing this forum: Google [Bot] and 6 guests

Thu Mar 28, 2024 10:39 am [ UTC ]