Sign in to follow this  
KaiRohmer

Frustum Box Intersection (again i know)

Recommended Posts

KaiRohmer    255

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

Share this post


Link to post
Share on other sites
eppo    4877

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. 

Edited by eppo

Share this post


Link to post
Share on other sites
KaiRohmer    255

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)

Edited by derKai

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this