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

Adding Vegetation

Trees and grass are placed on the terrain based on the Mask data.

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.

Notice
You can omit the creation process and use a ready-made 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.
  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.

    Notice
    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.

  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.

The primary object is ready — we will use this Node Reference to generate vegetation.

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.

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.

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.

Adding the Vegetation Object#

  1. In the Objects panel, click + for 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.
    • As you have only one mask, it is selected by default in the Parameters panel.
    • Set the prepared primary object as Node (or use an asset from the pack).
  3. Click the Create Vegetation Object button.

You can edit any parameters of the created vegetation object in Sandworm — changes are saved automatically.

If you plan to use an Impostor object, add it as one more Vegetation object.

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.
  • Check the information on how to generate and use Impostors.
  • Read the tips on vegetation optimization.
  • Check the article on the Sandworm vegetation parameters for a more detailed description.
Last update: 2022-10-10
Build: ()