You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When zooming in closely or far out, the the model is clipped. This happens because the near and far planes are at a constant distance from the camera. It would be better to set near and far plane distances so that the model is always fully visible.
I initially thought we could do this based on the bounding volume, but I realized this is not true. If the model is concave, the camera might be within the bounding volume, so we can't use the bounding volume to make decisions about the near plane in this case.
Maybe any of those are better solutions:
Use distance to the focus point.
Shoot one or more representative rays at the model.
Do collision detection between model and camera cone.
The text was updated successfully, but these errors were encountered:
I realized I'm overthinking this. Here's how it should work, I think:
If the camera is outside the bounding volume, set near and far plane distances such, that the bounding volume is enclosed between the planes.
If the camera is inside the bounding volume, set far plane distance such, that the far plane is behind the bounding volume, and set near plane distance to a constant minimum value.
That should be enough. If it isn't, it can be improved later.
hannobraun
changed the title
Model is clipped when near to or far away from the camera
Model is clipped when near to or far from the camera
Dec 11, 2021
When zooming in closely or far out, the the model is clipped. This happens because the near and far planes are at a constant distance from the camera. It would be better to set near and far plane distances so that the model is always fully visible.
I initially thought we could do this based on the bounding volume, but I realized this is not true. If the model is concave, the camera might be within the bounding volume, so we can't use the bounding volume to make decisions about the near plane in this case.
Maybe any of those are better solutions:
The text was updated successfully, but these errors were encountered: