TerrainLayerMaterial
Description
Settings for TerrainLayer objects of type TerrainLayerType.Material.
Public / Methods
Add
Adds the given material to this layer, replacing any existing one.
If the given material in is already present, the method silently returns.
AddAll
Adds the given materials to this layer, replacing any existing ones.
This method delegates to Add for each element in materials in.
Public / Attributes
Chunks
The material chunking coefficient.
The material chunking coefficient must be divisible by all material scale factors (i.e. global factor Scale multiplied with texture factor TerrainMaterialTexture.ScaleTexture).
The default value is 1
.
HeightBlend
Coefficients for height-based blending of materials.
Up to four materials are blend together when material-based texturing is used, according to their respective weights in the material token (see MaterialToken). To increase visual appeal, these blend weights may be adjusted, based on material displacement:
result = weight * pow(1 + (abs(height) + X) * Y, Z)
where weight
is the material token weight in the range [0..1] and height
is the material height, in terrain-space. X
, Y
and Z
are the components of this coefficient vector.
Scale
The global material texture scale, in terrain-space.
The scale of each terrain texture (see TerrainMaterialTexture.ScaleTexture and TerrainMaterialTexture.ScaleDisplacement) is multiplied with this value before being used for rendering.
The global scale is intended to be used for unit conversions.
Defaults to 1
.