Re: [Algorithms] View Frustum Culling
Brought to you by:
vexxed72
From: Stephen J B. <sj...@li...> - 2000-09-07 14:43:20
|
On Thu, 7 Sep 2000, Tim Johnston wrote: > What is the best method for coarse bounding box frustum culling? Use bounding spheres instead? :-) http://web2.airmail.net/sjbaker1/frustcull.html > From what I can gather you either use axis aligned bound boxes > (AABBs) or oriented bounding boxes (OBBs), with OBBs having the > advantage of tighter fitting but need extra computations for the > culling process. I'm a fan of poorly fitting shapes and more efficient culling - if you can cull more efficiently, you can cull to a finer level which makes up for the poorer fit of the bounding volume to the shape. However, opinions are split - between spheres (which don't have to be axis-aligned), AABBs and OBBs. All three can work well for some applications and not so well for others. > Also which culling method is best, perspective > transform the BB and the view frustum to the perspective coordinate > system (which with AABBs can result in testing two AABBs which is just > 6 comparisons, however you have to transform all 8 vertices of the > AABB) or testing the BB against the 6 planes of the view frustum (which > seems much simpler and straightforward if that is all that is needed.) It depends on the application - I prefer to transform the object into the eye coordinates - but not do the perspective transform (which would make the frustum into a cube) because: * For spheres, you don't want to do a perspective transform because then they are non-spherical - and that's A Bad Thing. * If the object passes the test, you'll need it's eye coordinates anyway - so the work isn't all lost. You could also choose to transform the frustum into the coordinate system of your objects - that's better if a lot of objects are sharing the same coordinate space. > So is comparing AABBs against the frustum planes the best way to go... I think that there is no single 'best' approach if you know nothing about the nature of the application and its models. If you know something about the application then maybe you can find a good reason to go on particular way. ---- Science being insufficient - neither ancient protein species deficient. Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |