Hey all, what does the RealtimeRenderPasses mean in the ViewCapture? I noticed that the CaptureToBitmap is finished immediately. How do I get the high quality output as if I’m using the render button in the UI? Thanks!
That is for the case you’re using a viewport mode that is based on the realtime render engine integration. In default Rhino that is Raytraced. So set the viewport display mode to Raytraced and set the RealtimeRenderPasses to the amount of samples you want done. Start with say 50 to get a feel, then bump up to a value you think gives you useable output.
That said, it is IMO best to just not switch any viewport to Raytraced and just use the _Render command instead.
_Render, followed by _SaveRenderWindowAs and CloseRenderWindow.
The reason is that when you use Raytraced then you’ll end most likely up running two Raytraced sessions. With larger scenes that can be detrimental because you’ll get potential resource starvation. Just doing the Render will run just the one session.
Yes, just make sure you set in Rendering panel background to transparent.
#! python3
import Rhino
path_to_file = "Generate path file name here"
# Note, create a path to a filename ending in .png when
# you want to save with alpha channel.
Rhino.RhinoApp.RunScript("_Render", True)
Rhino.RhinoApp.RunScript(f'_SaveRenderWindowAs "{path_to_file}" ')
Rhino.RhinoApp.RunScript('_CloseRenderWindow')
Thank you so much! Is there anyway to do this via the script? Also, how can we specify which viewport and what size to render? Is there a documentation for all possible parameters for each command like Renedr?