Jump to content
  • Advertisement
Sign in to follow this  
Ender1618

OpenGL View Frustum Culling Corner Cases

This topic is 2114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)?

 

Share this post


Link to post
Share on other sites
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. :)

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!