This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
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
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
Art Samples
Tutorials

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 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.

Notice
It is assumed that you have already added the data required for the terrain surface.

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, Sources panel:

    • Clicking on Mask opens the window for adding slots. Slots are designed to organize data into different terrain masks.
    • 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 the layers in the Preview panel (the order of layers display may be changed 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 are going to 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 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). Slots are designed to organize data into different terrain masks.
  3. For every filter, type should be set to select certain 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.

      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 basic object as Node.

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: 2021-09-30
Build: ()