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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

mesh_noise_base

A mesh_noise_base material creates various procedural effects like foam, lava, etc. Can be applied to meshes, dynamic meshes and skinned meshes.

mesh_noise_base material

Noise material masked in a Threshold mode

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.

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.

Possible values for a Mask option:

GUI name XML name Mask Description
Skip disabled Mask is not used.
Multiply multiply The masking is done for diffuse and specular components in the following way (the same formula applies to the specular texture):

Final diffuse color = ((diffuse_0 + diffuse_1 - noise_threshold) * noise_scale) * mask

This mode is used to create lava, noise patterns on organics, etc. It allows to create holes and gaps of different color that differs from base diffuse colors:

  • In areas where alpha of the mask is equal to 0, mask color are multiplied by the diffuse colors (black mask areas are black; white mask areas don't affect diffuse colors)
  • In areas where alpha of the mask is equal to 1, non-modulated diffuse colors are rendered
Normal maps are not modulated by a mask.
Threshold threshold The masking is done for diffuse and specular components in the following way (the same formula applies to the specular texture):

Final diffuse color = (diffuse_0 + diffuse_1 - noise_threshold + mask * noise_threshold) * noise_scale

This mode is mostly used if diffuse textures are white or off-white, for example, to create foam, splashes, etc.

You can create interesting, splashy color transition using diffuse alpha together with mask alpha:
  • In areas where alpha of the mask is equal to 0, you can modulate Noise Threshold parameter
  • In areas where alpha of the mask is equal to 1, Noise Threshold will always be equal to 0 (no modulation)
Black mask areas don't affect diffuse colors. White mask areas lighten diffuse colors.

Normal maps are not modulated by a mask.

All the other 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.
Refraction refraction Specifies if the material should be rendered during the refraction pass. For transparent surfaces see also Post refraction option.
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 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
Mask detail Specifies which masking mode will be used.

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.

Noise material uses a double set of textures and one mask to additionally modulate their blending, if necessary:

  • Diffuse textures and specular maps are blended together using addition mode. After that, they can be modulated with a mask, if it is enabled
  • Normal maps are simply added together

Diffuse and Specular textures are added and modulated with Noise parameters. Normal maps are simply added.

Mask texure is present only if Mask mode is enabled in the States tab.

GUI name XML name Description Channels
Mask mask A mask to modulate base diffuse colors. RGBA
Diffuse 0 diffuse_0 Diffuse map for the first material. A texture to define a surface's main color.
Notice
The diffuse color is visible only if in a given pixel the alpha value is 0.5 or higher. Otherwise, non-blended diffuse color of the second diffuse texture is used.
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 0 normal_0 Normal map for the first material. 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 0 specular_0 Specular map for the first material. 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
Diffuse 1 diffuse_1 Diffuse map for the second material. 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 1 normal_1 Normal map for the second material. 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 1 specular_1 Specular map for the second material. 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
Notice
The above textures with the _d, _n, _s and _m 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.

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

    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.
If there are some base transformations, the final result for the first pair of coordinates will be multiplied with it, for the second - added to it's value.
Notice
If mask is disabled, transformations would not take an effect.
Noise 0 noise_0_transform expression Diffuse 0 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.
If there are some base transformations, the final result for the first pair of coordinates will be multiplied with it, for the second - added to it's value.
Noise 1 noise_1_transform expression Diffuse 1 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.
If there are some base transformations, the final result for the first pair of coordinates will be multiplied with it, for the second - added to it's value.

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

Mask parameters are present only if a mask mode is enabled and are modified in the Mask field of the Parameters tab.

GUI name XML name Type Description
Scale mask_scale slider A coefficient to define the fill factor for the final material:
  • By the minimum value of 0, all colors are pure black (for Multiply mask mode) or the mask is not active at all (for a Threshold mask mode
  • The higher the value, the larger area is masked to be visible
  • By the maximum value of 1, colors are non-scaled
Mask Scale = 1
Mask Scale = 1.7
Threshold mask_threshold slider A coefficient to modify threshold value, that is subtracted from mask colors. This parameter decreases the masked area:

By the minimum value of 0, the colors are non-modulated with Threshold.

For Multiply mask mode, base textures will be visible across a small area and nowhere else.

For the Threshold mask mode, non-masked areas are of their blended base colors, while the masked area with modulated color is smaller in size as the Threshold is higher.
Mask Threshold = 0
Mask Threshold = 0.2

Noise Parameters

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

GUI name XML name Type Description
Scale noise_scale slider Multiplier for the final diffuse and specular colors. It allows to lighten diffuse and specular colors:
  • By the minimum value of 0, the colors are pure black
  • The higher the value, the brighter the resulting colors are
  • By the value of 1, the colors are non-scaled
Noise Scale = 0.8
Noise Scale = 2
Threshold noise_threshold slider The threshold value is subtracted from the blended (added) diffuse and specular colors. It allows to darken them.

By the minimum value of 0, the colors are non-modulated with Threshold.

The higher the value, the darker and more dissolved the resulting colors are.
Noise Threshold = 0
Noise Threshold = 0.5

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.

Refraction Parameters

Refraction parameters are present only if Refraction pass option set as Default and are modified in the Refraction field of the Parameters tab.

GUI name XML name Type Description
Scale refraction_scale slider A coefficient to scale the refraction area.

By the value of 0 there is no refraction of the light for the material.

The higher the positive value, the more distorted the image behind the refracting material is.

Negative values invert the direction of distortion: the lower the negative value, the bigger a distortion is.
Power refraction_power slider A coefficient to scale the refraction post-processing power.

The higher the value, the brighter the reflection is.

Shading Parameters

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

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