• Advertisement
Sign in to follow this  

Geomipmapping & QuadTree

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

Hellow to everyone. I searched everything and i can't find solution, so i need help.

What i'm doing is quadtree with geomipmapping, my texture size is 4097x4097, at depth 2 or at node size 512 i want create vertex buffer's, so i will have 16 vertex buffers with 512x512 vertices. Then i go deeper, each chunk is size 64 so 512/64 = 8 * 8 = 64 chunks per node. Total 4096 chunks, culling quadtree works fine, the problem is i don't know how the hell to create vertex buffer, or better which vertices to use for each node. I create this 16, vertex buffers separately, but i create them from left to right, and up to down. Then when some node is frustum area i don't know how to use correct vertex buffer. I was trying to use static int, and assign value to nodes at depth 3 and then use vertexbuffer[node.vbID], but that didn't go well, as my nodes are created in form topleft, topright, bottomleft, bottomright. I don't know how you guys choose correct buffer, but to have 4097x4097 vertices in one buffer don't go well. I'm trying to write function to correctly set vertex buffer id to each node. The values should be like this one on pictures... but i don't know how. I hope someone will understand what my problem is, and sorry for bad english. unsure.gif
image004.jpg

Share this post


Link to post
Share on other sites
Advertisement
Sorry I don't think I understand your problem.
It does not quite make any sense to me as laying out the vertices appears to be the simplest thing.

But anyway, here's how I would to it.
First, I'd restrict to terrains whose dimensions are a multiple of 4 (or 8) and have a finite number of mips (3 or 4), but it depends on total terrain size.
Then, I'd just allocate a single VB.
Then I'd just fill it sequentially.

Where is your problem?

Share this post


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

  • Advertisement