Jump to content

  • Log In with Google      Sign In   
  • Create Account

frustum culling


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 bobatefrei   Members   -  Reputation: 122

Like
Likes
Like

Posted 27 June 2001 - 05:21 AM

How do I test if a box is visible or not? I need it for my terrain engine who use octree

Sponsor:

#2 stefu   Members   -  Reputation: 120

Like
Likes
Like

Posted 27 June 2001 - 09:59 AM

Your frustrum is defined by six clipping planes (near/far/left/right/top/bottom).
Dot product of a point and plane tells in which side of the plane point is. If one or more of these corners is inside the frustrum, it's atleast partially visible [edit](unless frustrum is reasonably bigger than your boxes).
Search for topics and you'll get a lot of topics conserning frustrum culling and plane equitations. There are much great topics. So did I too.

Edited by - stefu on June 27, 2001 5:02:13 PM

#3 Krippy2k   Members   -  Reputation: 134

Like
Likes
Like

Posted 27 June 2001 - 07:09 PM

Check this link:

http://www.cubic.org/~submissive/sourcerer/3dclip.htm

Tells you how to cull lines. To test if a box is completely outside of the frustum you can make 4 lines out of the box from opposite corners.




A___________B
|\ |\
| \ | \
| \________|__\
| |H | |G
|D_|________|C |
\ | \ |
\|__________\|
E F


Make these line segments:
A - F
B - E
C - H
D - G

Test these 4 lines against your frustum. If all 4 lines are outside then the entire box is outside.

Seeya
Krippy




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS