P-152: Virtual World Concept Update 11: Spherical Terrain
I have made quite a good start with the spherical terrain. I have managed to create a cube using six terrain objects, and have learned how to deform those terrains using curves, and apply noise to those curves to generate terrain.
I now need to create an actual sphere. I have succeeded in creating a curved terrain object, but it is not spherical, and has visible seams at the edges. This will likely be the greatest challenge of the project, at least before I start working on terrain paging and very large terrains.
T3D’s terrain system, which I am basing my spherical terrain on, is very simple and easy to use. It is basicaly a list of vertices, and so terrain can be deformed very easily using the following code:
for ( S32 y = 0; y < blockSize; y++ )
{for ( S32 x = 0; x < blockSize; x++ )
{file->setHeight( x, y,999 );
}
}
Where “file” is a terrain file, and “999” is the desired height of that terrain pixel. Blocksize is the resolution of the terrain, so 256, 1024, etc.














