-1

Is there a way to determine if an object (dbid) is visible by the camera at any point in time?

1 Answer 1

1

That depends on the precision you need, for example:

  • Is it enough to find out if the element is outside the camera view?

    • This would be relatively straightforward and performant, as you could use FrustumIntersector to detect whether the bounding box of the element is outside of the frustum.
  • What if the element is inside the camera view but it's occluded by other objects? Do you need to detect that situation as well?

    • For this you'd need something like occlusion queries, however this is not supported by the Viewer SDK, so you'd need to build it yourself.

    • You could, for example, project and render bounding boxes of individual elements into a buffer (with colors encoding the IDs of the corresponding elements), and then check whether there are any pixels in the frame belonging to the element you're interested in. Unfortunately, since you don't have access to the underlying rendering pipeline, this would be very inefficient.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.