Export Heightmap Normal Texture With Details

Texture2D ExportHeightmapNormalTextureWithDetails(int resolution, bool enableHeightBasedBlend = false, float heightTransition = 0)

Similar method as ExportHeightmapNormalTexture, but includes painted layers normal maps too.

By default TerrainData object doesn't use Height Based Blend feature. This is optional feature for the terrain material and if exported texture needs to use it, then those values needs to be provided manually:

Material's height based blend values can be read using Terrain.GetMaterialHeightBasedBlendValues method.


Texture2D[] ExportHeightmapNormalTextureWithDetails(int resolution, int splitCountHorizontal, int splitCountVertical, bool enableHeightBasedBlend = false, float heightTransition = 0)

Splits terrain into 2D grid by splitCountHorizontal and splitCountVertical amount and for each chunk calculates HeightmapNormal texture with details.


Texture2D ExportHeightmapNormalTextureWithDetails(int resolution, int splitCountHorizontal, int splitCountVertical, int splitColumnIndex, int splitRowIndex, bool enableHeightBasedBlend = false, float heightTransition = 0)

Splits terrain into 2D grid by splitCountHorizontal and splitCountVertical amount and calculates HeightmapNormal texture with details for chunk with index splitColumnIndex and splitRowIndex.

Last updated