Archived

This topic is now archived and is closed to further replies.

Frustum and bounding box

This topic is 5131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I''m writing a routine to determine the cull state for an object bounding box (OBB): The steps are: 1) If any OBB corner vertex is inside the frustum, then IN 2) Else if all OBB corner vertices are outside a single frustum plane, then OUT 3) Else if any frustum edge penetrates a face of the OBB, then IN 4) Else if any OBB edge penetrates a face of the frustum, then IN 5) Else if any vertex in the frustum is outside any plane of the OBB, then OUT, else IN The steps 3, 4 and 5 are not very fast. Does anybody know a fast method to make these steps? Thanks.

Share this post


Link to post
Share on other sites
First of all, OBB = oriented boudning box, not "object bounding box"
Secondly, there''s an outstanding article about frustum culling on gamedev, please search to see.

HTH,
K

Share this post


Link to post
Share on other sites
Hehehe, that''s the exact method used by the cull sample in the DX SDK right? I was just looking at that today... Well, for an OBB (and Khanh''s right, it''s Oriented Bounding Box, as opposed to Axis Aligned Bounding Box, etc.) you can try the Seperating Axis Theorem for the box and each of the frustum planes, and this is the fastest method I can think of right now. What it does, basically, is project (dot product) the plane and box onto a variety of axis, such as the three box axis, and the plane axis (though there are probably more axis, so check yahoo for it) and test if the projections overlap. The article here on gamedev.net is in the Features section and doesn''t deal with specific OBB issues, but it can help you speed up your frustum culling, as it describes some general optimizations.

Chris Pergrossi
My Realm | "Good Morning, Dave"

Share this post


Link to post
Share on other sites