Heightmap

From OpenTTD
Revision as of 20:10, 11 September 2014 by Debolars (Talk | contribs)

Jump to: navigation, search


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

Contents

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

Example

Grayscale table

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

Personal tools