Generating Pipelines, Fences, Powerlines
You should upgrade to
Fences, pipes, and similar objects are placed along line segments selected from vector data sources (*.shp files).
The general workflow is as follows:
1. Preparing a Primary Object#
First, we create a primary object, that will be used as a building block for the generation — any *.node file containing a single root node with any hierarchy.
2. Adding a Vector Data Source and Specifying Filters#
This step is the same as Adding a Vector Data Source and Specifying Filters for Roads.
3. Adding the Object and Specifying Parameters#
Now we must add the primary object created at the first step and bind it to the Filters created at the second step.
-
On the Sources panel, click + Add Object.
-
In the drop-down, select the type of object you generate according to the Slot data. In our case, it is Points. Click Import.
Specify the following parameters for the primary object:
Vector Slot | A Slot created by you to organize data using Filters. |
---|---|
Object Name | The object's name that is displayed in the Objects list in Sandworm and in the World Nodes hierarchy when the terrain is generated. |
Node | The path to the primary object's *.node file. |
Use as Fence | Toggling on this option allows creating a line of object instances along the selected vector data. |
Auto size |
Autosizing for lengthy objects, such as fences and pipes. If enabled, the primary object instances are stretched and placed with zero-spacing so that bounding boxes of the first and the last instance are aligned with start and end points of the line segment, respectively. Disabling this option makes the following parameters available: |
Collider |
Flag indicating if collisions for the generated object are to be detected. Available only for the geometry type. |
Drop to ground | Flag indicating if the generated object will be aligned with the terrain surface. |
Height offset |
Distance from the terrain surface along the Z-axis, in units. If the generated object is partially under the ground, increase this value to lift it above the terrain surface. |
Bake to cluster |
Flag indicating if the generated objects will be baked to a Mesh Cluster. The option is available only when the specified *.node file contains a Static Mesh. Don't use baking to a Mesh Cluster for large areas because of the coordinates precision limitations. |
Forward axis | Axis along which the primary object is to be tiled: X, -X, Y, -Y. |
Placing Billboards#
You can also place billboards along the line segments selected from vector data sources.
This option can be used, for example, to simulate lights along the generated roads. The general workflow is the same as described above with the following additions:
-
At Step 1, use a *.node file containing a single Billboards object as the primary object. The Billboards object should have an emissive material assigned to its surface.
If a *.node file contains several billboards, only the settings of the first one will be used. - At Step 2, select the vector data of the road along which the lights are to be placed.
-
At Step 3, when specifying parameters, do the following:
- Disable the Autosize option.
- Set the value for the Step parameter that determines the distance (in units) between the two adjacent lights (Billboards) placed along the road.
The extra parameter becomes available: Split Billboards length (km). This parameter allows you to control the number of Billboards objects that will be generated due to area splitting:
- Low values will increase the number of generated Billboards objects.
- High values will reduce this number.
The maximum number of Billboards contained in a single Billboards object is limited to 8000. Thus, the number of generated Billboards objects is also affected by the Step value, that you specify, since a low value produces a large total number of Billboards. Although Billboards are performance-friendly, generating too many of them may reduce performance.
4. Generating Objects#
Now you need to configure the output settings and generate (or regenerate) the terrain which contains these vector objects by clicking the Generate button.
If the terrain has already been generated and you made no changes to it, you can regenerate only the vector data. In the corresponding settings, disable the data types you don't need to be regenerated.
By default, the generated objects are added to the world hierarchy as NodeReferences. However, they can be baked to a MeshCluster, if the corresponding option is enabled.
Vector Objects as NodeReferences |
Vector Objects as MeshCluster |