Mapdev:height: Difference between revisions

From Spring
Jump to navigationJump to search
m added image location info.
Flozi (talk | contribs)
m 1cat
 
(4 intermediate revisions by one other user not shown)
Line 8: Line 8:
! Example Height Map !! Ingame Result
! Example Height Map !! Ingame Result
|}</center>
|}</center>
== Specification ==
= Specification =
=== mapinfo.lua ===
== mapinfo.lua ==
The relevant sections of the mapinfo.lua file that effect the height of the ground are in the [[Map_Making:mapinfo.lua#smf|SMF]] subtable
* [[Mapdev:mapinfo.lua]]
<code><pre>local mapinfo = {
<code><pre>local mapinfo = {
   ...
   ...
Line 20: Line 20:
   ...
   ...
}</pre></code>
}</pre></code>
=== minHeight and maxHeight ===
Any values below zero are underwater, see [[Mapdev:water]]


=== Image File ===
== Image File ==
* The height map is an intermediary file compiled into the SMF/SMT files using [[MapConv]] or [[MapConvNG]].
{| class="wikitable" width="100%"
* 8 or 16 bpp Greyscale
! width="15%" | 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
|<center>
{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
! Spring Map Size<sup>*</sup>
! Spring Map Size<sup>*</sup>
Line 44: Line 59:
|-
|-
| style="text-align: left;font-style:italic" colspan=2 | &#42; must be multiples of 2
| style="text-align: left;font-style:italic" colspan=2 | &#42; must be multiples of 2
|}</center>
|}
|}


==== 8 vs 16 bpp ====
=== 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.
These two images show the differences in prescision that the bit depth of the image makes. The effect has been exaggerated here for clarity.
<center>
<center>
Line 58: Line 74:
</center>
</center>


&#42; must be multiples of 2
=== +1 pixel ===
==== +1 pixel ====
When each pixel represents a vertex you need one extra pixel than the number of quads you are attempting to represent
When each pixel represents a vertex you need one extra pixel than the number of quads you are attempting to represent


<center>
{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
|[[File:Height_texture_map_vertex_example.png|256px|Example]]
|+ Representation
|-
|[[File:Height_texture_map_vertex_example.png|384px|Example]]
! Example
|}</center>
|}


== Additional Information ==
= Additional Information =
=== ROAM terrain engine ===
== ROAM terrain engine ==
* Official ROAM [http://www.cognigraph.com/ROAM_homepage/ page]
* Official ROAM [http://www.cognigraph.com/ROAM_homepage/ page]
* Gamasutra has a nice [http://www.gamasutra.com/view/feature/3188/realtime_dynamic_level_of_detail_.php article] on ROAM
* Gamasutra has a nice [http://www.gamasutra.com/view/feature/3188/realtime_dynamic_level_of_detail_.php article] on ROAM
* various other [http://vterrain.org/LOD/Implementations/ implementations] of LOD terrain
* various other [http://vterrain.org/LOD/Implementations/ implementations] of LOD terrain


[[Category:Mapdev]]
[[Category:Map Dev]]
[[Category:Development]]

Latest revision as of 21:13, 20 March 2013

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.

Example
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
Spring Map Size* pixels = Spring Map Size * 64 + 1
2 129
4 257
6 385
... ...
32 2049
* must be multiples of 2

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.

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

Representation
Example

Additional Information

ROAM terrain engine