Skip to main content
GameDev.net gamedev.net
🔒 Locked

Help Octree problem

Started by ECrevecoeur Aug 25, 2006 at 3:42 PM 3 replies 900+ views
Original Post
ECrevecoeur
ECrevecoeur
I have a problem where the bounding boxes of my octree are much larger than the fustrum and as a result when i do fustrum to bounding box collision it says the box is outside the fustrum. What is the most optimized way to fix this problem. If you want to see what im talking about visually here is a link. http://www.gamerpassion.com/Fustrum_Test.JPG
Matt Aufderheide
Matt Aufderheide
Im sure there are other ways to fix this, but why not do a test of the bounding box center point as well? That would be a simple enough test.
ECrevecoeur
ECrevecoeur
that would not work if the fustrum was much smaller than the world
ECrevecoeur
ECrevecoeur
i figure i should check to see if the cameras position is in the fustrum. Am i wrong?
Zakwayda
Zakwayda
With a properly implemented AABB vs. frustum test, the case you mention will be handled correctly. More generally, if the frustum is completely contained in the AABB the test will (correctly) return true, if the AABB is completely contained in the frustum the test will (correctly) return true, and if the AABB intersects the frustum but no corners of the AABB lie in the frustum, the test will (correctly) return true.

The correct algorithm is pretty easy to find online. Try googling 'frustum AABB intersection'.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.