This page has been translated automatically.
Программирование
Fundamentals
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Orthographic Decal

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

Orthographic decals
Notice
This decals are always of the same size regardless of the projection box location relatively to the projection surface.

Orthographic projection is a form of parallel projection, where all the projection lines are orthogonal to the projection plane, resulting in every plane of the scene appearing in affine transformation on the viewing surface.

Orthographic Projection

Orthographic decals are the most reliable ones as projected from a surface and cannot cause unexpected artifacts (as may perspective projected decals).

Orthographic Projection Box

See Also

  • A DecalOrthoclass to edit orthographic decals via UnigineScript
  • A decal_basematerial to be applied to the decal
  • A set of samples located in the data/samples/decals/ directory:
    1. deferred_ortho_00
    2. deferred_ortho_01
    3. deferred_ortho_02
    4. deferred_ortho_03
    5. deferred_ortho_04

Creating an Orthographic Decal

To create an orthographic decal, perform the following:

  1. On the Menu bar, choose Create -> Decal -> Orthographic.

  2. Place the decal on the existing surface (for the decal to be projected, the projection box should intersect the surface) and specify the required settings:

    Placement of the Orthographic Decal

Editing an Orthographic Decal

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

A Decal tab of the Orthographic Decal Node

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.
Notice
You can specify a light mask and a decal mask in the decal_base material.

Projection Parameters

Parameters of the decal projection:

Radius The length of the projection box along the Z axis, in units.
Radius = 0.5
Radius = 1

The second case shows that the decal is projected only if its projection box intersects the surface.

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: 03.07.2017
Build: ()