UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine 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
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes

Generating Vegetation

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.

Vegetation such as trees and grass can be generated via Sandworm tool on the basis of landcover data available. Such data is added as Mask, and vegetation is spread across the mask guided by the tags.

Let's review the process of generating vegetation in detail.

1. Preparing a Basic Object#

  1. Create a basic object that will be used as a building block for generation of vegetation (grass, trees, etc.). The following types of basic objects are supported:
  2. Specify parameters of the basic object in the Parameters window.
    Notice
    Intersections with the parent object must be enabled for all types of basic objects. The Intersection flag can be found on the tab of the Parameters window corresponding to the type of the object.

  3. Inherit a material, set all necessary textures and parameters and assign it to the basic object.
  4. Export your node to a .node file (e.g. grass.node) and then delete the node from the world.

2. Adding a Mask Data Source#

  1. In the Sandworm window, Inputs panel, Mask section, click + Add Layer.
  2. In the Parameters panel, define the type of Data Source to be used: Assets or External Files and click Import.
  3. In the window that opens, select the landcover data source to be used as a mask. R8 and RGB8 mask textures are supported.

When the mask is added, its image is displayed atop all the layers in the Preview panel (the order of layers display may be changed), and the Mask layer parameters become available.

3. Specifying Tags and Vegetation Parameters#

  1. Add tags that will act as a filter selecting the areas from the data source for each type of landcover object you are going to generate. Click the Add button in the Tags window in the Parameters panel.

    Double-click on the tag to specify a tag name. To remove a tag use Remove button.
  2. For every tag, filters should be set to select certain data from the landcover data source. You can add as many filters as necessary. The following types of filters are available:
    • Indexed — select a particular color index from the list of available ones in the source raster image. You can also specify the color range by indices (from color to color).
    • Single Channel — select a channel of the source raster image.
    • Color — set a particular color taken from the source raster image and specify a threshold for it thus defining a range.
      Click the color to open the color settings

      Select the color from available or click Pick Screen Color to select the color from the image in the Preview panel
  3. Add an object to be used for generation by clicking the Add button in the Objects window. The dialog window will open:
  4. Set the following object parameters:
    Node The path to the basic mesh object's *.node file.
    Tag The tag for the selected landcover object from the list of created tags.
    You can add as many objects as nesessary.

If you introduce any changes into created objects, click Apply to update them immediately.

4. Generating Vegetation#

Now you can generate (or regenerate) the landscape covered with vegetation by clicking the Generate button.

Last update: 2020-11-19