P-152: Virtual World Concept Update 10: Spherical Terrain
After much careful thought about the future of my virtual world concept project, I have decided that I need to at least make an attempt at implementing the holy grail of realism: Spherical Terrain. Spherical Terrain is exactly as it sounds, terrain which is in a sphere. This kind of terrain allows a developer to create realistic planets and moons, which can be viewed at any distance. Most terrain is flat, as this is the simplest to create and texture. However, flat terrain has some serious limitation for open world and virtual world games.
Firstly, and obviously, in a game which allows the player to build flying vehicles or structures which are high off of the ground, flat terrain may allow a player to see, or even reach, the edges of the terrain. This requires some kind of unrealistic mechanism to prevent the player from leaving the world, such as teleporting them to the other side of the map, automatically killing them for leaving the “play area” or even the dreaded “invisible wall”.
Secondly, flat terrain doesn’t allow for space games (unless some trickery is used in the surface to space transition). It also makes it difficult to use realistic world simulation code, such as simulating climate, terrain type, etc etc. Spherical terrain could have realistic orbits around a star, which could be tied in to a very realistic day/night simulation, as well as seasons, weather, climate, etc etc.
Spherical terrain, particularly for large worlds, is difficult. It involves a lot of paging data from the hard disk (only a small amount of the world can be stored in memory at once, so chunks of the world have to be constantly loaded and unloaded from memory), texturing has to be procedural (just TRY to load a texture big enough to cover an entire planet into photoshop!)
In general, the simplest method of making spherical terrain seems to be to create six normal, flat terrains, and arrange them into a cube, where each terrain meets at the seam of the adjoining terrain. Then, use a spherical mapping algorithm to map the cube terrains into a sphere. This is the concept, but I have a lot of research to do before I can even attempt to do this in practice.
