• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# View Frustum Culling Corner Cases

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1Ender1618  Members

Posted 03 January 2014 - 03:05 PM

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

### #2Álvaro  Members

Posted 03 January 2014 - 03:13 PM

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.

### #3kalle_h  Members

Posted 03 January 2014 - 03:18 PM

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

### #4Ender1618  Members

Posted 03 January 2014 - 04:57 PM

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?

### #5kalle_h  Members

Posted 03 January 2014 - 07:07 PM

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.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.