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 TerrainDataarrow-up-right 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:

circle-info

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


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


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

Last updated