Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / Frustum Culling with Quad-Tree Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

May 18, 2005, 08:59 AM

I know some basic theory about it.
So I want to code what I know in my application.
But one thing I don't clear yet. Here is my question.
When I set each node in quad-tree, that node encompass all the objects within it.
So each node will be 3D. Is that right?

If so, it is possible that the node is visible, while terrain tile isn't visible.
Because not the tile but only the object on that tile is visible sometimes.
If that node is final, should I send it all including terrain tile for rendering?



May 18, 2005, 10:29 AM

Generally speaking, a quad tree is 2D but since you need to do frustum culling and such it really needs to be 3D for the math to work. So what I do in my quadtree is track what the highest and lowest objects are in the world and use those heights to turn the node rects into boxes for visibility checks.

In the terrain case, it is possible that the node that contains the terrain tile is visible(at least partially) while the terrain tile is not visible. I handle that by doing a box/frustum check (well, first sphere, then box if necessary) to see if the node is even visible. If the node is completely inside the frustum then I draw everything inside the node. If the node intersects the frustum then I do a vis check on each object in that node.


May 19, 2005, 03:05 AM

It helps me a lot.

This thread contains 3 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.