This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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.

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