P-152: Virtual World Concept Update 70: Chunked Levels of Detail Using Quad Trees Part 38
I have done some debugging using the log files that I have generated, and it seems that the values that are in the renderlist are actually not what I expected. They don’t match the sequence of values that were generated at the beginning, which means something is definitely going wrong in the function to load the values into or out of the quad tree.
It seems that the loading function for the quad tree is loading the values from the beginning of the points list. This is a problem, because the quad tree loading function is a recursive function, meaning it does not process tier 1, then tier 2, then tier 3, etc. It actually steps through the nodes from one tier to the next and back again, processing all nodes in a more roundabout way.
I thought I had solved this problem with the way I was loading the nodes into the tiers, but it seems I have more work to do here.
There are a large number of extra verts in the final tier of the spherical terrain that are not being loaded into the renderlist. I believe this is because the code is loading the correct number of verts for the given tier, say, 64, for example, but it is loading those points from the wrong part of the points list.
When loading the quad tree, all of the points are stored linearly in a points list, so tier 1 is points 0-3, tier 2 is points 4 – 20, and tier 3 is points 21 – 85.
The code should be loading to and from tier 3 by working with the 64 points from 21- 85. However, if the indexing is wrong, it could load from 0 instead, and return points 0-64, which would fit the results that I am seeing.
I need to confirm that this is indeed what is happening, and then fix it, before I can progress with the prototype.
