This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
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
创建内容
Content Optimization
Materials
Art Samples
Tutorials

生成植被

警告
本文介绍的功能在 Community SDK 版本中不可用。
您应该升级到 Engineering / Sim SDK版本才能使用它。

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.树木和草地等植被可以根据可用的土地覆盖数据通过 Sandworm 工具生成。此类数据添加为 Mask,植被分布在由标签引导的掩码中。

Let's review the process of generating vegetation in detail.让我们详细回顾一下生成植被的过程。

注意
It is assumed that you have already added the data required for the terrain surface.假设您已经添加了所需的数据地形表面.

1. Preparing a Basic Object1. 准备一个基本对象#

  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.Parameters 窗口中指定基本对象的参数。

    注意
    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.必须为所有类型的基本对象启用与父对象的交集。 Intersection 标志可以在与对象类型对应的 Parameters 窗口的选项卡上找到。

  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.将您的节点导出到 .node 文件(例如 grass.node),然后从世界中删除该节点。

2. Adding a Mask Data Source2. 添加掩码数据源#

  1. In the Sandworm window, Inputs panel, Mask section, click + Add Layer.Sandworm 窗口、Inputs 面板、Mask 部分中,单击 + Add Layer

  2. In the Parameters panel, define the type of Data Source to be used: Assets or External Files and click Import.Parameters 面板中,定义数据源类型要使用的:AssetsExternal Files,然后单击 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.在打开的窗口中,选择要用作掩码的土地覆盖数据源。支持 R8RGB8 蒙版纹理。

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.添加蒙版后,其图像将显示在“预览”面板中所有图层的顶部(图层显示顺序可能会更改),并且 Mask 图层参数变为可用。

3. Specifying Tags and Vegetation Parameters3. 指定标签和植被参数#

  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 of the Parameters panel.Add标签它将作为一个过滤器,从数据源中为您将要生成的每种类型的土地覆盖对象选择区域。单击 Parameters 面板的 Tags 窗口中的 Add 按钮。

    Double-click on the tag to specify a tag name. To remove a tag use Remove button.双击标签以指定标签名称。要删除标签,请使用 Remove 按钮。

  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).Indexed — 从源光栅图像的可用索引列表中选择一个特定的颜色索引。您还可以通过索引(从颜色到颜色)指定颜色范围。

    • Single Channel — select a channel of the source raster image.Single Channel — 选择源光栅图像的通道。

    • Color — set a particular color taken from the source raster image and adjust the Threshold for it, thus defining the suitable color range.Color — 设置从源光栅图像中获取的特定颜色并为其调整 Threshold,从而定义合适的颜色范围。

      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:从可用颜色中选择颜色或单击 Pick Screen Color 以从 Preview 面板中的图像中选择颜色:

  3. Add an object to be used for generation by clicking the Add button in the Objects window. The dialog window will open:通过单击 Objects 窗口中的 Add 按钮添加要用于生成的对象。对话窗口将打开:

  4. Set the following object parameters:设置以下对象参数:

    Node The path to the basic mesh object's *.node file.通往基本网格对象*.node 文件。
    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.如果您对创建的对象进行了任何更改,请单击 Apply 以立即更新它们。

4. Generating Vegetation4. 生成植被#

Now you need to configure the output settings and generate (or regenerate) the terrain covered with vegetation by clicking the Generate button.现在你需要配置输出设置产生(或者再生) 通过单击 Generate 按钮覆盖植被的地形。

最新更新: 2021-07-09
Build: ()