Unigine.TerrainDetail Class
This class is used to manage details of the Landscape Terrain Object. Details, define terrain's appearance, each of them can have an unlimited number of children. Details are attached to detail masks are rendered in accordance with their rendering order (the one with the highest order shall be rendered above all others).
TerrainDetail Class
Properties
string Name#
Returns the name of the detail.
set
Sets a new name for the detail.
set value -
New terrain detail name to be set.
bool IsEnabled#
Returns a value indicating if the terrain detail is enabled.
set
Sets a value indicating if the terrain detail is enabled.
set value -
true to enable the terrain detail, false - to disable it.
bool IsActive#
Returns a value indicating if the terrain detail is active.
float MinVisibleHeight#
Returns the minimum height value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by height.
set
Sets the minimum height value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by height.
set value -
Minimum height value for the detail, in units. The default value is -inf.
float MaxVisibleHeight#
Returns the maximum height value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by height.
set
Sets the maximum height value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by height.
set value -
Maximum height value for the detail, in units. The default value is inf.
float MinFadeHeight#
Returns the current fade in height range for the detail. Over this height range below the minimum height value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by height.
set
Sets the fade in height range for the detail. Over this height range below the minimum height value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by height.
set value -
Fade in height range value for the detail, in units.
float MaxFadeHeight#
Returns the current fade out height range for the detail. Over this height range below the maximum height value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by height.
set
Sets the fade out height range for the detail. Over this height range below the maximum height value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by height.
set value -
Fade out height range value for the detail, in units.
vec4 MaskByAlbedo#
Returns the color currently used as a mask for the detail. In this case, all areas on the terrain having selected color will be covered by the detail.
set
Sets a new color to be used as a mask for the detail. In this case, all areas on the terrain having selected color will be covered by the detail.
set value -
Four-component vector (R, G, B, A) representing a new color to be used as a mask for the detail.
float MaskThreshold#
Returns a mask threshold value for the detail. Control blending of the detail according to the mask. The Threshold parameter controls the spread intensity of the layer. Lower values provide bigger spread.
set
Sets a new mask threshold value for the detail. Control blending of the detail according to the mask. The Threshold parameter controls the spread intensity of the layer. Lower values provide bigger spread.
set value -
New mask threshold value to be set in the [0; 1] range.
float MaskContrast#
Returns a current mask contrast value.
set
Sets a new mask contrast value.
set value -
New mask contrast value to be set in the [0; 1] range.
TerrainDetailMask DetailMask#
Returns the detail mask currently used for the detail.
set
Sets the specified detail mask to be used for the detail.
set value -
Detail mask to be used for the detail.
float MaxFadeTexelSize#
Returns the current fade out texel size range for the detail. Over this range below the maximum texel size value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by texel size.
set
Sets the fade out texel size range for the detail. Over this range below the maximum texel size value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by texel size.
set value -
Fade out texel size range value for the detail to be set, in units.
float MinFadeTexelSize#
Returns the current fade in texel size range for the detail. Over this range below the minimum texel size value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by texel size.
set
Sets the fade in texel size range for the detail. Over this range below the minimum texel size value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by texel size.
set value -
Fade in texel size range value for the detail to be set, in units.
float MaxVisibleTexelSize#
Returns the maximum texel size value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by texel size.
set
Sets the maximum texel size value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by texel size.
set value -
Maximum texel size value for the detail to be set.
float MinVisibleTexelSize#
Returns the minimum texel size value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by texel size.
set
Sets the minimum texel size value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by texel size.
set value -
Minimum texel size value for the detail to be set.
Members
void SetMinVisibleTexelSize ( float size ) #
Sets the minimum texel size value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by texel size.Arguments
- float size - Minimum texel size value for the detail to be set.
float GetMinVisibleTexelSize ( ) #
Returns the minimum texel size value for the detail, starting from which the detail begins to fade in until it becomes completely visible. This parameter is used to modulate the detail mask by texel size.Return value
Minimum texel size value for the detail.void SetMaxVisibleTexelSize ( float size ) #
Sets the maximum texel size value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by texel size.Arguments
- float size - Maximum texel size value for the detail to be set.
float GetMaxVisibleTexelSize ( ) #
Returns the maximum texel size value for the detail, starting from which the detail begins to fade out until it becomes completely invisible. This parameter is used to modulate the detail mask by texel size.Return value
Maximum texel size value for the detail.void SetMinFadeTexelSize ( float size ) #
Sets the fade in texel size range for the detail. Over this range below the minimum texel size value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by texel size.Arguments
- float size - Fade in texel size range value for the detail to be set, in units.
float GetMinFadeTexelSize ( ) #
Returns the current fade in texel size range for the detail. Over this range below the minimum texel size value the detail will fade in until it is completely visible. This parameter is used to modulate the detail mask by texel size.Return value
Fade in texel size range value for the detail, in units.void SetMaxFadeTexelSize ( float size ) #
Sets the fade out texel size range for the detail. Over this range below the maximum texel size value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by texel size.Arguments
- float size - Fade out texel size range value for the detail to be set, in units.
float GetMaxFadeTexelSize ( ) #
Returns the current fade out texel size range for the detail. Over this range below the maximum texel size value the detail will fade out until it is completely invisible. This parameter is used to modulate the detail mask by texel size.Return value
Fade out texel size range value for the detail, in units.Material GetMaterial ( ) #
Returns the detail material used for the detail.Return value
Material currently used for the detail.void SetMaterial ( Material material ) #
Sets a new detail material to be used for the detail.Arguments
- Material material - New material to be used for the detail.
int SetMaterial ( string name ) #
Sets a new detail material with the specified name to be used for the detail.Arguments
- string name - Name of a new material to be used for the detail.
Return value
1 if the material with the specified name was successfully assigned to the detail; otherwise, 0.int SetMaterial ( UGUID guid ) #
Sets a new detail material with the specified GUID to be used for the detail.Arguments
- UGUID guid - GUID of a new material to be used for the detail.
Return value
1 if the material with the specified GUID was successfully assigned to the detail; otherwise, 0.TerrainDetail Copy ( TerrainDetail dest_detail ) #
Copies the detail to the specified destination detail (with all its children).Arguments
- TerrainDetail dest_detail - Destination detail to which the detail is to be copied.
Return value
Destination detail.TerrainDetail Clone ( ) #
Clones the terrain detail (with all its children).Return value
Cloned detail.Last update:
2020-07-31
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)