View Frustum Culling Corner Cases

Started by
3 comments, last by kalle_h 10 years, 3 months ago

I was reviewing my view frustum culling code for a new OpenGL project I am working on, and was noticing a bit too many corner cases with large bounding volumes (e.g. spheres) and smaller frustums. Corner cases where the bounding volume is in no way intersecting will my frustum volume, yet getting accepted as visible. I am using the Lighthouse3d (http://www.lighthouse3d.com/tutorials/view-frustum-culling/) method (geometric frustum plane method not radar) for extracting planes and testing against bounding volumes.

Here is an example (all frustum plane normals face inward (blue lines) )

http://img10.imageshack.us/img10/3970/70bm.jpg

The above image is top down, but neither the top or bottom frustum planes reject the sphere either.

This family of intersect methods rely on having at least one of the frustum planes reject the volume as outside. But there are corner cases where the volumes do not intersect, yet none of the frustum planes reject the volume, for example in the image I posted.

How does one deal typically deal with such cases (while still using world space frustum plane culling techniques, if possible)?

Advertisement

I guess one typically ignores the issue and hopes that a false negative is not a big deal.

The real question is how they handle this in tennis, where the ball lands out of the serving box, but neither linesman calls it out. :)

There is simple algorithm for correct culling. http://www.iquilezles.org/www/articles/frustumcorrect/frustumcorrect.htm

Thanks for that article.

Ack that does add quite a bit more processing! So i guess checking all frustum corners to see if they are within my sphere bounds would be the equivalent?

I also do AABB culling, i'm using the AABB pn-vertex optimization (mentioned in the Lighthouse article), not sure how it would work in this case (not sure how to get the pn of a frustum as I could with an AABB).

Has anyone attempted doing something like the pn-vertex optimization for proper large AABB to frustum checking?

Any semi-optimized (like pn-vertex type things) implementations out there?

Thanks for that article.

Ack that does add quite a bit more processing! So i guess checking all frustum corners to see if they are within my sphere bounds would be the equivalent?

I also do AABB culling, i'm using the AABB pn-vertex optimization (mentioned in the Lighthouse article), not sure how it would work in this case (not sure how to get the pn of a frustum as I could with an AABB).

Has anyone attempted doing something like the pn-vertex optimization for proper large AABB to frustum checking?

Any semi-optimized (like pn-vertex type things) implementations out there?

For large objects its quite important to do frustum culling in object space. World space aabb calculated by transforming object space aabb is quite bad for big or long and narrow objects.

Building frustum at object space from modelViewProjection matrix is cheap(planes does not even have to be normalized for this to work) and pn-vertex approach can be used too.

This topic is closed to new replies.

Advertisement