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
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

生成植被

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

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

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

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

1. 准备一个基本对象#

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

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

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

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

  1. In the Sandworm window, Sources panel:Sandworm 窗口、Sources 面板:

    • 点击 Mask 打开添加插槽的窗口。槽被设计成将数据组织到不同的地形掩模中。
    • Clicking on + Add Layer provides the toolset for uploading landcover data.点击 + Add Layer 提供了上传土地覆盖数据的工具集。
  2. When adding a layer, define the type of Data Source to be used: Assets or External Files and click Import.当添加一个层,定义数据源类型要使用的: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 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.添加蒙版后,其图像将显示在“预览”面板中所有图层的顶部(图层显示的顺序可以通过鼠标右键单击源列表中的一个图层来改变),并且 Mask 图层参数变为可用。

3. Specifying Filters3. 指定过滤器#

  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.添加过滤器,从数据源中为您将要生成的每种类型的土地覆盖对象选择区域。单击 Parameters 面板的 Filters 窗口中的 Add 按钮。

    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.双击过滤器以指定过滤器名称。要删除过滤器,请使用 Remove 按钮。您可以根据需要添加任意数量的过滤器。

    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.Share 按钮允许在掩码之间共享使用过滤器。在弹出窗口中选择共享此过滤器的掩码。共享过滤器中的更改将应用于所有遮罩中

  2. Select a slot from those created by you (Sources -> Mask).从您创建的槽中选择一个槽 (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).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 Range for it, thus defining the suitable deviation from the specified color within the range [0, 255].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:从可用颜色中选择颜色或单击 Pick Screen Color 以从 Preview 面板中的图像中选择颜色:

4. Adding the object4. 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.Sources 面板上,单击 + 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.在下拉框中,根据蒙版选择要生成的对象类型。在我们的例子中,是 Vegetation。单击 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. 将准备好的基本对象添加为 Node

5. Generating Vegetation5. 生成植被#

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

最新更新: 2021-12-13
Build: ()