P-152: Virtual World Concept Update 100: Fractal Terrain Generation Part 6
After some careful thought, I believe I have correctly implemented the next part of the spherical terrain system.
The terrain is now rendering at low resolution until a given Level of Detail is reached. At that point, the code switches to a quad tree structure, which used a distance based check to render only nodes close to the player.
In addition to this, as the player gets closer to those nodes, they are further subdivided and new children are added and populated dynamically.
I have successfully tested this algorithm to a resolution of 16,384. Thats 8 tiers deep into the quad tree, and that is without optimisation, and with a hard coded view distance. I am seeing some framerate drops at this point, but I believe the main cause here is the view distance, since as the player gets closer, the view distance should decrease. If it remains constant, nodes are being subdivided that should not be.
The below images show the dynamic subdivision in action. I have not yet implemented the fractal midpoint displacement or 3D noise system to generate the new nodes, so I have just copied the parent nodes and changed the colour of one corner. The nodes with the red corner are at a higher resolution to the others.

These images show the number of nodes being subdivided increasing as the player gets closer to the planet surface. There is actually quite possibly several levels of subdivision going on here, but I can’t tell properly with the simple node colouring that I am doing. Once I add in the midpoint displacement, it should be more obvious whether this is working properly or not.

This image shows the clear separation between two levels of detail. I have offset the subdivided nodes here, the nodes with the red corner are at a higher resolution than the other nodes.
The two images below simply show the quadtree rendering without the subdivided nodes showing. The idea is to render the node at the current resolution if it is outside of the players view (as shown here) and subdivide it if it is within view (the black squares are the players view distance).
















