#### Archived

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

# frustum culling, box outside but still inside

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

## Recommended Posts

I have setup frustum culling and it seems to work except for one simple case where all the points of a box are outside the frustum planes but the box is still inside the frustum. What would be the best way to check for this, would I have to calculate out faces and edges for frustum and box and check those (probably slow) or is there a better way of doing this? anybody have any samples of how to do this special check? thanks

##### Share on other sites
Use a sphere instead of box for objects bigger than the frustrum.

Alternatively, check for the center of the box if it is in the frustrum or not.

[edited by - Raduprv on May 9, 2004 4:44:55 PM]

##### Share on other sites
i have done both, sphere check also fails in that case and the center of the box isn''t in view either.

##### Share on other sites
Then check if the frustrum is inside the box...

also doing that

##### Share on other sites
actually checking the eye point, how do i check the whole frustum

##### Share on other sites
Well, basically, if all the box is outside the frustrum, but also inside of it then check for all the corners of the frustrum vs all the corners of the box...
Can you show a picture (ascii or something) to show the exact situation? (like where is the frustrum and where is the box).

##### Share on other sites
How exactly do you get the frustrum coordinates?

##### Share on other sites

The situation is something like the following, so all the points are outside and yet the box should be visible

 ______________  \            / .-\----------/--.|  \        /   ||   \      /    |.----\----/-----.      \  /        \/      (eye)

##### Share on other sites
Then you can try some hack like:
If the object is betwen the close and the far plan, check to see if it is larger than the frustrum, and if one of it''s corners is in the left, and another in the right (left and right of the line perpendicular to the farplane, from the eye)

1. 1
Rutin
68
2. 2
3. 3
4. 4
5. 5

• 11
• 9
• 21
• 10
• 33
• ### Forum Statistics

• Total Topics
633438
• Total Posts
3011880
• ### Who's Online (See full list)

There are no registered users currently online

×