This page has been translated automatically.
Programming
Fundamentials
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
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
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.

mesh_stem_base

A mesh_stem_base material is used to create stems for vegetation (for example, tree trunks and branches). Can be applied to static meshes and dynamic meshes.

mesh_stem_base

Stems

States

States

Material window, States tab.

In the States tab you can set rendering passes and available options. Enabling some of the states activates additional textures and parameters in the Textures and Parameters tabs respectively.

The states are divided into 2 groups: Passes and Options.

Rendering Passes

Passes specify during which rendering pass the material should be rendered. They are modified in the Passes field of the States tab.

Deferred

Deferred rendering pass. Specifies if the material should be rendered during the deferred pass. All lights influencing opaque objects are computed by means of deferred shading.

Auxiliary

Auxiliary rendering pass. Specifies if the material should be rendered into the auxiliary buffer.

Options

The following options are set in the Options field of the States tab.

Detail Blending

Specifies if additional detail textures with the specified UV channel will be provided for the material. Such textures allow to render unique details (such as dirt or worn spots).

  • Disabled - a detailed material is not rendered.
  • Overlay first - material is rendered in the Overlay mode: detail textures are blended with the base ones according to the first UV coordinates.

    The formula is: A + (B - 0.5) * k,

    Formula
    A + (B - 0.5) * k

    where A and B are base and detail textures correspondingly;
    k is an alpha blending coefficient that allows smooth interpolation between alpha values of base and detail textures.

    For example, if Alpha test option for material is disabled, k = base Alpha * detail Alpha.

  • Overlay second - material is rendered in the Overlay mode: detail textures are blended with the base ones according to the second UV coordinates.

Animation

Enables animation for stems. The available values are:

Shadow Shafts

Specifies if volumetric shadows from world lights will be rendered from surfaces with the applied material.

Without Shadow shafts With Shadow shafts
Disabled Shadow shafts
Enabled Shadow shafts

Textures

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

Textures

Material window, Textures tab.

Base Textures

Base textures are loaded and modified in the Base field of the Textures tab.

Diffuse Texture

Diffuse texture specified the color of the surface.

Without diffuse texture
With diffuse texture

The texture is 4-channeled (RGBA):

  • RGB values store a color of the texture
  • An alpha (A) value contains either transparency values or a detail mask
Notice
An alpha (A) value will store transparency values if an Alpha test option is enabled. Otherwise it will store a detail mask.

Normal Texture

Normal map is texture to store information about a surface's normals deviation.

Without diffuse texture
With diffuse texture

The texture is 2-channeled (RG):

  • RG values contain two components of a normal
  • The third component's value (B) is calculated from the given components in run-time

Specular Texture

Specular map is texture to define a surface's shininess and highlight color.

The texture is 4-channeled (RGBA):

  • RGB values store reflection color and intensity:
    • White color indicates that the area will be reflective
    • Black color indicates that there will be no reflections
  • An alpha (A) value specifies the specular power (Gloss):
    • White color indicates that specular highlights are very bright and intense
    • Black color indicates that the specular highlights are dull

Detail Textures

Detail textures are present if Detail option on the States tab is enabled and can be loaded and modified in the Detail field of the Textures tab.

An additional set of the textures to form a material layer. The set contains all the textures from Base textures group:

Additional Textures

Ambient Occlusion Texture

Ambient map is a texture to modulate the global environment illumination (when an object is lighter at the top from sky above, darker at the bottom from the ground below etc).

The texture uses only R-channel.

Auxiliary Texture

Auxiliary texture is used for auxiliary rendering pass.

Notice
The above textures with the _d (diffuse map), _n (normal map) and _s (specular map) postfixes in the name respectively, located in a folder named uncompressed, will be automatically compressed by the engine.

Parameters

Notice
Availability of some parameters depends on the set States field values.

In the Parameters tab you can set or modify base and additional parameters.

Parameters of different types are set in different ways:

  • expression - vector values can be set either in the field near the parameter or in the dialog window opened when double clicking this field
  • slider - the value can be set either by smoothly moving the slider of the scroll box or manually in the box near the parameter (if required, the value bigger than maximum one for the slider can be set)
  • color - the color can be chosen in the dialog window, activated after double clicking the color field

All the parameters can be set to default ones - click a Set to parent button near the parameter (if the parameter is different from the default one, its field will be highlighted with green).

The parameters available for this kind of materials are listed below.

Transform Parameters

  • Base - base textures coordinates transformation. A vector of the four float components, consisting of two pairs of vector elements:
    1. Scale texture coordinates, along X and Y axes.

      For example, by the scale of 2;2 the texture will be repeated four times on the surface.

    2. An offset of the texture respectively to its initial position along X and Y axes.

      For example, by the offset of 0.5 along X axis the texture will be repositioned to the right (so the left edge of the texture will be rendered in the center).

Transform vector is (1,1,0,0)
Transform vector is (4,4,0,0)
  • Detail - detail textures coordinates transformation. Detail texture native coordinates transformation. A vector of the four float components, consisting of two pairs of vector elements:
    1. Scale texture coordinates, along X and Y axes.
    2. An offset of the texture respectively to its initial position along X and Y axes.

Animation Parameters

Animation parameters are present only if an Animation state is enabled and are modified in the Animation field of the Parameters tab.

Stem Noise

Stem noise is coefficient to scale a spatial noise that diversifies the direction of movement of the vegetation stems.

Stem Offset

Stem offset is a coefficient to scale an amplitude of horizontal movement for the vegetation stems.

Stem Radius

Stem radius is a coefficient to scale an amplitude of vertical movement for the vegetation stems.

Stem Scale

Stem scale is a coefficient to scale the speed of vegetation stems movement.

Field Animation Parameters

This parameter is present only if the Field value is set for the Animation option on the States tab.

Mask

Field Mask is a mask that specifies an area of the animation field to be applied to stems. This mask must match the field mask of the animation field.

Auxiliary Parameters

Auxiliary color parameter is present only if an Auxiliary pass is set as a Default. The parameter is modified in the Auxiliary field of the Parameters tab.

Auxiliary color parameter is color picker to choose an auxiliary color for the Auxiliary rendering pass.

Detail Parameters

Detail parameters are present only if the a Detail option in the Options tab is enabled and a detail material is created.

Diffuse

Diffuse detail parameter is a coefficient to modify the visibility of the detail diffuse map:

  • By the minimum of 0, the detail diffuse texture is not visible at all
  • By the maximum of 1, the detail diffuse texture is fully appeared

Normal

Normal detail parameter is a coefficient to modify the visibility of the detail normal map:

  • By the minimum of 0, the detail normal texture is not visible at all
  • By the maximum of 1, the detail normal texture is fully appeared

Specular

Specular detail parameter is a coefficient to modify the visibility of the detail specular map:

  • By the minimum of 0, the detail specular texture is not visible at all
  • By the maximum of 1, the detail specular texture is fully appeared

Shading Parameters

Shading parameters are modified in the Shading field of the Parameters tab.

Prior Knowledge
Read about mesh_base materials specular workflow shading parameters

Normal Intensity

Normal is a coefficient to scale the intensity of the normals (provided by a normal map). The higher the value, the higher the normal texture effect is.

Diffuse

Diffuse is a coefficient setting the brightness of the diffuse texture. The higher the value, the brighter the diffuse texture is.

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 shading parameter coefficient to modify size of the highlight of the specular map:

  • Low values imitate wider highlights, typically appropriate to create diffuse reflection from the mat surface
  • High values imitate pinpoint highlights, typically appropriate to create uniform reflection of light rays from the glossy surface

Fibers

Fibers is a coefficient to scale the intensity of the fiber effect. The higher the value, the higher the fiber texture effect is.

Decal Mask

Decal mask parameter specifies decal bit-mask. If the decal mask of the decal material matches the surface material, the decal will be projected.

Last update: 2017-07-03
Build: ()