Heightmap
From OpenTTD
A heightmap is a computer image that can be used to generate maps based on pixel brightness (See wikipedia).
Contents |
[edit] 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.
[edit] Supported file formats
[edit] Example
[edit] Grayscale table
| hex | altitude |
|---|---|
| 00 - 10 | 0m (sea level) |
| 11 - 21 | 50m |
| 22 - 32 | 100m |
| 33 - 43 | 150m |
| 44 - 54 | 200m |
| 55 - 65 | 250m |
| 66 - 76 | 300m |
| 77 - 87 | 350m |
| 88 - 98 | 400m |
| 99 - A9 | 450m |
| AA - BA | 500m |
| BB - CB | 550m |
| CC - DC | 600m |
| DD - ED | 650m |
| EE - FF | 700m |
