This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Orthographic Terrain Decal

An orthographic terrain decal is a decal projected onto a surface by means of orthographic projection.

Notice
A decal of such type must be a child of the terrain object.

See Also

  • A DecalTerrainOrtho class to edit orthographic terrain decals via UnigineScript
  • A decal_terrain_base material to be applied to the decal
  • A set of samples located in the data/samples/decals/ directory:
    1. terrain_ortho_00
    2. terrain_ortho_01
    3. terrain_ortho_02

Creating an Orthographic Terrain Decal

To create an orthographic terrain decal choose an Add Terrain Decal option in the list of nodes in Editor panel. In the opened creation dialog window choose the Ortho tab and specify initial parameters:

Creation Window
Material A material of the decal.
Radius The height of the projection box along the Z axis, in units.
Width The length of the projection box along the X axis, in units.
Height The length of the projection box along the Y axis, in units.

After the initial parameters are set, press Ok button and place the decal onto the existing surface (for the decal to be projected, the projection box should intersect the surface).

Editing an Orthographic Terrain Decal

In the Decal tab you can adjust the following parameters of the orthographic terrain decal:

A Decal tab

Setting Options

A set of options for the decal:

Dynamic creation Indicates if a decal is created dynamically.
Two sided Indicates if a decal is two-sided.

Setting Bit Masks

A set of bit-masks available for the decal:

Decal A mask of the decal, specifying the objects onto which the decal can be projected.
Light A light mask, specifying light sources illuminating the decal.
Viewport A viewport mask, specifying if the decal can be seen in the camera's viewport.

Projection Parameters

Parameters of the decal projection:

Offset An offset of the decal towards the projection surface, in units.
Radius The length of the projection box along the Y axis, in units.
Width The length of the projection box along the X axis, in units.
Height The length of the projection box along the Y axis, in units.
ZNear The value of the near clipping plane, ranging from 0 to 1.

Life-time Parameters

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.

Visibility Parameters

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.
Last update: 2017-07-03
Build: ()