Jump to content
  • Advertisement
Sign in to follow this  
mattm

Frustum culling ignoring the height

This topic is 4920 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

I have a large terrain split into a Quadtree. AS my quadtree has no understading of height i was wondering what the benefits of including a height term in my Frustum would be and whether not including one is an approach people would recommend adopting. If so has anyone else perfromed this and if not what would be your recommendations; i am thinking a bounding cube around each terrain section that will also include height, but i am not really sure. Thanks, Matt

Share this post


Link to post
Share on other sites
Advertisement
With height in the frustum, i assume you mean a top and bottom planes? If you do, you will need them. What if the camera is looking straight down into the ground? Then the far and near planes will actually point up and down. And the top and bottom planes will be on the sides. Just imagine a frustum pointing straight down.

So unless you have a camera that can only rotate around the Y axis, you will need the top and bottom planes of the frustum for intersection tests.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
1) When you are on a hill and you look to the front, you won´t see the hill itself.

2) When you look in the Sky, you won´t see the ground at all

3) When you look straight to the ground, you won´t see much of the ground :)

MFG

Share this post


Link to post
Share on other sites
I thought about it after and it was a bit of a stupid question, apologies. But, as my quadtress do not currently have a height value, how can i do a comparison in the height plane? Do i just assume a 0 to very hight hight (and therefore it will always intersect the height) or do i do rework my octree to include height?

Matt

Share this post


Link to post
Share on other sites
The difference between quad- and oct-trees is that you're not SPLITTING on the y-axis, although you're still using y-values for frustum culling.

Just add a y-value to each node and have the quadtree nodes scale to the largest height that they contain. Remember to scale parent nodes by checking min/max heights before passing objects to children in your Add function.

The problem with just setting the min and max heights to really small/large numbers arises if you make a distinction between something being fully in the frustum (i.e. you don't have to check its children) and something being part-in part-out, because every node will be "part-in part-out" on the y-axis.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!