This page has been translated automatically.
Programming
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版本。

decal_base

A decal_base material creates coverings for decals.

Prior Knowledge
This article assumes you have prior knowledge of the following topics. Please read them before proceeding:

Common Material Settings

The decal_base material has some changes in common settings:

  • Transparent option is not available for Decals, because decals work only with deferred objects.
  • For alpha blending use blendoption inStates tab.
  • Alpha-test decal can't be rendered in separate buffers, it overwrite all the materials under the decal. It is pretty fast and can be used for roads, for example.
  • Render order option allows you to specify the order of decals.

See Also

  • Samples located in decals folder.

States

States

Materials editor, States tab.

Detail States

Detail Blending

Detail activates a set of textures (diffuse, normal, specular) to form a material layer. It is applied for bringing detalization to the decal material.

Available options are:

  • Disabled - disabled detail blending.
  • Overlay - depending on the base diffuse texture color, the base and detail textures colors are either multiplied (for dark color pixels) or screened (for light color pixels), which leads to the contrast increase while preserving highlights and shadows. Grey pixels are not effected at all. The blending is applied to the first UV coordinates of the mesh.
  • Multiply - the base diffuse texture color is multiplied by the detail texture color, resulting in darker colors. White pixels are not effected at all. The blending is applied to the first UV coordinates of the mesh.

Options

Blend

The Blend option allows you to select the type of material blending:

  • Alpha Blend - alpha blending mode.
  • Overlay - overlay blending.
  • Multiply - multiply blending.
This option allows you to blend certain parameter of the material (diffuse, normal, etc.).

Distance Fade

Distance Fade enables smooth fading depending on the distance to the surface where decal is projected. It activates Distance thresholdandDistance power

Angle Fade

When you enable Angle Fade option, the angle of the surface will have influence of the decal projection. Enabling this option activates Angle thresholdandAngle powerparameters that allow to modify the angle where the decal shouldn't be projected.

The angle threshold allows you to increase the slope for projecting overlap material. It can even be rendered on surfaces that face downwards.

Normal Substitute

Normal substitute specifies a rendering mode for normals. By default, normal maps of a base and overlapping material are combined together. with this option enabled, only normals of the overlapping material are used

Normal substitute off
Normal substitute on

Use Alpha of Diffuse

Use alpha of diffuse option indicates the alpha channel of which texture is in use.

  • Checked - use the alpha channel of the main (diffuse) texture.
  • Unchecked - use the alpha channel of the normal map.

Water Decal

In case of enabling the Water Decal option, decals are projected only on the top of the water surface. When the option is disabled, decals are displayed on the meshes overwater and underwater.

Water Decal option is disabled
Water Decal option is enabled

Textures

Availability of some textures depends on the set Statesvalues.

Textures

Materials editor, Textures tab.

Base Textures

Diffuse

Diffusetexture indicates the main color of the decal.

Diffuse texture applied
Diffuse texture applied (another angle view)

Normal

Normaltexture stores height information required to achieve an effect of Normal Mapping

Normal texture applied
Normal texture applied (another angle view)

Specular

Speculartexture stores the light reflectance information. It defines shininess and a highlight color of the surface.

Specular texture applied
Specular texture applied (another angle view)

Fibers

Fiberstexture creates an effect of napped surface.

Fibers texture applied
Fibers texture applied (another angle view)

Detail Textures

An additional set of the textures to form a material layer. The set contains all the textures from Base textures group, except for the Fibers texture.

Notice
Detail textures are present when a Detailoption is enabled.

Parameters

All of the parameters have set default values, which can be replaced by your own ones. Availability of some parameters depends on the set Statesfield values.

Transform

Materials editor, Parameters tab.
  • Base - base material coordinates transformation.
  • Detail - detail material coordinates transformation.

Shading Parameters

Materials editor, Parameters tab.

Diffuse

Diffuse - diffuse texture color. A color picker to choose the color of the diffuse map.

Specular

Specular is a color picker to choose the auxiliary specular color for the specular texture. It can be used for specifying different specular colors for one texture or modifying the texture color on the spot. The specular color of the texture and this color will be blended.

Gloss

Gloss is a coefficient modifying the size of the highlight. Low values imitate wider highlights, typically appropriate to create diffuse reflection from mat surfaces. High values imitate pinpoint highlights, typically appropriate to create uniform reflection of light rays from glossy surfaces.

Normal Intensity

Normal Intensity is an intensity of the relief of the normal texture.

Fibers

Fibers is a coefficient to scale the intensity of the fibers (provided by a fibers texture). The higher the value, the higher the fibers texture effect is.

Translucent

Translucent parameter is a scale of the translucency effect, which permits light to pass through the object, but diffuses it so objects on the opposite side are not clearly visible.

Decal Mask

Decal mask - decalbit-mask. If the decal mask of the decal material matches the surface material, the decal will be projected.

Visibility Parameters

Materials editor, Parameters tab.

Visibility parameters indicates the influence of different shading effects over the material on which the decal is projected.

Diffuse Visibility

Diffuse Visible - a parameter that specifies the influence of the diffuse of the decal over the surface material.

Specular Visibility

Specular Visible - a parameter that specifies the influence of the specular texture of the decal over surface material.

Gloss Visibility

Gloss Visible - a parameter that specifies the influence of the gloss of the decal over the surface material.

Fibers Visibility

Fibers Visible - a parameter that specifies the influence of the base fibers texture of the decal over the surface material.

Translucent Visibility

Translucent Visible - a parameter that specifies the influence of the translucency effect of the decal over the surface material.

Normal Visibility

Normal Visible - a parameter that specifies the influence of the normal texture over the surface material.

Detail Textures Parameters

Materials editor, Parameters tab.

A set of the shading parameters for detail material textures:

Diffuse

Diffuse - is a multiplier of the detail color of the surface provided by the detail diffuse texture similar to the base texture Diffuse parameter.

Specular

Specular - is a color picker to choose the auxiliary specular color for the detail specular texture similar to the base texture Specular parameter.

Gloss

Gloss - a parameter modifying the size of the highlight of the detail texture similar to the base texture Gloss parameter.

Diffuse Visibility

Diffuse Visible - a parameter that specifies the influence of the detail texture diffuse over the base texture diffuse.

Specular Visibility

Specular Visible - a parameter that specifies the influence of the detail texture specular over the base texture specular.

Gloss Visibility

Gloss Visible - a parameter that specifies the influence of the detail texture gloss over the base texture gloss.

Normal Visibility

Normal Visible - a parameter that specifies the influence of the detail normal texture over the base texture.

Notice
Detail parameters are present if a Detailoption is enabled.

Fade Parameters

Materials editor, Parameters tab.

Angle Threshold

Angle threshold is a threshold angle value. A coefficient to scale a threshold angle for projected overlap materials. The lower the value, the bigger area is rendered.

Angle Power

Angle Power - Angle fade power, indicates the intensity depending on the angle.

Distance Threshold

Distance Thresholdis a coefficient to scale a threshold fade for projected overlap materials. The higher the value, the bigger area is rendered.

Fade threshold =0
Fade threshold =1
Fade threshold =2

Distance Power

Distance Power a coefficient that shows the converse intensity of decal depending on the distance. The lower the power value, the bigger area is rendered.

Fade power =0
Fade power =1
Fade power =2
Last update: 2017-07-03
Build: ()