Export Basemap Diffuse Texture
Texture2D ExportBasemapDiffuseTexture(int resolution, bool saveHolesInAlphaChannel, bool enableHeightBasedBlend = false, float heightTransition = 0)
Bakes terrain's all painted layers Diffuse maps into one Basemap texture.
saveHolesmapInAlphaChannel - If set to true, texture's alpha channel will contain holesmap's cutout values.
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:

Texture2D[] ExportBasemapDiffuseTexture(int resolution, bool saveHolesInAlphaChannel, 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 BasemapDiffuse texture.
Texture2D ExportBasemapDiffuseTexture(int resolution, bool saveHolesInAlphaChannel, 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 BasemapDiffuse texture for chunk with index splitColumnIndex and splitRowIndex.
Last updated