P-152: Virtual World Concept Update 64: Chunked Levels of Detail Using Quad Trees Part 32
I have finally made a breakthrough with regards to the quad rendering.
As can be seen from the images below, I can now render an entire face of the quad sphere in quads, as opposed to tris.
The solution I used was to add six points to each node, instead of four, in order to draw two triangles, forming the quad. Using an index buffer would have been more efficient, and I may implement this technique in the future, but the system seems to work quite well as it is for now.
I used to have two loops in the code to create the geometry: One to create the list of points for each face, and another loop that would iterate through that list of points and rearrange them so that they had the correct “winding order” to be drawn.
This was obviously very inefficient, however, since this was being done only once (on loading the game) it wasn’t a major problem. I have since fixed this however, making the code much more efficient.
There is one minor bug in the code, and that is that the very last face of the quad sphere is not showing up. The loop seems to terminate one step too soon. The cause of this is rooted somewhere in the quad tree initialisation functions, and may take a little time to track down, but it should not be too difficult.
Once I have that bug fixed, I can copy my code changes to the other 5 faces of the quad sphere, and I should then be ready to move on to the next major step of the project: Generating multiple detail levels.











