Export Basemap Diffuse Texture

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

Bakes all terrain paint textures 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 converted terrain uses it, it needs to be manually set inside ExportBasemapDiffuseTexture method:

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.

This method can be used in combination with multi-chunk mesh exporter, in this case index of a mesh in 2D grid array and Basemap texture's, are the same.


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

circle-exclamation

Last updated