P-152: Virtual World Concept Update 140: Planet-sized Terrain: Part 19: LOD’s (Tier 2)
It has turned out to be a lot more difficult than I thought to implement the additional Levels of Detail for viewing at close range.
I have tried various techniques, involving duplicating the existing LOD code (which is messy) and modifying it.
The main issue that I am having is in bridging the gap between 64-bit space (which deals with real world distances) and 32 bit space which deals with coordinates within the 10,000 unit limit, as defined by the floating origin system.
I have tried implementing all LOD’s using 64-bit numbers, but with these extremely high values, it seems that the border between all LOD’s is greatly exaggerated:

23/07/2016 , 01:21:17 AM
Torque 3D MIT – P152
P152_DEBUG
23/07/2016 , 12:54:16 AM
Torque 3D MIT – P152
This obviously does not work. It does further prove that the high-level subdivision (which I am calling “Tier 1”) is working, since adding further subdivision levels results in a terrain with vast features, ie, very high peaks, very deep valleys.

23/07/2016 , 01:00:44 AM
Torque 3D MIT – P152
Subdividing based on the 64-bit numbers should produce this, due to their high values. However, what I want to do is nodes which are within 32-bit space, and subdivide only those nodes, in 32-bit space, to produce a smooth terrain. When the player stands on, essentially the “North Pole” of the planet, these 10K nodes form a very neat shape, which makes visualising the subdivision a lot easier:

22/07/2016 , 08:26:02 PM
Torque 3D MIT – P152
I believe I am making progress with this. I have had to duplicate the subdivision code, which is not efficient, but my main goal now is getting the code to work, I can optimise it later. I have implemented partial “Tier 2” subdivision, but as the below images show, there are problems with nodes not rendering:

22/07/2016 , 09:13:23 PM
Torque 3D MIT – P152

22/07/2016 , 09:06:40 PM
Torque 3D MIT – P152

23/07/2016 , 12:27:51 AM
Torque 3D MIT – P152
I may actually be closer to a solution than these images portray, however.
It seems clear now that I will need to add another objective to my objectives list for MS2, which is to translate the 64-bit space node positions to 32-bit. Currently, the culling and Tier 1 subdivisions are being done in 64-bit space. I am then grabbing all nodes with a 10k distance of the player, however, these nodes are being rendered with their 64-bit positions, This is causing some z-fighting issues, and will need to be fixed. I have devised an algorithm to fix this on paper, but I haven’t implemented it yet.
I may also need to combine the 64-bit and 32-bit space positions of the player together, which would be another objective for MS2. Currently, the players position in 64-bit space is used to cull any nodes outside of 10,000 units, and the players 32-bit position is used to subdivide those nodes further to produce a smooth terrain. I may be able to handle the two position separately, I am not sure yet.

