This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Professional (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Materials and Shaders
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
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
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
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: 10.10.2022
Build: ()