P-152: Virtual World Concept Update 125: Planet-sized Terrain: Part 4
Upon further consideration, it seems that my idea for the realistic planet-size terrain won’t work properly. The reason for this is that even though the terrain is locked at 10,000 units, and it will continue to subdivide as the player gets closer, it’s actual size will not increase. It will still just be a 10,000 scale terrain. I need to find some way to divide the terrain into chunks, all of which combine to form a planet that is the same size as it would be in real life.
My new idea is to store the “true” position of the center and radius of the planet as a 64-bit float in the spherical terrain object. I will also store the actual position of the player (as a 64-bit float, or a fixed point set of coordinates). When the player is actually standing on the surface of the terrain, I will be able to use the “true” values to cull all nodes that are not within 10,000 units of the player. This should eliminate the texturing and rendering issues that I was having before. More importantly, however, it will allow me to move the player to a new position in world space every time they exceed the 10,000 unit limit, but keep their local coordinates the same (using the floating origin system).
This means that as the player moves through the world, different nodes from the terrain will be paged in and others paged out. This should work, although I am still unsure of how exactly I should implement this.
At long ranges, I will use the aforementioned scaling technique to handle terrain rendering. Switching back and forth between the two will be another challenge I will need to solve.