- Home /
Importing own splatmap for terrain
Hi,
I would like to ask, if anybody got an idea how to import my own splatmap? I used L3DT to create a heightmap and it also provides a splatmap for the different materials/textures on the terrain. Is there any way to import that one? Could not find any access to the terrain splatmap.
Thanks for help! Quen
Comment
Answer by kirpigiller · Jun 02, 2011 at 09:28 AM
TerrainData td = sourceTerrain.terrainData; SplatPrototype[] splats = td.splatPrototypes; float[,,] alphamap = td.GetAlphamaps(0, 0, td.alphamapWidth, td.alphamapHeight);
alphaMap - weight coefficient of splats splats - the Splat, where you can find, for example, splats[0..alphaLayers].texture - the filename of a splat texture.
td.SetHeights() - possibility of setting your own heightMap.