添加植被
您应该升级到
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:我们需要创建一个主对象将被用作构建块来生成植被(草、树等)。以下类型的主要对象是支持:
- Grass objectGrass对象
- Mesh Clutter objectMesh Clutter对象
- World Clutter object (generated only if Object Terrain Global is selected as the Terrain Type)World Clutter对象(仅当选择Object Terrain Global作为地形类型时生成)
Let's create a Mesh Clutter object with a tree.让我们创建一个Mesh Clutter对象树。
- 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并将其在现场。
-
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标志。 - 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生成植被。
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.node 与 sw_georeferenced/nodes/vegetation/pine/ pine_clutter.node 资源。
Adding the Vegetation Object添加植被对象#
-
In the Objects panel, click + for Vegetation.在Objects面板中,单击Vegetation的 +。
-
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 (或使用包中的资源)。
- 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对象。
Generated Vegetation生成的植被#
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 植被参数 的文章以获得。