[Undergoing migration from GeoCities. Content not updated, links not verified.]
There are two general approaches to generating synthetic terrain,
either for use in a game or for rendering into pretty images
(or both). One is to use actually measured data of real portions of the
earth (or other planets), and another is to synthesize your own data. Either
way you end up (typically) with an array of elevations, known as a heightfield
(or displacement map, or depth map).
For real data, you'll typically get a
DEM (digital elevation map) in the
USGS (United States Geological Survey) format, or in formats
compatible with specific GIS packages.
For synthesizing your own, you can do one of these:
- Draw your own
- Since a heightfield is so much like an image, many people "draw"
landscapes using paint tools. Zero is the lowest height, and 255 (for
an 8-bit image) is the highest. This method gives you the most control
over your landscape, but you're limited to what you draw.
- Use a program
- There are several programs which can generate
and/or render height fields.
Once again, the terrain is generated beforehand, unless you make an
arrangement with the program's author to distribute the terrain tool
with your program.
- Roll your own
- Develop some code, either as a standalone utility or as a component
of your program, which can generate terrain. This is the most flexible
and potentially space-saving method, since your terrain can be represented
by formulas and code instead of multiple megabytes of storage, but there
is a time tradeoff. There are many, many methods of generating terrain
on-the-fly. I've grouped the ones I know about into the following categories:
- Subdivision ("plasma")
- Composition of functions
- Frequency synthesis
- Wavelet synthesis
- Noise synthesis
- Faulting and/or Collaging
- "Growing" or "Evolving"
- Physically-based or -inspired methods
- Plate tectonics
- Erosion and hydrology
- Other ad hoc methods
- Mix and match
- An interesting hybrid is mixing some actual, predrawn, or pregenerated
terrain data with terrain generated on-the-fly. This would typically be done
to enhance the predrawn terrain with additional detail.
For rendering your terrain (if you are not already using a rendering
package such as POV-Ray), the
3D Engines List
provides pointers to a large number of realtime rendering packages, many
of which are cheap or free. There is a subsection specifically for
engines which would be of particular interest.
Any of these fractals can be used for cloud patterns, although some
may look better than others.
Try doing some post-processing or digital filtering
on the heightmap to get some interesting effects.
Try calculating two of these fractals, using one for altitude and one
for rainfall, to cheaply calculate "climate". [Thanks to Stan Shebs,
developer of xconq.]
Most of these algorithms use a uniform random distribution or constants.
Try some other distributions (e.g. Gaussian normal) and see if the results
are more to your liking.
Looking for books about creating landscapes on the computer?
You can find some here!
Other terrain pages [Under construction]
- Planetside, a project in synthesizing realistic terrain
- Generating Random Fractal Terrain, by Paul Martz
- Terrain references
by the author of 'Wilbur'
- Landscape Series Index - articles about landscapes in games
© 1996,2011 email@example.com