This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Rendering
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Version Control
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
VR Development
Double Precision Coordinates
API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
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.

Adding a Mask

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

See Also#

Check this video from the series of video tutorials on the terrain generation using Sandworm:

A Mask can be useful in two ways:

  • Detail specifying where the additional features (such as rocks, sand, etc.) are located on the primary surface.
  • Mask to identify where to generate grass and trees.

You are already experienced enough to add an asset as a mask on your own. Let's add the asset sw_georeferenced/landcover/landcover_mask.tif and click Preview.

You can already click Create Mask, and this mask will be added to Terrain Sources. Any further changes you make in this source will be saved automatically.

Specifying Mask Filters#

Filters are used to pick specific data from the mask source. At least one filter is required to make the mask useful.

Let's add a filter: select the filter type.

We are going to use this mask to generate trees. Apparently, this area is marked green in the landcover data. We can set the filter either as Indexed, or as Single Channel and select the green value. In our case, the result will be identical.

Let's add one more source from the assets to this mask and set a color filter.

  1. In the same mask (i.e. don't create a new mask), click the Add Source(s) button and select Assets.
  2. Select the sw_georeferenced/img/sw_1mpx_img_6.tif file and click OK. The preview will be updated. Let's zoom in to this source in the Map.

  3. Set the filter type to Color and click on the white color to open the color settings.
  4. Click the Pick Screen Color button and click on the dark-green color on the preview.

    Click Apply to apply the picked color and OK to close the color settings window.

  5. Set Range to some value to allow for some color variation along the color palette.

This is it. Now if we generate trees using this mask they will be dispersed in the areas marked green and additionally in the dark-green areas of the added imagery.

Generated Mask#

The generated mask is available as a detail of the Terrain object:

Mask in Detail of Landscape Terrain

Mask in Detail of Terrain Global

To see how the mask is applied to the terrain, toggle it in Helpers.

The mask is also available for generating vegetation in Sandworm.

Mask in Vegetation Object

What Else#

  • Check the article on the mask for a more detailed description of parameters.
  • Read about configuring details of Object Landscape Terrain.
  • See the video tutorial on configuring details of Object Terrain Global.
  • Read about indexed colors, for example on Wikipedia.
Last update: 2023-12-19
Build: ()