Jump to content


Culling by Bounding Boxes


4 replies to this topic

#1 starboarder2001

    Member

  • Members
  • PipPip
  • 35 posts

Posted 18 August 2003 - 12:17 AM

I have been trying to figure this out for a while. How can i tell if a bouding box is in the view frustrum. I know how to tell if a point is infront of a plane...but how can you tell if the whole bounding box is infront of the plane? Right now i am just checking if the corners of the box are in the plane...it works but isnt accurate enough. Do you have any information on the subject??
1000
0100
0010
0001

#2 Dia

    DevMaster Staff

  • Administrators
  • 1089 posts

Posted 18 August 2003 - 02:38 AM

Check out:

MgcIntr3DBoxFrustum.cpp
MgcIntr3DBoxFrustum.h

Hope that helps.

#3 serious spaam

    New Member

  • Members
  • Pip
  • 6 posts

Posted 28 August 2003 - 09:46 AM

well, i am just checking all vertices of the box against each of the 6 planes of the view frustum.
if all vertices fall on the outside of a plane then the whole box is invisble.
that means if even if all vertices are outside the frustum the box still may be visible.

#4 davepermen

    Senior Member

  • Members
  • PipPipPipPip
  • 1306 posts

Posted 29 August 2003 - 07:36 AM

this is one of those situations where only one thing can help: PAP, Pencil And Paper.. and a bit of creativity..

this is a good situation to learn to solve problems yourself..

then again, some dude called marc wrote a great frustum culling tutorial once, with code.. dunno what his surname was, thought.. and don't have the link anymore
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....

#5 starboarder2001

    Member

  • Members
  • PipPip
  • 35 posts

Posted 01 September 2003 - 05:51 AM

I ended up culling entities by bounding spheres...It worked out pretty good. Allthough it is accurate enough for my entities....I am going to need to use bounding boxes for culling the quad trees. I am just going see if i can figure it out. Thanks :) :yes:
1000
0100
0010
0001





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users