shown in other instead.
Vegetation such as trees and grass can be generated via the Sandworm tool on the basis of landcover data available. Such data is added as 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 Basic Object#
Create a basic object that will be used as a building block for generation of vegetation (grass, trees, etc.). The following types of basic objects are supported:
Specify parameters of the basic object in the Parameters window.Intersections with the parent object must be enabled for all types of basic objects. The Intersection flag can be found on the tab of the Parameters window corresponding to the type of the object.
- Inherit a material, set all necessary textures and parameters and assign it to the basic 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 into different terrain masks.
- 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 the layers in the Preview panel (the order of layers display may be changed by RMB click on a layer in the list of sources), and the Mask layer parameters become available.
3. Specifying Filters#
Double-click on the filter to specify a filter name. To remove a filter use 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). Slots are designed to organize data into different terrain masks.
For every filter, type should be set to select certain 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.
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 basic object as Node.