DisplayConduit.ObjectCulling - works great but one small issue remains

(Menno Deij - van Rijswijk) #1


In the past, at least in part due to a question I asked, the DisplayConduit.ObjectCulling event has been added to RhinoCommon, for which my thanks :smiley:
My display conduits look much better now! A small issue remains, however, which is of a cosmetic nature mostly. When I try to select an item in the viewport that has my objects drawn and I get a selection menu, the selection menu preview does not respect the ObjectCulling. In the picture below, the Perspective viewport should not show the points and lines that are in the Top viewport. When I select on the intersection of a point and the curve, the selection menu pops up and shows the dynamic preview in a white/pink color also in the Perspective viewport.


(Steve Baer) #2

I’m not sure if the selection functions pay attention to conduit object culling. @jeff or @mikko, do you know if the selection filters out objects based on display conduit object culling?

(Jeff Lasor) #3

No they do not…I’m not even sure how they could (currently).

This is the problem with display based (only) object culling or object drawing…it does not actually cull the object from Rhino, it just keeps the object from drawing (which is not the same thing)… Rhino, and thus the picker, still thinks the object is there and therefore still allows you to pick it (or multi-pick it) or window select it.

Except for detail views, I do not believe Rhino has a way to cull objects from specific views/viewports using the SDK if/when an object is physically within the view’s frustum.

This is similar to the problem we had with bounding box additions not taking affect on commands that depend on the overall scene bounding box (i.e. Zoom Extents). We fixed that by adding a new channel and then updated the commands to run in that channel and use the resulting bounding box instead of the document’s.

The only thing I can think of as a possible solution (on our end) is that the pipeline keeps track of any ObjectCulling objects, and then the rest of Rhino could query the pipeline for object visibility, which would then include all culled objects as well as standard frustum visibility tests. As it is right now, there is no way for other sections of Rhino (or plugins) to know which objects any given display pipeline has culled from its object lists.

So to summarize… The whole problem here is that the ability to say “Don’t draw this object in this view” is not and does not mean the same thing as “Hide this object in this view”… I agree it should, but as of right now, it does not.

Something to look at for V6 I guess.

(Steve Baer) #4

Thanks Jeff,
That’s what I thought was the case, but wasn’t entirely sure since we did add the code to allow conduits to participate in “zoom extents”.

Does look like a good thing to tune up in V6

(Menno Deij - van Rijswijk) #5

Thank you all for your detailed answers. Like I said, for us it is a cosmetic issue and the availability of ObjectCulling in RhinoCommon is a significant improvement over the situation we were in up until recently.