shown in other instead.
A projected decal is a decal projected onto a surface by means of perspective projection. You can create an instance of the image projected onto a surface from a single point as a cone. These decals are of the same scale in spite of how far the surface they are projected onto is.
While orthographic projection ignores this effect to allow accurate measurements, perspective definition shows distant objects as smaller to provide additional realism.
- A DecalProj class to edit projected decals via UnigineScript.
- A set of samples located in the data/samples/decals/ directory:
Creating a Projected Decal
To create a projected decal, perform the following:
- In the Menu bar, choose Create -> Decal -> Projected.
- Place the decal on the existing surface (for the decal to be projected, the projection pyramid should intersect the surface) and specify the required settings:
Placement of the Projected Decal
Editing a Projected Decal
In the Decal Projected tab of the Parameters window you can adjust the following parameters of the projected decal:
Also the most commonly used parameters of the projected decal were placed in the Node tab:
Setting Bit Masks
A viewport bit-mask is available for the decal:
|Viewport||A viewport mask, specifying if the decal can be seen in the camera's viewport.|
Parameters of the decal projection:
|Radius||The height of the projection pyramid along the Z axis, in units.|
|Field of View||The field of view of the decal's projector, in degrees.|
|Aspect||The aspect ratio of the decal, in units.|
|ZNear||The value of the near clipping plane, ranging from 0 to 1.|
Life-time and fade-out parameters:
|Life time||A time period during which the decal will be projected, in seconds.|
|Fade time||A time period during which the decal will fade away (after its life time exceeds), in seconds.|
Parameters controlling decal's visibility depending on the distance:
|Min visible||A minimum visibility distance, starting at which the decal begins to fade in and then becomes completely visible, in units.|
|Fade||A 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, in units.|
|Max visible||A maximum visibility distance, starting at which the decal begins to fade out until becomes completely invisible, in units.|
|Fade||A 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, in units.|
Texture Coordinates Transformation
Decal's texture coordinates transformation (a texture atlas can also be used):
|ScaleX||A texture scale along the X-axis. For example, by the scale of 2 the texture is repeated twice on one decal.|
|TranslateX||A texture offset along the X-axis. For example, by the offset of 0.5 along the X axis the texture is repositioned to the right (so that the edge of the texture is rendered in the center).|
|ScaleY||A texture scale along the Y-axis.|
|TranslateY||A texture scale along the Y-axis.|
Setting a Material
A material selection:
|Material||A new material of the decal.|