libnoise logo

A portable, open-source, coherent noise-generating library for C++


Example: Complex planetary surface

World map

This page shows an example of a complex planetary surface generated by libnoise. This planet has a size comparable to Earth. The noise modules that generate this planetary surface can create surface detail that has a maximum resolution of 7.5 meters.

This planetary surface has a wide variety of terrain features:

  • plains
  • hills
  • mountains
  • badlands
  • river valleys

This planetary surface is generated by a combination of over 100 noise modules:

Note: libnoise is not a renderer; it simply generates the terrain elevations using coherent noise. These images are rendered by separate applications.

Zooming in on the planet

This section shows several views of the planet taken at various zoom levels, starting from a point in space and ending at a point on the surface. Click on an image to show a higher-resolution picture.

First view of the planet

Planet at a distance of 20,000 km

Here is the planet at a distance of 20,000 km.

  • Renderer: Celestia 1.3.1 (Windows)
  • Terrain extent: entire planet
  • Camera elevation: 20,000 km
  • Terrain size: 4096 x 2048
  • Spatial resolution: 10.8 km

Getting closer to the planet

Planet at an altitude of 2,000 km

Here is a closer view of the planet at an altitude of 2,000 km. Mountain ranges (beige/white) are now visible in the foreground.

  • Renderer: Celestia 1.3.1 (Windows)
  • Terrain extent: entire planet
  • Camera elevation: 2,000 km
  • Terrain size: 4096 x 2048
  • Spatial resolution: 10.8 km

Orbiting the equator

Planet at an altitude of 116 km Map of planet at an altitude of 116 km

This equatorial view is taken from orbit an altitude of about 116 km. The sea near the flat coastline appears to be shallow, while the sea near the coastal mountain range (center) is deep and better defined. A much larger mountain range lies inland.

  • Renderer: Terragen 0.9.19 (Windows)
  • Terrain extent: SW corner = (N 0° / E 15°), NE corner = (N 15° / E 30°)
  • Camera position: N 01°24.375 / E 025°48.193' (looking north)
  • Camera elevation: 111,550 m
  • Terrain size: 2048 x 2048
  • Spatial resolution: 900 m

Mountain range near the coast

Mountains near the coast Map of mountains near the coast

Here is a view of the mountain range near the coast. Rivers can now be seen inside of the valleys.

  • Renderer: Terragen 0.9.19 (Windows): Sea level set to 850 meters to flood the river valleys.
  • Terrain extent: SW corner = (N 2° / E 22°), NE corner = (N 6° / E 26°)
  • Camera position: N 02°55.781' / E 024°44.414' (looking northeast)
  • Camera elevation: 9,650 m (10,500 m ASL)
  • Terrain size: 2048 x 2048
  • Spatial resolution: 240 m

The river valleys

River valleys Map of river valleys

Here is a closer view of one of the river valleys. The mountains and cliffs on both sides of the valley now show some detail.

  • Renderer: Terragen 0.9.19 (Windows): Sea level set to 650 meters to flood the river valleys.
  • Terrain extent: SW corner = (N 3° / E 24°), NE corner = (N 4° / E 25°)
  • Camera position: N 03°39.814' / E 024°45.088' (looking south)
  • Camera elevation: 800 m (1,510 m ASL)
  • Terrain size: 2048 x 2048
  • Spatial resolution: 60 m

Closeup of the cliffs

Closeup of the cliffs Map of the cliffs

Here is a closeup of one of the cliffs on the right side of the river.

  • Renderer: Terragen 0.9.19 (Windows): Sea level set to 1,111 meters to flood the river valleys.
  • Terrain extent: SW corner = (N 3°30' / E 24°30'), NE corner = (N 3°45' / E 24°45')
  • Camera position: N 03°39.075' / E 024°44.133' (looking southwest)
  • Camera elevation: 420 m (1,788 m ASL)
  • Terrain size: 2048 x 2048
  • Spatial resolution: 15 m

Ground level

Ground level Map of ground level

Finally, here is a view taken from ground level. This view also has some closeups of the mountains and cliffs.

  • Renderer: Terragen 0.9.19 (Windows)
  • Terrain extent: SW corner = (N 3°37.5' / E 24°37.5'), NE corner = (N 3°45' / E 24°45')
  • Camera position: N 03°42.828' / E 024°39.814' (looking southwest)
  • Camera elevation: 2 m (1,888 m ASL)
  • Terrain size: 2048 x 2048
  • Spatial resolution: 7.5 m

Interesting spots around the planet

This section shows views from some of the more interesting spots around the planet.

Desolated rocky area

Desolated rocky area Map of desolated rocky area

This view was taken from a desolated rocky area early in the morning

  • Renderer: Terragen 0.9.19 (Windows)
  • Terrain extent: SW corner = (S 34°15' / W 169°45'), NE corner = (S 34°07.5' / W 169°37.5')
  • Camera position: S 34°13.594' / W 169°42.217' (looking northeast)
  • Camera elevation: 2 m (1,716 m ASL)
  • Terrain size: 2048 x 2048
  • Spatial resolution: 7.5 m

Mountain range

Mountain range Map of mountain range

This view shows a large snow-covered mountain range with a forested valley below.

  • Renderer: Terragen 0.9.19 (Windows)
  • Terrain extent: SW corner = (N 50°37.5' / E 117°15'), NE corner = (N 50°45' / E 117°22.5')
  • Camera position: N 50°37.587' / E 117°15.117' (looking northeast)
  • Camera elevation: 222 m (1,854 m ASL)
  • Terrain size: 2048 x 2048
  • Spatial resolution: 7.5 m

Rocky cove

Rocky cove Map of rocky cove

This view was taken high above a rocky cove close to the equator.

  • Renderer: Terragen 0.9.19 (Windows): Sea level set to 0 meters
  • Terrain extent: SW corner = (N 2°45' / E 25°37.5'), NE corner = (N 2°52.5' / E 25°45')
  • Camera position: N 02°49.322' / E 025°41.822' (looking south)
  • Camera elevation: 811 m (1,866 m ASL)
  • Terrain size: 2048 x 2048
  • Spatial resolution: 7.5 m

Downloading the Source

To explore this planet on your own, download the example sources (43 KB) and compile complexplanet.cpp.

You'll also need to download the noiseutils library (32 KB) and add it to your project file or Makefile.

The source code for generating this planetary surface is released under the terms of the GNU General Public License. The noiseutils library is released under the terms of the GNU Lesser General Public License.

This program is quite slow. On an AMD Athlon 2000+ XP running Windows 2000, it takes about 25 minutes to generate a 2048 x 2048 map.

You can also download a 4096 x 2048 image of the planet (592 KB).

Note: You'll not be able to generate the exact planetary surface shown on this page with the current version of libnoise; this surface was generated by an earlier and flawed version. If you want to explore the exact same planet as shown on this page, you'll need to open noisegen.cpp, set the NOISE_VERSION constant at the top of the file to 1, and recompile libnoise.