Mapdev:height: Difference between revisions
From Fightorder
More actions
mapdevinter>Flozi m 1cat |
m 1 revision imported |
(No difference)
| |
Latest revision as of 21:54, 23 February 2026
Height
The height of the terrain is generally defined with a greyscale displacement map with black representing the lowest point on the terrain and white the highest. The height of the terrain can also be modified in game via lua scripting.
| File:Mapdev-height.png | File:Mapdev-height-example.png |
| Example Height Map | Ingame Result |
|---|
Specification
mapinfo.lua
local mapinfo = {
...
smf = {
minHeight = 1000,
maxHeight = -300,
...
},
...
}
minHeight and maxHeight
Any values below zero are underwater, see Mapdev:water
Image File
| File Location | The height map is an intermediary file compiled into the SMF/SMT files using MapConv or MapConvNG. | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| File Format | Any that the Mapconv programs support | ||||||||||||||
| Colour Depth | 16bpp recommended, however 8bpp will work. | ||||||||||||||
| Channels | Greyscale | ||||||||||||||
| Resolution |
| ||||||||||||||
8 vs 16 bpp
These two images show the differences in prescision that the bit depth of the image makes. The effect has been exaggerated here for clarity.
| File:8bpp.png | File:16bpp.png |
| 8bpp | 16bpp |
|---|
+1 pixel
When each pixel represents a vertex you need one extra pixel than the number of quads you are attempting to represent
| Example |
Additional Information
ROAM terrain engine
- Official ROAM page
- Gamasutra has a nice article on ROAM
- various other implementations of LOD terrain