L3DT documentation
Large 3D terrain generator

Choosing the right horizontal scale

One of the most important factors to consider when making a new terrain map is what horizontal scale to use. If your horizontal scale is too large, your terrain map will look very bland and undetailed, but if your horizontal scale is too small, your map will cover only a tiny area. On this page, I hope to provide some useful guidance on how to choose the right horizontal scale.

Horizontal scale and feature size

The horizontal scale of your heightmap determines the detail level of the terrain geometry. Basically, the smallest feature you can represent in your terrain geometry must be larger than the horizontal scale. For example, if you choose a horizontal scale of 1m, your heightmap geometry cannot represent any feature smaller than 1m (such as, for instance, a pot-hole in the road.)

As a general rule of thumb, I would recommend you use a horizontal scale about four times smaller than the dimensions of the smallest object you wish to represent in your terrain geometry.

What about world size?

Another factor to consider is what world size you want. If you choose a small horizontal scale, you will either have a very small world size (by this I mean square kilometres of area), or else have to make a very map (in terms of pixels) to produce a reasonable world size. For example:

  • A 1024×1024 pixel heightmap with a horizontal scale of 10m/pixel covers an area of 10km×10km.
  • The same 1024×1024 pixel heightmap with a more detailed horizontal scale of 0.5m/pixel would only cover an area of 0.5km x 0.5km.

The terrain with 0.5m/pixel will be much more detailed, but covers a total area 400x smaller than the 10m/pixel terrain. For the map with a horizontal scale of 0.5m to cover the same area as the 10m scaled map, it would need to be 20,480 x 20,480 pixels in size, which would make it ~400 times larger on disk.

What about size on disk?!

This brings me nicely to the problem of horizontal scale and disk size. If you choose a highly detailed horizontal scale, and want to cover a large geographic area, you will need a heightmap with a gigantic number of pixels. As an example of this, a correspondant (who shall remain nameless) wanted to make a map at FPS resolution (i.e. 0.5m horizontal scale), and wanted it to cover 350×350 miles. If you do the math, this means the heightmap would need to be approximately 1 million × 1 million pixels in size. Such a map would be larger than a terabyte on disk, and would not render in any currently available game engine.

The balancing act

The point of this discussion is to highlight the three-way battle between geometric detail, world size, and size on disk. Basically, you can choose any two of the three options below:

  1. A map with highly detailed geometry.
  2. A map that covers a large area.
  3. A map that is small on disk and quick/easy to render in 3D.

If you want all three options, you will need to invent new algorithms for terrain generation, representation, compression and display.

So, how do I choose the right horizontal scale?!

Different game genres require different levels of geometric detail. If you are making a first-person style of game, you will need highly detailed terrain geometry, because the camera will always be pretty close to the surface of the terrain. Conversely, a flight simulator can use much less detailed terrain geometry, because the camera will not spend much time close to the terrain.

The table below gives a simplistic guide to what sort of horizontal scales are required for different genres.

Game type Horiz. scale (metres)
First person shooter/role-player 0.2 - 2
Real-time strategy 5 - 50
Flight simulator 20 - 500

Note that I've given a range of values for each genre above. This is where your choice comes in. If you want more detailed geometry, you can use a smaller horizontal scale. However, please be aware that this will decrease your map's geographic area.

Comparison of scales

For some pictorial relief to an otherwise wordy tutorial, I present below some images of terrain generated with a range of horizontal scales, ranging from 0.1m per pixel up to 100m per pixel. In each image I have included a reference object of an 'army man', who in each image stands about 2 metres tall, or around 6ft 7in for those who prefer to imperial units.

Whist the map in each set of images is different, I have in each case used a 512×512 pixel heightfield with a 2048×2048 pixel texture. Aside from the difference in horizontal scale, the map generation parameters are otherwise identical for each of the four maps shown.

0.1m / pixel: extreme FPS territory

The images below were rendered from a heightfield with a horizontal scale of 0.1m per pixel (about 4 inches per pixel). Note that the terrain mesh is extremely detailed relative to the size of the character. This is much finer than you would normally need for any game genre.

100cm_tx.jpg 100cm_wire.jpg
0.1m / pixel (textured) 0.1m / pixel (wireframe)

Here, the 512×512 pixel heightfield covered an area of 51 x 51 metres (56 x 56 yards).

1m / pixel: typical FPS territory

The images below were rendered from a heightfield with a horizontal scale of 1m per pixel (about 1 yard per pixel). Note that now the terrain detail now appears to be reasonable for a first-person perspective. Generally I would recommend for an FPS that the horizontal scale is between 0.2m and 2m.

1m_tx.jpg 1m_wire.jpg
1m / pixel (textured) 1m / pixel (wireframe)

Here, the 512×512 pixel heightfield covered an area of 512 x 512 metres (560 x 560 yards).

10m / pixel: typical RTS territory

The images below were rendered from a heightfield with a horizontal scale of 10m per pixel (11 yard per pixel). The army man now appears a little small relative to the terrain triangle size. This level of detail would not be sufficient for first-person games, but is probably just fine for real-time strategy games.

10m_tx.jpg 10m_wire.jpg
10m / pixel (textured) 10m / pixel (wireframe)

Here, the 512×512 pixel heightfield covered an area of 5.12 x 5.12 kilometres (3.18 x 3.18 miles).

100m / pixel: flight simulators and not much else

The images below were rendered from a heightfield with a horizontal scale of 100m per pixel (110 yards per pixel). Whist this map now covers quite a reasonable area (51.2 x 51.2 kilometres, or 31.8 x 31.8 miles), the army man is now only a tiny speck. This sort of horizontal scale is only suitable for flight-simulators or other games where you don't get too close to the ground.

100m_tx.jpg 100m_wire.jpg
100m / pixel (textured) 100m / pixel (wireframe)

Here, the 512×512 pixel heightfield covered an area of 51.2 x 51.2 kilometres (31.8 x 31.8 miles).

Questions or objections?

If you have any questions, or dispute any of the assertions on this page, please reply to this forum thread.

l3dt/userguide/newmap/horizscale.txt · Last modified: 2017/08/31 05:32 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki