Skip to main content
GameDev.net gamedev.net
🔒 Locked

Quadtree help...

Started by Jackthemeangiant Dec 1, 2001 at 7:26 PM 6 replies 500+ views
Original Post
Jackthemeangiant
Jackthemeangiant
I am trying to implement quadtrees into my terrain engine. I pretty much understand how they work and what not. But my questions is, do I accualy store the vertex information for my polygones in the Quadtree nodes? At the moment I have my vertex data in a 2 dymentional array like this: map->mapdata[width][height]->vertex[3]
David20321
David20321
Im actually using octtrees so it might be different but I think it would be more memory-efficient and would allow for more dynamic terrain etc. if you just store pointers to the various vertices.

-David-
python_regious
python_regious
What I have is a quadtree "manager" which holds the heightmap, then the quadtree only stores the indices for vertices that it holds.
If at first you don't succeed, redefine success.
Moshman
Moshman
I also use a method which stores only the indices in the quadtree, the Triangles are stored in a "TerrainBase" class.
3d kid
VolkerG
VolkerG
But if you store the vertex data in the nodes you can vary the resolution depending on the local behavior. In flat regions you wouldn''t need as many vertices as in a region with mountains. So if used wisely you could save memory.
python_regious
python_regious
Your talking about CLOD? Well, I''m applying that to my method too, using only the indicies of vertices in the quadtree.
If at first you don't succeed, redefine success.
python_regious
python_regious
But then you could just interpolate between LOD levels, which would reduce popping altogether. I read an article on "Geo-Mipmapping" which detailed how to do all of that. I just concentrating on getting my CLOD engine working first When you store actual vertices aren''t quite a number of those stored 4 times ( the corner of each of the terrain "cells" ), and even more twice ( the sides of each of the terrain "cells" ). That seems inefficient to me...
If at first you don't succeed, redefine success.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.