P-152: Virtual World Concept Update 37: Chunked Levels of Detail Using Quad Trees Part 6
I have made some progress with the quad tree.
The main issue is still in generating the vertices for the spherical terrain in a way which is compatible with entry into the quad tree.
I have made progress with the spherical terrain code and the quad tree code, but they are still not compatible.
Ideally, what I need to do is generate multiple spherical terrains, each at a different detail level, and each containing a power of 4 number of vertices, 256, 1024, 4096, etc. These can then be loaded into the quad tree as they are. I can then parse the quad tree quickly, producing a list of vertices using the different detail levels (higher detail for closer vertices, lower detail for more distant vertices). These vertices would then be loaded into a vertex buffer for rendering.
However, I cannot generate power of 4 spherical terrains, since my spherical terrain are generated from a quadrilateralised spherical cube, or quad cube, which has six sides, meaning the number of vertices needs to be evenly divisible by 6.
My proposed solution is to use the same general technique, but instead use a power of 6 number of vertices that is as close to a power of 4 as possible, and then populate the rest of the quad tree tier with blank values. So, instead of using 4096, I would use 4092 (682*6 = 4092) and fill the 4 spaces with blank values. I would do this for all tiers. The blank spaces shouldn’t make a difference when I parse the quad tree, so it should work.
I am still having issues with this implementation, which are mostly due to changing the resolution of the terrain at each tier, and therefore, changing the number of vertices.
