Frustum Box Intersection (again i know)

Started by
2 comments, last by KaiRohmer 10 years, 5 months ago

hi,

im currently working on frustum culling and looked for frustum-box intersection tests.

i found a tutorial appearing all the time: http://www.lighthouse3d.com/tutorials/view-frustum-culling/geometric-approach-testing-boxes-ii/

even here in the forum: http://www.gamedev.net/topic/512123-fast--and-correct-frustum---aabb-intersection/

during debugging some objects that should be culled were rendered so i looked deeper into it..

i made a picture to visiualize my problem..

[attachment=18629:FrustumBoxTest.png]

is it possible that the algorithm misses that case?

what is the common solution to address this? I'm fine with AABBs ;)

thanks

- Kai

Advertisement

Here's a pretty great -- and succinct -- article on doing this right: http://www.iquilezles.org/www/articles/frustumcorrect/frustumcorrect.htm

Yes, this special case will not be culled. A box needs to be outside one of the clipping planes/lines in its entirety to be able to be culled.

The reason this is not such a big deal is the further away the box from the camera is the larger it needs to be to satisfy the above "unclipable" conditions.

Likely, in practice only a few objects will fail this way, so it's often not worth it to write a more expensive test.

If you do want 100% correct results, the test would essentially become a convex overlap test. A separating-axis test can solve this.

Thanks for the confirmation, eppo ;)

to not increase the computation costs i decided to fit a bounding sphere around the frustum and test agist this first.

@raigan these are a lot of tests per box.. maybe there is a more optimized version of that method (i'll look into it if there is time and keep you posted)

This topic is closed to new replies.

Advertisement