Implementation of QuadTree Terrain on the planet (Geomipmapping)

I have a QuadTree that can be subdivided by putting objects into nodes. I also have a planet created in OpenGL in the form of a Quad Sphere. The problem is I don't know how to put them together. How does QuadTree store information about the Planet? Do I store vertices in Quad Tree leaf items? And if so, how do I split the vertex data into 4 sets without destroying textures and normals. If so, am I using indices instead?

So my short question is:

How to store vertex data in a square tree so that I can split the terrain on the planet so that the planet is more detailed in a closer range. I guess this is done with the camera as an object that breaks the nodes.

I have read many articles and most of them fail to cover this. Quadtree is one of the most important things for my application, as it will allow me to display many planets at the same time while maintaining good definition on land. Perfect picture of my planet and HD HD:  A pretty picture of my planet and it's HD sun!

A video of the planet can also be found Here.

I have managed to implement a simple square tree on a flat plane, but I keep getting massive holes as I think I have the wrong positions. This last post is here - http://www.gamedev.net/topic/637956-opengl-procedural-planet-generation-quadtrees-and-geomipmapping/ and you can get src there too. Any ideas how to fix this?

+3


source to share


2 answers


What you are looking for is an algorithm like ROAM (Real Time Optimal Adaptation) to be able to increase or decrease the accuracy of your model depending on the camera distance. Then the algorithm will use your quadrant.

Check out this series on gamasutra on how to visualize the Procedural Universe in real time .



Edit: The reason you use a quadrant with these methods is to minimize the number of vertices in areas where detail is not needed (like flat terrain). The parity definition on wikipedia is pretty good, you should use that as a starting point. The goal is to create child nodes in your quadrant where you have changes in your "height" (you can generate the sides of your cube using a heightmap) until you reach a predefined depth. Perhaps as a first pass you should try to avoid the quadri and use a simple grid. When you get this working, you "optimize" your process by adding a quadtree.

+1


source


To understand how quadrant and elevation data work together to achieve LOD rendering Read this article . Easy to understand with illustrative examples.



I once applied LOD to a sphere. The idea is to start with a simple bipyramid, the upper pyramid representing the northern sphere and the lower one representing the southern sphere. The bases of the pyramids coincide with the equator, the tips are at the poles. Then you split each triangle into 4 smaller ones as much as you like , connecting the midpoints of the triangle's edges. however much depends on your needs, the distance to the camera and the placement of objects can be your triggers for the unit

0


source







All Articles