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_base

A mesh_base material is a physically based material featuring PBR (physically-based rendering) and SSR (screen space reflections) technologies. It provides the realistic reflections and lighting model. The material is available in the Materials list and is used as the default one.

States

States

Material window, States tab.

Workflow

The main thing about the PBR material is a workflow. There are two workflows for Unigine PBR materials: Metalness and Specular. The specular workflow works with the old standard of textures that was used in the mesh_base material (diffuse, specular, gloss). Metalness works with the new standard of textures (albedo, metalness, roughness).

We've kept the Specular workflow to make it easier to upgrade your projects that have the old texture standard.

We strongly recommend to use Metalness workflow for creating materials in new projects: it uses a less number of texture channels, and parameters of the metalness workflow are more similar to material parameters of the real world.

By using the Workflow field you can specify the workflow of the material:

  • Metalness - with the new standard of textures.
  • Specular - with the old standard of textures.

Rendering Passes

All lights influencing opaque objects are computed by means of deferred shading (and a forward shading for transparent objects only). The only rendering pass that can come separetely from deferred is Auxiliary that is used for writing the contour of object with the specified material into an auxiliary color buffer. Detail information on the pass can be found here.

To enable the pass, check the Auxiliary option as Default in the Passes field of the States tab.

Options

States

Material window, States tab.

Emission

Emission activates an additional emission texture. It is used to simulates glow from extremely bright surfaces, therefore imitating real light sources and highlights. It can be used, for example, to simulate a glow of distant objects.

Light in windows simulated by Ambient emission

Shadow Shafts

Shadow shafts simulates visible volumetric shadows, arising when a bright world light source is partially obscured by the object.

Shadow shafts from the palm tree

Light Map

Light map activates an additional light map texture therefore specifying that the material will be rendered lit by it. Material color (diffuse or albedo) is multiplied by the light map and the ambient color.

Parallax Mapping

Parallax mapping activates an additional parallax texture to obtain the parallax or cutout effect.

Available options are:

  • Disabled - disabled.
  • Default - apply a parallax effect that provides a convex relief based on a parallax (height) texture.
    Disabled Parallax mapping
    Enabled Parallax mapping
  • Silhouette Cutout - apply a cutout effect that provides hard edges between the opaque and transparent areas.

Detail Blending

Detail Blending activates a set of textures (diffuse, normal, specular for the Specular workflow; albedo, normal and metalness for Metalness workflow) to form a material layer. It is applied for bringing detalization to the material.

Available options are:

  • Disabled - disables detail blending.
  • Overlay - depending on the base texture (diffuse or albedo) 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.
  • Multiply - the base texture (diffuse or albedo) color is multiplied by the detail texture color, resulting in darker colors. White pixels are not effected at all.
    Notice
    If detail textures are not visible enough in the resulting image, try increasing its color scale parameter (Diffuse or Albedo).
  • Lerp by mask - texture mask is used for blending base and detail materials selectively (the detail textures will be shown according to the mask).
    Notice
    This option replaced the old mesh_layer_base material.
  • Overlap (object transform) - overlap the base material by using the object transformation (detail textures will be rotated with the mesh). This option can be used to create stone material with moss, rust and corrosion atop.
    Base albedo texture
    Detail albedo texture
  • Overlap (world transform) - overlap the base textures by using the world transformation (no matter if you rotate the object, the detail textures will always be projected atop). This option can be used to create stone material with moss, rust and corrosion atop.
    Base albedo texture
    Detail albedo texture
    Notice
    These two overlap options (Overlap (object transform) and Overlap (world transform)) replaced the old mesh_overlap_base material.

Geometry Inflation

Geometry inflation allows you to apply an additional visual effect without real geometry changing. By using this option, you can create wires and balloons by specifying the type of inflation.

Notice
This option replaced the old mesh_wire_base material.

Available options are:

  • Disabled - disables geometry inflation.
  • Wire - wire type. It will bloat the geometry normals to provide more realistic wire depending on the distance to the mesh.
  • Balloon - balloon type. It bloats the geometry by specified constant.

Opacity Map

Opacity map indicates the alpha channel of which texture to use:

  • Diffuse or albedo - use the alpha channel of the main (albedo or diffuse) texture.
  • Normal - use the alpha channel of the normal map.

Object Space Normal Map

Object space normal map - normal mapping in object space (instead of tangent space).

UV settings

States

Material window, States tab.

These options specify which UV coordinates of the mesh will be used for textures.

Base Map

Base map option specifies which UV coordinates of the mesh will be used for base textures.

  • First UV - map the texture using the first UV coordinates of the mesh.
  • Second UV - map the texture using the second UV coordinates of the mesh.
  • Triplanar - map the texture without using UV coordinates of the mesh (textures are projected by using triplanar mapping).

Detail Map

Detail map option specifies which UV coordinates of the mesh will be used for detail textures.

  • First UV - map the texture using the first UV coordinates of the mesh.
  • Second UV - map the texture using the second UV coordinates of the mesh.
  • Triplanar - map the texture without using UV coordinates of the mesh (textures are projected by using triplanar mapping).

Ambient Occlusion Map

AO map activates an additional AO map texture.e for more realistic lighting.

Available options are:

  • Disabled - disables ambient occlusion mapping.
  • First UV - map the texture using the first UV coordinates of the mesh.
  • Second UV - map the texture using the second UV coordinates of the mesh.

Planar Reflections

States

Material window, States tab.

The mesh_base material has a dynamic planar reflection technique. The reflecting power of the material depends on some different materials parameters: metalness and roughness.

By using planar reflection options, you could create flat mirrors and flat dynamic reflective surfaces: parquet, flat varnished surfaces, etc.

Schematic representation of planar reflections

The engine renders dynamic reflections for planar reflection by computing the position of the reflection camera. Reflection camera represents a camera on the other side of the reflective surface: the distance from reflector to camera is the same for real camera and reflection camera.

Notice
For the purposes of optimization, shadows of the object will be shown even if the object won't be reflected due to reflection distance parameter. That because planar reflections re-use the shadows which we rendered for the real camera.

Planar reflections don't reflect each other: they render environment cubemap instead. Also, planar reflections miss post-effects.

Enabled

This option enables planar reflections. Ensure that the metalness shading parameter is not set to 0.

Map Size

Map size parameter specifies the size of the reflection map: the higher the value, the better the quality is.

Available sizes of the map are:

  • 128 - creates a reflection image with 128x128 resolution.
  • 256 - creates a reflection image with 256x256 resolution.
  • 512 - creates a reflection image with 512x512 resolution.
  • 1024 - creates a reflection image with 1024x1024 resolution.
  • 2048 - creates a reflection image with 2048x2048 resolution.
  • quart_height - creates a reflection image with the resolution height/4xheight/4, where height is an application window height.
  • half_height - creates a reflection image with the resolution height/2xheight/2, where height is an application window height.
  • height - creates a reflection image with the resolution heightxheight, where height is an application window height.

TwoSided

TwoSided option enables a two sided planar reflection.

Show Pivot

Show Pivot option shows the pivot plane, which shows the direction of reflective surface. By specifying the direction of planar reflection, you can create a reflection surface even if it was exported at an angle.

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.

Metalness Wokflow: Base Textures

Textures

Material window, Textures tab.

Albedo Texture

Albedo texture specifies the color of the surface.

Without albedo texture
With albedo texture

The texture is 4-channeled:

  1. RGB values store color information.
  2. An alpha (A) value stores transparency information:
    • White color indicates that the area will be visible.
    • Black color indicates that the area will be transparent.

Normal Map

Normal map stores height information required to achieve an effect of Normal Mapping (a technique creating the illusion of depth for adding details without using additional polygons). When calculating lighting of the surface, the mesh geometry is overridden by the normals value.

Without normal map
With normal map

The texture is 2-channeled:

  1. RG values store two components of a surface normal.
  2. B value is calculated based on the R and G values in run-time.

Metalness Texture

Metalness texture stores information about material's metalness and roughness in different channels:

  1. R value stores information about material's metalness:
    • White pixels indicate that material is metal.
    • Black pixels indicate that material is dielectric.

    The whole applied texture channel is white
    The applied texture channel is partially white (reflective areas) and black (non-reflective white splashes)
  2. G value stores information about material's roughness:
    • White pixels indicate that material is rough.
    • Black pixels indicate that material is smooth.
    Without the applied texture channel
    With the applied texture channel
Notice
Both Fibers and AO textures are available in metalness and specular workflows.

Specular Wokflow: Base Textures

Textures

Material window, Textures tab.

Diffuse Texture

Diffuse texture specified the color of the surface. It is lightened according to a Lambertian lighting model (light intensity is permanent regardless of the camera motion and rotation and depends solely on the angle between the surface and the light direction).

Diffuse texture

The texture is 4-channeled:

  1. RGB values store color information.
  2. An alpha (A) value stores:
    • Transparency information (if the Alpha test option is enabled):
      • White color indicates that the area will be visible.
      • Black color indicates that the area will be transparent.
    • Detail mask.

Normal Map

Normal map stores height information required to achieve an effect of Normal Mapping (a technique creating the illusion of depth for adding details without using more polygons). When calculating lighting of the surface, the mesh geometry is overridden by the normals value.

Diffuse map + Normal map

The texture is 2-channeled:

  1. RG values store two components of a surface normal.
  2. B value is calculated based on the R and G values in run-time.

Specular Map

Specular map stores the light reflectance information. It defines shininess and a highlight color of the surface. The lighting is calculated as a Lambertian lighting model plus a surface angle, light angle, and viewing angle dependent specular highlight (Blinn-Phong lighting model).

Diffuse map + Normal map + Specular map

The texture is 4-channeled:

  1. 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.
  2. An alpha (A) value specified the specular power (Gloss):
    • White color indicates that the specular highlights are very bright and intense.
    • Black color indicates that the specular highlights are dull.

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.

For the Specular workflow, the mask of the Detail textures set is specified in the Alpha channel (A) of its diffuse texture.

Notice
Detail textures are present when a Detail option is enabled.

Detail Blend Mask

Detail blend mask is a mask for two detail textures. Determines the way for two base and detail textures to be rendered.

The texture is 1-channeled:

  1. R values store information about which textures will be rendered:
    • Black areas - base textures will be shown.
    • Red areas - detail textures will be shown.

Additional Textures

Fibers Texture

Fibers texture creates an effect of napped surface. The lighter the pixel, the more napped material will be.

Without fibers texture
With fibers texture

The texture uses only R channel.

Ambient Occlusion Texture

Ambient occlusion (AO) texture modulates the global environment illumination, for example, when an object is lighter at the top from sky above, and darker at the bottom from the ground below.

Without AO texture
With AO texture

The texture uses only R channel.

Emission Texture

Emission map stores information about the light emission. It is blended additively over a texture, so areas which do not glow at all should be pure black on the glow map, and any brighter colors will appear to be emitting light.

Without emission texture
With emission texture

The texture is 4-channeled:

  1. RGB values store information about a glowing color.
  2. An alpha (A) value stores a glow mask:
    • White color indicates that the area will be glowing.
    • Black color indicates that the area is not glowing.

Lightmap Texture

Lightmap is a texture storing pre-computed light information. Usually is used for static objects. See the Lightmap article for more information.

Parallax Texture

Parallax map stores information about per-pixel parallax displacement.

The texture uses only R channel:

  • White color indicates that the pixels are not displaced.
  • Black color indicates that the pixels will be depressed farthest away.

Auxiliary Texture

Auxiliary texture is a texture that used for auxiliary rendering pass.

Parameters

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

Transformation Parameters

The tiling and offset for the textures set are set in the Transform field of the Parameters tab.

Triplanar transform parameters:

  • Base triplanar pow - a coefficient to scale the smoothness of interpolation between three projections.
    By the minimum value of 1, textures are interpolated as smoothly as possible.
    The higher the value, the more visible the line between projections and the narrower blended area is.
  • Detail triplanar pow - a coefficient to scale the smoothness of interpolation between three projections.
    By the minimum value of 1, textures are interpolated as smoothly as possible.
    The higher the value, the more visible the line between projections and the narrower blended area is.

Texture Coordinates Transformation

Texture coordinates transformation parameter is a vector of four float components, consisting of two pairs of vector elements:

  • Scale texture coordinates, along the X and Y axes.

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

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

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

Base Textures Shading Parameters

The group of parameters in the Shading tab contains options for base textures.

Metalness Workflow: Base Textures Shading Parameters

Albedo

Albedo is a multiplier of the base color of the surface provided by the albedo texture.

Different Albedo parameters for the white albedo texture
Metalness

Metalness is a multiplier of metalness.

Changing the Metalness parameter, from 0 to 1
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.

Roughness

Roughness is a multiplier of the roughness of a surface.

Changing the Roughness parameter, from 0 to 1
Normal Intensity

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

Changing the Normal parameter, from 0 to 1
Translucent

Translucent 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.

Translucent = 0
Translucent = 1
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.

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.

Specular Worklow: Base Textures Shading Parameters

Diffuse

Diffuse defines the base color of the surface.

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 (Phong shading). 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 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.

Translucent

Translucent 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.

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.

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.

Parallax

Parallax Height

Parallax height is a coefficient to scale the power of the parallax texture displacements. The higher the value, the bigger the normals are.

Parallax Step

Parallax step parameter specifies the step of the parallax mapping.

Auxiliary Color

Auxiliary color parameter specifies the constant color for the auxiliary pass.

Notice
The Auxiliary color parameter is present only if the Auxiliary pass is enabled.

Lightmap

Lightmap Scale

Lightmap scale is a coefficient to scale the intensity of the light map illumination. The higher the value, the brighter the illumination is.

Lightmap Gamma

Lightmap gamma is a coefficient to specify the gamma of the light map illumination.

Notice
The Lightmap parameter is present only if the Lightmap option is enabled.

Detail Textures Shading Parameters

Metalness Workflow: Detail Textures Shading Parameters

A set of the shading parameters for detail textures:

Notice
Detail parameters are present if a Detail option is enabled.
Albedo

Albedo is a multiplier of the detail color of the surface provided by the detail albedo texture similar to the base texture Albedo parameter.

Metalness

Metalness is a multiplier of metalness provided by the detail metalness texture similar to the base texture Metalness parameter.

Roughness

Roughness is a multiplier of the roughness of a surface similar to the base texture Roughness parameter.

Albedo Visibility

Albedo visibility specifies the influence of the detail texture albedo over the base texture albedo.

Metalness Visibility

Metalness visibility specifies the influence of the detail texture metalness over the base texture metalness.

Roughness Visibility

Roughness visibility specifies the influence of the detail texture roughness over the base texture roughness.

Normal Visibility

Normal visibility parameter specifies the influence of the detail normal texture normal over the surface.

Specular Workflow: Detail Textures Shading Parameters

A set of the shading parameters for detail textures:

Notice
Detail parameters are present if a Detail option is enabled.
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 is a parameter modifying the size of the highlight of the detail texture similar to the base texture Gloss parameter.

Diffuse Visibility

Diffuse visibility specifies the influence of the detail texture diffuse over the base texture diffuse.

Specular Visibility

Specular visibility specifies the influence of the detail texture specular over the base texture specular.

Gloss Visibility

Gloss visibility specifies the influence of the detail texture gloss over the base texture gloss.

Normal Visibility

Normal visibility parameter specifies the influence of the detail normal texture normal over the surface.

Emission

Color

Color is a color picker to choose a color multiplier for the emission texture.

Scale

Scale is a coefficient to scale emission texture intensity. The higher the value, the lighter and brighter light areas of the emission texture are.

Planar Reflection

The set of planar reflection parameters:

Mask

Mask specifies the viewport mask of the reflection camera.

Distance

Distance from the reflection camera to the object that will be reflected. In other words, the distance equals the distance from camera to the reflective surface plus the distance from object to reflective surface.

Pivot Rotation

Pivot Rotation specifies the rotation of the reflection pivot point.

Pivot Offset

Pivot offset specifies the position of the pivot point.

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