This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
VR Development
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

添加植被

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

Trees and grass are placed on the terrain based on the Mask data.根据蒙版数据将树和草放置在地形上。

See Also另请参阅#

观看这段视频,来自Sandworm地形生成系列视频教程:

Preparing a Primary Object准备一个主要对象#

We need to 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:我们需要创建一个主对象将被用作构建块来生成植被(草、树等)。以下类型的主要对象是支持:

Let's create a Mesh Clutter object with a tree.让我们创建一个Mesh Clutter对象树。

注意
You can omit the creation process and use a ready-made Node Reference sw_georeferenced/nodes/vegetation/pine/pine_clutter.node.您可以省略的创建过程和使用现成的Node Reference sw_georeferenced/nodes/vegetation/pine/pine_clutter.node
  1. In the scene, click Create -> Clutter -> Mesh. In the window that opens, select a mesh: sw_georeferenced/nodes/vegetation/pine/fbx/pine_01_2.FBX/pine_01_2.mesh and place it somewhere in the scene.在现场中,单击Create -> Clutter -> Mesh。在打开的窗口中,选择一个网格:sw_georeferenced/nodes/vegetation/pine/fbx/pine_01_2.FBX/pine_01_2.mesh并将其在现场。
  2. Specify parameters of the primary object in the Parameters window: assign the materials from the sw_georeferenced/nodes/vegetation/pine/materials/ folder to the corresponding surfaces, increase the visibility distance of the Mesh Clutter, etc. For more details, see this article.Parameters 窗口中指定主要对象的参数:将 sw_georeferenced/nodes/vegetation/pine/materials/ 文件夹中的材质分配到相应的表面,增加可见距离 Mesh Clutter 等。有关详细信息,请参阅 本文

    注意
    Intersections with the parent object must be enabled for all types of primary objects. The Intersection flag can be found on the Parameters tab of the object.交集与父对象必须启用 为所有类型的主要对象。在对象的Parameters选项卡上可以找到Intersection标志。

  3. Open the folder in the Asset Browser where you want the primary object be stored, right-click on the created ObjectMeshClutter and convert it to Node Reference.在 AssetBrowser 中打开要存储主对象的文件夹,右键单击创建的 ObjectMeshClutter 并将其转换为 Node Reference.

The primary object is ready — we will use this Node Reference to generate vegetation.主要对象是准备好了,我们将使用这个Node Reference生成植被。

Created primary object

You can remove it from the scene at all or disable if you'll require it later for further adjustments.您可以删除它从现场或禁用如果稍后您将需要进一步调整。

Impostors视点替用特效#

Considering that there'll be many trees generated, you may come across some performance issues. To optimize vegetation, create the Impostor object that will be rendered at a farther distance.考虑到将会有许多树生成的,您可能会遇到一些性能问题。优化植被,创建Impostor对象将会呈现在一个更远的距离。

If you created the primary object from scratch, be sure that all settings of the Impostor object are the same as in the primary object, except Visibility Distance.如果您从头开始创建主对象,请确保 Impostor 对象的所有设置与主对象中的 相同Visibility Distance除外。

You may also use the Impostor asset sw_georeferenced/nodes/vegetation/pine/pine_clutter_impostor.node from the pack in pair with the sw_georeferenced/nodes/vegetation/pine/pine_clutter.node asset.您还可以将包中的 Impostor 资源 sw_georeferenced/nodes/vegetation/pine/pine_clutter_impostor.nodesw_georeferenced/nodes/vegetation/pine/ pine_clutter.node 资源。

Adding the Vegetation Object添加植被对象#

  1. In the Objects panel, click + for Vegetation.Objects面板中,单击Vegetation+

  2. Set the following parameters for the object:为对象设置以下参数:

    • The object name is set for convenience. This name will be displayed in the Objects list in Sandworm and in the World Nodes hierarchy after generation.对象名称设置为方便。这个名字将显示在对象列表在沙虫和World Nodes层次后一代。
    • As you have only one mask, it is selected by default in the Parameters panel.当您只有一个蒙版,它是默认选中的Parameters面板。
    • Set the prepared primary object as Node (or use an asset from the pack).将准备好的 主要对象 设置为 Node (或使用包中的资源)。
  3. Click the Create Vegetation Object button.单击Create Vegetation Object按钮。

You can edit any parameters of the created vegetation object in Sandworm — changes are saved automatically.您可以编辑任何参数Sandworm --植被对象创建的变化自动保存。

If you plan to use an Impostor object, add it as one more Vegetation object.如果您计划使用一个Impostor对象,将其添加为一个Vegetation对象。

List of Created Objects

Generated Vegetation生成的植被#

The generated trees:生成的树:

Generated trees生成树

What Else还有什么#

  • Add grass the same way using the Grass node instead on Mesh Clutter. Use the same mask and grass will be spread under the trees.使用 Grass 节点而不是 Mesh Clutter 以相同的方式添加草。 使用相同的蒙版,草会在树下铺开。
  • Check the information on how to generate and use Impostors.查看有关如何生成使用 Impostors的信息。
  • Read the tips on vegetation optimization.阅读关于植被优化的提示。
  • Check the article on the Sandworm vegetation parameters for a more detailed description.查看更详细 Sandworm 植被参数 的文章以获得。
最新更新: 2023-12-19
Build: ()