Generating Vegetation
You should upgrade to
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.
Let's review the process of generating vegetation in detail.
1. Preparing a Primary Object#
-
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)
-
Specify parameters of the primary object in the Parameters window.
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. - Inherit a material, set all necessary textures and parameters and assign it to the primary object.
- Export your node to a .node file (e.g. grass.node) and then delete the node from the world.
2. Adding a Mask Data Source#
-
In the Sandworm window, Sources panel:
- Clicking on Mask opens the window for adding slots. Slots are designed to organize data.
- Clicking on + Add Layer provides the toolset for uploading landcover data.
-
When adding a layer, define the type of Data Source to be used: Assets or External Files and click Import.
- In the window that opens, select the landcover data source to be used as a Mask. R8 and RGB8 Mask textures are supported.
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.
3. Specifying Filters#
-
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.
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.
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.
- Select a slot from those created by you (Sources -> Mask).
-
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).
-
Single Channel — select a channel of the source raster image.
-
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].
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:
-
4. Adding the object#
Now we need to set the object that will be distributed on the terrain according to the Mask.
-
On the Sources panel, click + Add Object.
-
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.
- Select the slot you have configured for the vegetation you are going to generate.
- Edit the name for your convenience. It will be displayed as a terrain mask in the terrain parameters.
-
Add the prepared primary object as Node.
Keep in mind that the World Clutter object is generated only if Object Terrain Global is selected as the output format.
5. Generating Vegetation#
Now you need to configure the output settings and generate (or regenerate) the terrain covered with vegetation by clicking the Generate button.