This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
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
CIGI Client Plugin
Rendering-Related 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.

Terrain Global Details

Details serve to achieve realistic visual representation of the Global Terrain. It has the following concepts:

  • Base material - terrain_global_base is a basic material that is used to adjust various visualization and optimization parameters and control post processing effects for the whole global terrain. It's like a root layer, other layers will overlap (or overlay) above the base material.
  • Detail is a set of textures and parameters that is used for terrain visual representation. Details are organized in hierarchy and use detail masks. Hierarchy determines the order in which they are stacked on the terrain surface (overlap or overlay)
  • Subdetails have the same textures and parameters as details, but they use the mask of their "parent" and can generate own masks, based on parents'.

Detail is similar to material, it is a set of textures and parameters that are used for terrain visual representation: it adds details (rocks, grass, snow, etc.). Each detail has 4 textures:

  • Albedo texture is used to specify the color information (how the detail looks like)
  • Normal texture is used to specify the normals for light sources (how the detail will be lit)
  • Roughness texture is used to specify additional roughness effect of the detail
  • Height texture is used to specify the height of the detail (height of rocks, grass, etc.)

Detail Mask

A mask specifies the areas where to show the detail. There are two parameters you can use to specify a mask for the detail:

  • Mask - here you can select a mask from the list of detail masks generated by the Landscape Tool. A mask is a 1-channeled texture.
    Notice
    You can use the same mask for different details.
  • Mask by Albedo - here you can select a color of the imagery to be used as a mask. In this case all areas on the terrain having selected color will be covered by the detail.
    Notice
    You can click Pick Screen Color button and then click on any point on the terrain that has the desired color. Alpha value determines the color range to be selected.

Detail Textures

In the Layers tab, you can select the material and assign necessary textures to it.

Nodes Editor, Layers tab.

Albedo Texture

Albedo texture is used to specify the color information of the detail: here you should assign snow texture for snow, grass texture for green grass, etc.

  • Albedo texture - path to the albedo texture.
  • Color - albedo texture color multiplier.
  • Opacity - opacity of the albedo texture.
    Notice
    In the overlay mode, opacity values above 0.5 perform addition, below 0.5 perform subtraction.

Normal Texture

Normal texture is used to determine how the detail should be lit by light sources.

  • Normal texture - path to the normal texture.
  • Opacity - opacity of the normal texture.

Roughness Texture

Roughness texture is used to add roughness for the detail.

  • Roughness texture - path to the roughness texture.
  • Value - roughness value multiplier.
  • Opacity - opacity of the roughness texture.

Height Texture

Height texture is used to specify a hightmap for the detail.

Based on height texture, the terrain generates the material mask by using blending parameters: value, width and threshold.

  • Height texture - path to the height texture.
  • Displacement - maximum displacement value (which occurs at places where the displacement map is white). Higher values make the displacement effect more pronounced.
    Notice
    Displacement mapping ignores normals by default. To perform displacement along the local normals use the render_terrain_displacement_normal console command. Enabling this option may significantly reduce performance.
  • Displacement Offset - offset for displacement mapping. You can shift the whole displacement map up and down by adjusting this parameter in the [-1; 1] range.
    Notice
    Positive values will expand the surface while negative ones will shrink it. When a 0 shift value is specified dark pixels of the hight texture will expand the surface, while bright ones will shrink it.
    Offset = -1.0
    Offset = 0.0
    Offset = 1.0
Notice
If the height texture is 4-channeled, the terrain will use A-channel. In case of other textures (for example, RGB 3-channeled texture), it will use R-channel.

Texture Arrays

Albedo, normal and height textures for all details are stored in separate texture arrays. For each of the arrays you can specify texture size.

  • Array Albedo - array of albedo textures of the detail.
  • Array Normal - array of normal textures of the detail.
  • Array Height - array of height textures of the detail.
Notice
Texture arrays are not updated automatically. After making any changes to detail textures you should click Update Arrays.

Detail Parameters

You can specify the following parameters of the detail.

Common Parameters

  • Name - the name of the detail. When you change the name, it will be automatically changed in the hierarchy.
  • Enabled - enable or disable the detail.
    Notice
    Disabling a detail will automatically disable all its subdetails (if any).
  • Overlap - enable overlap blending mode.
    • Overlap mode for details is simply used for drawing them atop of terrain (without blending). Unlike Overlay, this mode is used to render details without any color alteration, for example, flowers, stones, etc.

    • If this option is disabled, the material is blended in the overlay blending mode. When detail materials are rendered in Overlay mode, the colors of the surface and detail material diffuse textures are blended.

  • Subdetail - use the mask of the parent detail.

    Each detail uses the mask generated by the Landscape Tool (or generates it's own mask by using own height texture with blending parameters based on the selected mask). A subdetail uses the mask of its "parent" detail (or generates it's own mask based on parent's mask).

  • Triplanar - enable or disable triplanar texture mapping for the detail.
    Notice
    When triplanar texture mapping is disabled, planar UV mapping is used instead. On the left picture below you can see that the texture gets stretched on steep faces.
    Triplanar texture mapping is off (planar UV is used instead).
    Triplanar texture mapping is on.
  • Triplanar Blend - this value adjusts blending between triplanar texture projections.

Visibility Parameters

Visibility settings are used to improve performance and reduce tiling effect.

  • Visibility Distance - this group of parameters can be used to set up LODs for details.
    • Min Visibility - the distance from the camera starting from which the detail begins to fade in until it becomes completely visible. The default value is -inf.
    • Max Visibility - the distance from the camera starting from which the detail begins to fade out until it becomes completely invisible. The default value is inf
    • Min Fade - over this distance the detail will fade in until it is completely visible. The default value is 0.
    • Max Fade - over this distance the detail will fade out until it is completely invisible. The default value is 0.
  • Visibility Height - this group of parameters is used for mask modulation. For the areas specified by the mask you can set up the range of heights, in which the detail will be visible.
    • Min Visibility - minimum height value starting from which the detail mask begins to fade in until it becomes completely visible. The default value is -inf.
    • Max Visibility - maximum height value starting from which the detail mask begins to fade out until it becomes completely invisible. The default value is inf
    • Min Fade - over this height range below the minimum height value the detail mask will fade in until it is completely visible. The default value is 0.
    • Max Fade - over this height range above the maximum height value the detail mask will fade out until it is completely invisible. The default value is 0.

Transformation Parameters

You can specify the following transformation parameters of detail textures. These parameters can be used to reduce texture tiling effect.

  • Size X - texture tile size along the X axis, in units. For example, after increasing the size from 10 to 100 each tile of the texture will now cover 100 meters of the surface along the X axis instead of 10 (the number of tiles along the X axis will reduce 10 times).
  • Size Y - texture tile size along the Y axis, in units.
Texture tile size is 100x100 units.
Texture tile size is 10x10 units.
  • Offset X - texture tile offset along the X axis, UV coordinates. For example, by the offset of 0.5 the texture is rendered as if its left corner is in the middle of the texture.
  • Offset Y - texture tile offset along the Y axis, UV coordinates.

Changing the offset value: 0 -> 0.1 -> 0.2.

Blending Parameters

Threshold, Width and Contrastparameters allow you to control the blending of the detail according to the mask.

Notice
All of the parameters are adjusted in the [0;1] range.

For example, we have the following mask and the following height texture of the material:

Detail's mask
Detail's height texture

The Threshold parameter controls the spread intensity of the layer. Lower values provide bigger spread.

Low value
High value

The Width parameter controls the width of blending. Higher values provide wider areas.

Low value
High value

The Contrast parameter controls smoothness of blending. Lower values provide smoother results.

Low value
High value

Hierarchy of Details

Details are stacked on the terrain in the order they appear in the hierarchy: the first detail in the hierarchy will be superimposed first on the terrain surface, the last detail in the hierarchy will be superimposed on the top of all others.

Adding a Detail

To add a detail, click the Add button in the Details group.

In the Details group, you can perform the following operations:

  • Add - add a new detail.
  • Remove - remove a selected detail from the list.
  • Clone - clone the selected detail.
  • Up - move the detail up in the hierarchy.
  • Down - move the detail down in the hierarchy.
Last update: 2017-10-20
Build: ()