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!
rhinoscriptsyntax.EnableRedraw(True)
rhinoscriptsyntax.ViewDisplayMode(viewport_name, "Rendered")
rhinoscriptsyntax.ShowGrid(viewport_name, show=False)
rhinoscriptsyntax.ShowGridAxes(viewport_name, show=False)
rhinoscriptsyntax.ShowWorldAxes(viewport_name, show=False)
view_capture = Rhino.Display.ViewCapture()
view_capture.Width = selected_view.ActiveViewport.Size.Width
view_capture.Height = selected_view.ActiveViewport.Size.Height
view_capture.ScaleScreenItems = False
view_capture.DrawAxes = False
view_capture.DrawGrid = False
view_capture.DrawGridAxes = False
view_capture.TransparentBackground = True
view_capture.RealtimeRenderPasses = rendering_pass
bitmap = view_capture.CaptureToBitmap(selected_view)
if bitmap:
temp_dir = tempfile.gettempdir()
random_filename = str(uuid.uuid4()) + '.png'
file_path = os.path.join(temp_dir, random_filename)
bitmap.Save(file_path, System.Drawing.Imaging.ImageFormat.Png)
print(file_path)
9 posts - 2 participants