Hey there,
I need some help with capturing the ZBuffer of active viewport(as rendered with ShowZBuffer command) in C#.
I could get the plain image capture after switching to ZBuffer renderer in Rhino…
Rhino.Display.RhinoView view = doc.Views.ActiveView;
if (Save)
{
// Switch to ZBuffer
Rhino.RhinoApp.RunScript("ShowZBuffer", false);
// Capture to file
Bitmap image = view.CaptureToBitmap();
image.Save(Path);
// Switch out of ZBuffer
Rhino.RhinoApp.RunScript("ShowZBuffer", false);
}
…but is there a way to capture the ZBuffer without actually displaying it?
Rhino.Display.ZBufferCapture class compared to ViewCapture doesn’t contain any CaptureToBitmap method, so I am a bit lost now. But I have to admit that I have little experience with C# and Rhino namespace, so it could be a very simple thing I am missing here.