I wanted to automate some cycles renderings via macro. basically just these commands repeated a few times, restoring different named views:
-NamedView Restore "view-01" _Enter _-SetDisplayMode _Mode=Raytraced _-ViewCaptureToFile _Width=900 _Height=600 _NumberOfPasses=200 "C:\folder\rendering-01.png" _-SetDisplayMode _Mode=Wireframe
the render progress bar window which pops up immediately indicated to me that the rendering would take ages. if I just set the same viewport to raytraced, finishing the same amount of passes/samples is much quicker.
I used MSI afterburner to check the GPU behavior and noticed the following. with “normal” raytraced viewport the GPU memory usage would be around 5GB, for the particular file I had in use. with
ViewCaptureToFile the GPU memory usage would spike to the max of my available GPU memory which is 8GB.
with a simple test scene and a smaller resolution the behavior was the same. when using
ViewCaptureToFile the GPU memory usage roughly doubles compared to using raytraced viewport.
raytraced viewport 900x600px, @200 samples:
00:00:46 (GPU memory usage ≈ 2950 MB)
ViewCaptureToFile 900x600px, @200 samples:
00:01:22 (GPU memory usage ≈ 6200 MB)
I attached the test file though I assume this issue is not related to any particular file.
Untitled.3dm (116.7 KB)
my tile size is set to 256x256
_-RhinoCycles_SetRenderOptions tile_x 256 tile_y 256
why does ViewCaptureToFile need double the amount of GPU memory? this seems to be the reason why it also takes much longer and makes it unusable because it can easily eat up all available GPU memory.