m. c. de marco: To invent new life and new civilizations...

Planets with libnoise

Libnoise is “a portable, open-source, coherent noise-generating library for C++,” with which you can generate random planets. Here’s a gorgeous example of what you can do using Terragen and Celestia for rendering the libnoise output.

To get something that complicated, you’d have to go through all the libnoise tutorials, but for a quick and dirty planet, try Tutorial 8: Creating spherical planetary terrain. Note especially that you can get a nice geographic projection for your fantasy mapping needs with just libnoise, without the later step of wrapping it around a sphere in Celestia.

For smaller maps, try Tutorial 3: Generating and rendering a terrain height map, which includes some basic lighting techniques. There’s also a tutorial on Creating a Terragen terrain file.