A heightmap is a computer image that can be used to generate maps based on pixel brightness (See wikipedia).


Using Heightmaps

A heightmap can be considered a grayscale image where the brightest white (closest to #FFFFFF) is considered as the highest point of the map, and the darkest black (closest to #000000) is considered as the lowest point of the map. Look at the grayscale table below for more accurate info.

On a 1:1 image to map conversion, one pixel from the image file represents a corner of 4 tiles. Therefore, if you wish to lower/raise one whole tile, you need to make the 2x2 surrounding pixels brighter/darker.

Since edges of the map must be at sea level, at least one tile, the heightmap border can be seen as 2 pixels wide.

Supported file formats


Grayscale table

NOTE: Since r27010 OpenTTD has supported height levels of up to 255 (Including Sea Level); and the 8-bit palette is not forced into generating the 16 levels below. This table is therefore defunct when more than 16 height levels are enabled. The range of colours between levels now splits according to 255/n where "n" is the number of height levels specified in the settings... Or Value * height_levels / 255, (255 being the limit of an 8 bit value)...

hex elevation
00 - 0F 0m (sea)
10 - 1F 30m
20 - 2F 70m
30 - 3F 100m
40 - 4F 130m
50 - 5F 170m
60 - 6F 200m
70 - 7F 230m
80 - 8F 270m
90 - 9F 300m
A0 - AF 330m
B0 - BF 370m
C0 - CF 400m
D0 - DF 430m
E0 - EF 470m
F0 - FF 500m

External links