-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53254d0
commit 903536e
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
[[Translation:en/Manual/Heightmap]] | ||
|
||
{{zh/翻译|origin= en/Manual/Heightmap| from=en | to=zh | Percentage=0}} | ||
|
||
A '''heightmap''' is a computer image that can be used to generate maps based on pixel brightness (See [https://www.wikipedia.org/wiki/Heightmap wikipedia]). | ||
|
||
==使用高度图== | ||
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|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. | ||
|
||
===支持的文件格式=== | ||
* [https://www.wikipedia.org/wiki/Bitmap_Image BMP] | ||
* [https://www.wikipedia.org/wiki/PNG PNG] | ||
===例子=== | ||
<gallery> | ||
File:en/Manual/Heightmap img.png|If you would create heightmap from this file... | ||
File:en/Manual/Heightmap map.png|... this is what you would get | ||
</gallery> | ||
|
||
==灰阶表== | ||
|
||
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 | ||
|} | ||
|
||
==外部链接== | ||
*[http://www.tt-forums.net/viewtopic.php?t=27052 How To: Generate Superb Heightmaps :)] | ||
*[http://www.tt-forums.net/download/file.php?id=92633 Updated version (Jun 2008) of the HowTo by sootynz (Word Document)] | ||
*[http://www.tt-forums.net/viewtopic.php?t=29323 Heightmaps (available and on request) on the Forum] | ||
*[https://github.com/bunburya/bother Bother - a tool to generate heightmaps from real-world elevation data] |