Export Heightmap Texture
Texture2D ExportHeightmapTexture(int resolution = 0, bool EXR = true, bool remap = false)
Exports heightmap texture from TerrainData object.
If resolution property is set to 0, then exported texture size is read from the TerrainData.
EXR - Exports uncompressed Heightmap data. Has effect only if texture is saved into a file. For run-time use it has no effect.
remap - Remaps Heightmap data in the way that minimal value is always 0 (zero) and maximum 1.


Texture2D[] ExportHeightmapTexture(int resolution, bool EXR, bool remap, int splitCountHorizontal, int splitCountVertical)
Splits terrain into 2D grid by splitCountHorizontal and splitCountVertical amount and for each chunk calculates heightmap texture.
Texture2D ExportHeightmapTexture(int resolution, bool EXR, bool remap, int splitCountHorizontal, int splitCountVertical, int splitColumnIndex, int splitRowIndex)
Splits terrain into 2D grid by splitCountHorizontal and splitCountVertical amount and calculates heightmap texture for chunk with index splitColumnIndex and splitRowIndex.
Last updated