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
Tutorials

mesh_overlap_base

A mesh_noise_base material combines two materials, one of which is projected from above. For example, can be used to create stone material with moss, rust and corrosion atop. Can be applied to meshes, dynamic meshes and skinned meshes.

Mesh overlap material

A stone material with a moss material projected on it

States

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 divide into 2 groups: Passes and Options.

Possible values for an Ambient pass:

GUI name XML name Description
Skip none Material is not rendered.
Opacity opacity Material diffuse colors are blended with the ambient color.
Transparent transparent Material diffuse colors are not modulated by the ambient color.
LightMap lightmap Material is rendered lit by a light map. Material diffuse colors are multiplied by the light map and the ambient color. To create and automatically set a light map for an object, a Lightmap Generation Tool can be used.

Possible values for all the other passes:

GUI name XML name Description
Skip none Material is not rendered during the pass.
Default default Material is rendered during the pass.

All the options can be either enabled or disabled by ticking the respective boxes.

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

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

Passes

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

GUI name XML name Description
Deferred deferred Deferred rendering pass. Specifies if the material should be rendered during the deferred pass. For the transparent surfaces see also a Post deferred option.
Auxiliary auxiliary Auxiliary rendering pass. Specifies if the material should be rendered into the auxiliary buffer to create a custom post-process.
Ambient ambient Ambient rendering pass. Specifies, how the material should be rendered during the Ambient light pass for the opaque objects. The actual opacity or transparency of the material depends solely on the set blending options.
Light prob light_prob Probe lights rendering pass. Specifies, if the material should be rendered illuminated by the Probe light sources during the light and shadows rendering passes.
Light spot light_spot Spot lights rendering pass. Specifies, if the material should be rendered illuminated by the Spot light sources during the light and shadows rendering passes.
Light omni light_omni Omni-directional lights rendering pass. Specifies, if the material should be rendered illuminated by the Omni light sources during the light and shadows rendering passes.
Light proj light_proj Projected lights rendering pass. Specifies, if the material should be rendered illuminated by the Projected light sources during the light and shadows rendering passes.
Light world light_world World lights rendering pass. Specifies, if the material should be rendered illuminated by the World light sources during the light and shadows rendering passes.

Options

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

GUI name XML name Description
Global global Specifies if global coordinates should be used for projection of overlap material instead of local ones. If so, projection will be rendered on top no matter how the object is rotated.
Changed orientation Stone
Global option enabled: material always stays on top despite of node orientation
Substitute 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.
Substitute disabled Substitute enabled
Substitute option disabled
Substitute option enabled
Shadow shafts volumetric Specifies if volumetric shadows from world lights will be rendered from surfaces with the applied material.

Textures

In the Textures tab of the Materials Editor you can:

  • Load the textures - click a Load button near the texture and specify the path to the texture or type the path in the texture field manually
  • Open the view window to see texture's details - click a View button near the texture
  • Set the current texture to default one - click a Set to parent button near the texture (if the texture is different from the default one, its field will be highlighted with green)

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

Base Textures

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

GUI name XML name Description Channels
Mask mask A mask for an overlap material. Noise texture can be used as mask as well. R:
  • Black (R value = 0) areas - only base material will be shown
  • White (R value = 0) areas - only overlap material will be shown
Diffuse diffuse Diffuse map. A texture to define a surface's main color. 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 normal Normal map. A texture to store information about a surface's normals deviation. RG:
  • RG values contain two components of a normal
  • The third component's value is calculated from the given components in run-time
Specular specular Specular map. A texture to define a surface's shininess and highlight color. RGBA:
  • RGB values store reflection color and intensity (black color means no reflection)
  • An alpha (A) value specifies the specular power: 0 means specular highlights are very bright and intense, 256 - specular highlights are dull

Overlap Textures

Overlap textures are modified in the Overlap field of the Textures tab.

GUI name XML name Description Channels
Diffuse diffuse_detail Overlap diffuse map. A texture to define a surface's main color. 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 normal_detail Overlap normal map. A texture to store information about a surface's normals deviation. RG:
  • RG values contain two components of a normal
  • The third component's value is calculated from the given components in run-time
Specular specular_detail Overlap specular map. A texture to define a surface's shininess and highlight color. RGBA:
  • RGB values store reflection color and intensity (black color means no reflection)
  • An alpha (A) value specifies the specular power: 0 means specular highlights are very bright and intense, 256 - specular highlights are dull

Additional Textures

Additional parallax and emission textures are present only if an Ambient emission and Parallax mapping options are enabled and are modified in the Additional field of the Textures tab.

GUI name XML name Description Channels
Ambient ambient

Ambient map. 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 takes effect only if the scene environment texture is loaded.

RGBA:

  • RGB values store a glowing color
  • An alpha (A) value stores a glow mask: black is for non-glowing areas, white - for glowing ones

Second UV map channel.

LightMap Textures

Light map texture is present if a LightMap option is selected to be used during an Ambient pass. The texture can be loaded and modified in the LightMap field of the Textures tab.

GUI name XML name Description Channels
Lightmap lightmap Light map. A texture to store lighting information.

RGB:

  • RGB values store a color of the light
  • An alpha (A) value does not influence anything and is used solely for viewing convenience

Second UV map channel.

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

Parameters

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

Texture transformation parameters are modified in the Transform field of the Parameters tab. Detail materials transformation parameters are present only if the Detail option is enabled.

GUI name XML name Type Description
Base base_transform expression Base texture 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).

Mask mask_transform expression Mask 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.
Overlap overlap_transform expression Overlap 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.

Notice
Besides the native texture coordinates transformation, there are more options of setting texture coordinates. They are described in the Texture coordinates transformation article.

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.

GUI name XML name Type Description
Auxiliary auxiliary_color color A color picker to choose an auxiliary color for the Auxiliary rendering pass.

Mask Parameters

GUI name XML name Type Description
Valuemask_valueslider Masked value that defines visibility of the overlap material over the base one:
  • By the minimum value of 0, overlap material is rendered all over the surface (as if the mask is white)
  • By the maximum value of 1, only the base material is rendered (as if the mask is black)
Small Value for masking Big Value for masking
Low Value for masking
High Value for masking
Thresholdmask_thresholdslider The threshold is used for smooth blending between two materials:
  • By the minimum value of 0, there is no blending and the line between two materials is clearly visible
  • By the maximum value of 1, the transition line between two materials is smoothly blended
Low Threshold High Threshold
Threshold = 0
Threshold = 0.2

Angle Parameters

GUI name XML name Type Description
Angleangle_valueslider Controls if overlap material can be projected only on flat surfaces or on steep ones as well (surfaces should be faced upwards):
  • By the minimum value of 0, overlap material is projected onto available surfaces with any slope angle
  • By the maximum value of 1, overlap material is projected only onto flat surfaces
Zero angle Value High angle Value
Angle Value = 0 (all surfaces)
Angle Value = 0.7 (only flat surfaces)
Thresholdangle_thresholdslider The angle threshold allows to increase the slope for projecting overlap material. It can even be rendered on surfaces that face downwards.

The higher the Threshold value, the bigger the area of an overlap material.

Ambient Parameters

Ambient parameter is modified in the Ambient field of the Parameters tab.

GUI name XML name Type Description
Environment environment_scale slider Environment lighting scale. A coefficient to scale how much the global environment texture illuminates the surface.

The higher the value, the more the colors will be corrected (lightened or darkened) according to the environment component.

Lightmap Parameters

Light map parameter is present only if an LightMap option is set during the Ambient Emission rendering pass. The parameter is modified in the Lightmap field of the Parameters tab.

GUI name XML name Type Description
Scale lightmap_scale slider A coefficient to scale the intensity of illumination by the light map.

By the value of 0 the light map does not illuminate the surface with this material applied.

The higher the value, the more visible and the brighter a light map is.

Shading and Overlap Parameters

Shading parameters for the base texture are modified in the Shading field of the Parameters tab, for the overlap texture - in the Overlap field.

GUI name XML name Type Description
Diffuse diffuse_color color

A color picker to choose the color of the diffuse map.

Diffuse diffuse_scale slider A coefficient to scale the brightness of the diffuse map.

The higher the value, the brighter the diffuse map is.
Specular specular_color color

A color picker to choose the color of the specular map.

Specular specular_scale slider A coefficient to scale the brightness of the specular map reflections.

The default value of 1 grants the correct color. The higher the value, the brighter the specular reflections are.
Glossiness specular_power slider

A coefficient to modify size of the highlight (Phong lighting) 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
Phong rim width phong_rim_width slider A coefficient to modify the width of an additionally lightened rim of an object, where incident light is perpendicular to surface being lit:
  • By the minimum value of 0, there is no additional lightning of the rim by Phong shading
  • By the maximum value of 1, all the shaded area is lightened according to the scale parameter
Phong rim scale phong_rim_scale slider A coefficient to scale brightness of the additionally lightened rim at the edges of an object, where incident light is perpendicular to surface being lit:
  • By the minimum value of 0, there is no additional lightning of the rim by Phong shading
  • By the maximum value of 1, the shaded edges are the brightest
Fresnel bias fresnel_bias slider A coefficient to compensate for the Fresnel effect and set the minimum necessary reflectance level.

By the minimum value of 0, there is no compensation for the Fresnel effect.

Increasing the value leads to more prominent overall reflections.

By the maximum value of 1, reflections are at their maximum and the Fresnel power parameter does not influence the rendered image.
Fresnel power fresnel_power slider

A coefficient to scale Fresnel effect that defines the amount of reflectance depending on the viewing angle:

  • Low values provide good reflectance even at a large viewing angles
  • High values provide the reflectance only at a small viewing angles. When looking at a large viewing angle, from above, there are no reflections rendered
Last update: 2017-07-03