Export Basemap Normal Texture

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

Bakes all terrain paint textures Normal maps into one Basemap texture.

packNormals - If exported texture is meant to be used in run-time, then this value needs to be false. If after exporting texture will be saved on the hard drive and used inside editor, then this property needs to be true.

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 ExportBasemapNormalTexture 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 BasemapNormal 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 BasemapNormal texture for chunk with index splitColumnIndex and splitRowIndex.

Last updated