shown in other instead.
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:
- Grass object
- Mesh Clutter object
- World Clutter object (generated only if Object Terrain Global is selected as the output format)
Let's create a Mesh Clutter object with a tree.
- 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.
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.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.
- 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.
You can remove it from the scene at all or disable if you'll require it later for further adjustments.
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#
In the Objects panel, click + for 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.
- 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).
- 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.
The generated trees:
- 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.