This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
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
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
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
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.

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 the Sandworm tool based on landcover data available. Such data is added as a Mask, and vegetation is spread across the Mask guided by the tags.

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

Notice
The article assumes that you have already added the data required for the terrain surface.

1. Preparing a Primary Object#

  1. Create a primary object that will be used as a building block to generate vegetation (grass, trees, etc.). The following types of primary objects are supported:

  2. Specify parameters of the primary object in the Parameters window.

    Notice
    Intersections with the parent object must be enabled for all types of primary objects. The Intersection flag can be found on the tab of the Parameters window corresponding to the type of object.

  3. Inherit a material, set all necessary textures and parameters and assign it to the primary 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, Sources panel:

    • Clicking on Mask opens the window for adding slots. Slots are designed to organize data.
    • Clicking on + Add Layer provides the toolset for uploading landcover data.
  2. When adding a layer, 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 layers in the Preview panel (you may change the order of layers display by RMB click on a layer in the list of sources), and the Mask layer parameters become available.

3. Specifying Filters#

  1. Add filters that will select the areas from the data source for each type of landcover object you will generate. Click the Add button in the Filters window of the Parameters panel.

    Double-click on the filter to specify a filter name. To remove a filter, use the Remove button. You can add as many filters as necessary.

    The Share button allows shared use of the filter among Masks. Select the Mask that will share this filter in the pop-up window. Changes in a shared filter will be applied to it in all Masks.

  2. Select a slot from those created by you (Sources -> Mask).
  3. For every filter, set a type to select particular data from the landcover data source. 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 adjust the Range for it, thus defining the suitable deviation from the specified color within the range [0, 255].

      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:

4. Adding the object#

Now we need to set the object that will be distributed on the terrain according to the Mask.

  1. On the Sources panel, click + Add Object.

  2. In the drop-down, select the type of object you are going to generate according to the Mask. In our case, it is Vegetation. Click Import.

  3. Select the slot you have configured for the vegetation you are going to generate.
  4. Edit the name for your convenience. It will be displayed as a terrain mask in the terrain parameters.
  5. Add the prepared primary object as Node.

    Notice
    Keep in mind that the World Clutter object is generated only if Object Terrain Global is selected as the output format.

5. Generating Vegetation#

Now you need to configure the output settings and generate (or regenerate) the terrain covered with vegetation by clicking the Generate button.

Last update: 2022-03-10
Build: ()