From 903536ea0b57700c832705233be45d28bde4a252 Mon Sep 17 00:00:00 2001 From: ZhugeBright Date: Sun, 16 Feb 2025 08:13:55 +0000 Subject: [PATCH] =?UTF-8?q?new=20page:=20zh/Manual/=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...253\230\345\272\246\345\233\276.mediawiki" | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 "Page/zh/Manual/\351\253\230\345\272\246\345\233\276.mediawiki" diff --git "a/Page/zh/Manual/\351\253\230\345\272\246\345\233\276.mediawiki" "b/Page/zh/Manual/\351\253\230\345\272\246\345\233\276.mediawiki" new file mode 100644 index 0000000000..ce81231f2a --- /dev/null +++ "b/Page/zh/Manual/\351\253\230\345\272\246\345\233\276.mediawiki" @@ -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] + +===例子=== + +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 + + +==灰阶表== + +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] \ No newline at end of file