Unigine.Decal Class
Inherits from: | Node |
Decal class is used for base decals operation. To create, modify or get information on special types of the decals, use decal-related classes.
Decal Class
Properties
int IntersectionMask#
The current intersection mask of the decal. this mask can be used to cut out areas intersected by the decal from grass, mesh clutter and world clutter
(e.g. to remove grass or forest from the surface of roads projected using decals).
The areas will be cut out only if intersection masks of grass and clutter objects matches this mask (one bit at least).
int ViewportMask#
The current bit mask for rendering into the viewport. the decal is rendered, if its mask matches the camera viewport mask and the viewport mask of the decal's material.
float MinVisibleDistance#
The minimum visibility distance, starting at which the decal begins to fade in and then becomes completely visible.
float MinFadeDistance#
The minimum fade-in distance, across which the decal smoothly becomes visible due to the alpha fading. It is counted starting from the minimum visibility distance value.
float MaxVisibleDistance#
The maximum visibility distance, starting at which the decal begins to fade out until becomes completely invisible.
float MaxFadeDistance#
The maximum fade-out distance, across which the decal smoothly becomes invisible due to the alpha fading. It is counted starting from the maximum visibility distance value.
float Opacity#
The opacity for the decal in the [0.0f; 1.0f] range (1.0f - the decal is fully opaque). This parameter enables you to control whether the decal should be opaque or semi-transparent.
float Radius#
The current height of the projection box/pyramid along the z axis.
Material Material#
The material used for the decal.
Material MaterialInherit#
The Inherited material for the decal (i.e. creates a material instance). Modifications made in a new material instance will not affect the source material.
A child material will be created only once, all subsequent calls to this method will return the first created child material.
UGUID MaterialGUID#
The GUID of the material used for the decal.
string MaterialFilePath#
The path to the material file used for the decal.
bool CastBakedGlobalIllumination#
The value indicating if the decal is to be ignored when baking Global Illumination (lightmaps and probes). When enabled, the decal behaves the same way as surfaces with the Dynamic Lighting Mode selected: they are invisible for Voxel Probes and Environment Probes and are not baked into lightmaps.
Members
int IsMaterialInherited ( ) #
Returns the value indicating if a given material is inherited (instanced). Modifications made in a material instance do not affect the source material.Return value
1 if the material is inherited successfully; otherwise, 0.int IsTerrainHole ( ) #
Returns a value indicating if the decal is used to create a hole in the terrain.Return value
1 if the decal is used to create a terrain hole; otherwise, 0.int Inside ( vec3 p ) #
Returns a value indicating if the point with the given coordinates is inside the decal (in object-space).Arguments
- vec3 p - Point coordinates.
Return value
1 if the point is inside the decal; otherwise, 0.void SetCastBakedGlobalIllumination ( bool illumination ) #
Sets a value indicating if the decal is to be ignored when baking Global Illumination (lightmaps and probes). When enabled, the decal behaves the same way as surfaces with the Dynamic Lighting Mode selected: they are invisible for Voxel Probes and Environment Probes and are not baked into lightmaps.Arguments
- bool illumination - true to ignore the decal when baking Global Illumination (lightmaps and probes); false to bake the decal to lightmaps and probes.
bool IsCastBakedGlobalIllumination ( ) #
Returns a value indicating if the decal is to be ignored when baking Global Illumination (lightmaps and probes). When enabled, the decal behaves the same way as surfaces with the Dynamic Lighting Mode selected: they are invisible for Voxel Probes and Environment Probes and are not baked into lightmaps.Return value
true if the decal is to be ignored when baking Global Illumination (lightmaps and probes); otherwise, false.Last update:
2024-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)