shown in other instead.
TerrainRelax is a console tool for baking flattened height maps.
Just like interactive Flatness option of the Terrain object, it allows to optimize rendering of level terrain areas by merging them into one large polygon. However, unlike Flatness option, baking the hight map with flattened polygons allows for proper intersections with the optimized relief. Grass, WorldClutter and WorldCluster will not have any visual artifacts when applied to the flattened terrain.
To invoke TerrainRelax, run terrainrelax_x86.exe (in Windows) or terrainrelax_x86 (in Linux) from a command-line console (the 64-bit version has x64 postfix).
How It Works
TerrainRelax tool works in the following way:
Command Line Options
The following command line options are recognized:
- -o NAME — name of the output file.
- -t THRESHOLD — height between the polygons (measured in in heights gradations rather then units). If the height difference between two polygons of the terrain is smaller or equal to this value, the polygons are merged into one. The higher the flatness threshold value, the larger terrain polygons are and the less detailed the relief is. The default is 0.
Height Map Formats
The following image formats are supported for height maps:
- Portable Network Graphics (PNG)
- PhotoShop Document (PSD)
- Direct Draw Surface (DDS)
An input height map can be in R8, RG8 or R16 format; the output image will be of the same one.
The syntax for Windows is:
terrainrelax_x86.exe OPTIONS FILE
The syntax for Linux is:
terrainrelax_x86 OPTIONS FILE
Type of an output file is determined based on its extension (see the -o option).
The following creates a flattened height map:
terrainrelax_x86.exe -t 32 file.png