P-152: Virtual World Concept Update 47: Chunked Levels of Detail Using Quad Trees Part 15
I believe I have come up with a solution to fix the issues that I have been having with the terrain paging. Currently, I am storing vertices individually, with each node in the quad tree storing one vertex.
This means that a single renderable polygon spans multiple quad tree nodes, so, my distance checking algorithm can return some of the vertices that form a polygon, but not all of them.
This means that the polys often render incorrectly, since the coordinates are, essentially, corrupted.
I have begun making code changes to my quad tree node that stores each polygon as the smallest element in the quad tree, instead of each vertex. Each polygon will have it’s own vector, containing the three points that it is made up of. The rest of the code will not change, except tthe quad tree will now be three times smaller (since a polygon stores three nodes).
This may cause efficiency problems, since the size of the quad tree will likely not change (the closest power of four to the number of polygons will be the same as the closest power of four to the number of vertices, even though there are now three times more empty nodes), but I will deal with the efficiency issues later.
Now, each polygon is either returned completely (all three vertices) or not at all. I think this will solve the rendering issues, and get terrain paging working. I can then get the final quad tree parsing optimisation done, and then move on to terrain scaling (I want to have truly massive terrains), terrain texturing, and other improvements.
