P-152: Virtual World Concept Update 134: Planet-sized Terrain: Part 13
I have made significant progress with the terrain’s floating origin system.
I have added and tested all of the distance calculations, and I can now move the player in world space and have that world space position influence the rendering of the terrain nodes. This means that the terrain “pages” as the player moves in world space, as expected.

14/07/2016 , 01:32:30 AM
Torque 3D MIT – P152

14/07/2016 , 05:41:18 AM
Torque 3D MIT – P152

14/07/2016 , 05:42:18 AM
Torque 3D MIT – P152
P152_DEBUG
14/07/2016 , 05:42:29 AM
Torque 3D MIT – P152
However, I have discovered a problem with my concept.
Currently, the process is:
The coordinates for the terrain nodes are in local space, so I scale these to world space (64-bit numbers).
I then get the distance from the center of each terrain node to the player, and cull everything further than a specified distance.
I then take the nodes that haven’t been culled, rescale them to 32-bit space, and apply the LOD subdivision to them.
The problem here is that when I scale to 32-bit space I am basically scaling the entire world to a radius of 10,000 units. Even though I have a floating origin system, I am essentially not using it.
As the player moves around the world in 64-bit space, the terrain in 32-bit space will update correctly, but that 32-bit terrain will have a radius of 10,000 units, which will not work.
What I need to do, is to cull all nodes not close to the player, as I am currently doing, but then, instead of scaling them to 10k and then subdividing them using LODs, I would subdivide the 64-bit nodes without scaling. The initial terrain mesh is low resolution, so each node is far bigger than 10k. If I continuously subdivide each node, and then continue to cull any nodes outside of the 10k boundary around the player, I should eventually end up with a finely detailed mesh containing only nodes within 10k of the player, which is exactly what I want.
These changes will hopefully not be too difficult to implement.


































