Hello,
I would like to know if there is a way to get an Ids buffer/visibility buffer.
I see for example that in the API there is the possibility to get the z buffer Rhino.Display.ZBufferCapture
.
jmv
Or, how can I create my own buffer with different objects?
My knowledge stops at the use of DisplayPipeline
and ViewCapture.CaptureToBitmap
.
Hi @kitjmv,
Perhaps you can step back and describe what problem you are trying to solve?
Thanks,
– Dale
No doubt this is to get a selection map to make it faster to determine what object was clicked on in the viewport. See the custom rotation plug-in @kitjmv has been working on. It would eliminate the need to use GetRenderMeshes
and do expensive ray hitting he has been asking a lot about recently.
And some of the related posts RhinoObject.GetRenderMeshes, bug? , Render mesh topology , How do I always switch to wireframe when moving the view? . I thought there were more, but can’t find them now (at least a post with a huge amount of objects in and trying to get render meshes and do fast ray intersection and determining overlapping objects).
Hello @dale,
Thank you @nathanletwory, you saved me many minutes of English translation!
That’s right, my goal is to quickly retrieve the object under the mouse cursor.
I don’t need a lot of precision, but it has to be fast, very fast.
Yesterday I found a solution with an “empty” display mode (DisplayModeDescription
). No shadow, light and others:
And using a DisplayConduit
+ RhinoView.CaptureToBitmap
But the performance improvement started to show when 30 objects were under the mouse, producing (when meshed) over a million faces.
To avoid overloading the IdConduit
, this technique requires me to keep calculating if the objects are visible in the view and extracting the meshes with RhinoObject.GetRenderMeshes
.
It’s a shame because Rhino has the full vertex buffer to display objects on the screen.
So I want to know if there is a way as easy as Rhino.Display.ZBufferCapture
to get map Ids (or visibility buffer).
With a depth map and identifiers, it would be easy to calculate an intersection. not precise, but fast.
In the end I wrote my long blabla in English… /
Separate library edit