This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
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
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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.

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, 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 adjust the threshold for it, thus defining the suitable color 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 need to configure the output settings and generate (or regenerate) the terrain covered with vegetation by clicking the Generate button.

Last update: 2021-04-09
Build: ()