This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Objects
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
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
Content Creation
Content Optimization
Materials
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Generating Point Objects

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.

Houses, landmarks, and other such objects are placed at certain points of the terrain. There are 2 shape types that can be selected from vector data sources (*.shp and *.geojson assets) and used for point object placement:

  • Point — in this case the basic object will be placed at the position specified by the point and will be oriented the same way as when it was saved to a *.node file.
  • Line — in this case the basic object will be placed at the position specified by the first point, while the second point determines orientation of object's forward direction vector (positive Y).

This chapter describes the basic workflow for generation of point objects on the terrain.

Notice
It is assumed that you have already added the data required for the terrain surface.

1. Preparing a Basic Object#

Create a basic object that will be used as a building block for generation — any *.node file containing a single root-node with any hierarchy.

Notice
The basic object must be located and have a pivot at the origin (0, 0, 0).

Export your node to a .node file.

2. Adding a Vector Data Source#

Currently, Sandworm allows using only offline vector data source for generation.

  1. In the Source Data panel, add a new vector data layer.
  2. In the Parameters panel, define the type of Data Source to be used: Assets or External Files. Currently only *.shp and *.geojson are supported as assets. Therefore, if you have other types of files, you can try to add them as External Files.

    Click Import.
  3. In the window that opens, select the set of files to be used as vector data.

When the vector data is added, its image is displayed atop all the layers in the Preview panel (the order of layers display may be changed), and the Vector layer parameters become available.

3. Specifying Tags to Filter Point Objects#

The Tag is in fact a set of rules used to pick the specific data from the list of all available vector data. The rules are created using the Attributes. Only the objects that fit to the requirements of every attribute are generated based on this tag.

Tags are created as follows:

  1. Click the Add button in the Tags window in the Parameters panel.

    Double-click on the tag to specify a tag name. To remove a tag use Remove button.
  2. For each tag, set an attribute (or attributes) to filter certain data from the vector source. The required data is filtered using the attribute values and suitable operator. Autocomplete is available. You can type in attribute names and values.
  3. The available operators are: =, !=, >, <, ANY. ANY generates all the objects that have any value assigned for the selected attribute.
    You can also select attribute values from the Attributes table. The table opens using the sign on the right of the attribute expression.
  4. To add more attributes, use the "+" (plus) button. You can add as many attributes for one tag as necessary.
    Notice
    If several attributes are set, only the data that comply with all the attributes will be selected.

    To remove a filter, use the button to the right of the attribute expression.

4. Specifying Parameters of Point Objects#

In this step, we are going to set objects that will be generated and placed across the surface of the terrain according to the data filtered by the tag.

In the Objects window, click Add to add the object that will be generated on the terrain based on the vector data specified for it. The dialog window will open:

Set the following object parameters:

Name The object's name, which is displayed in the Objects list in Sandworm and in World Nodes when the terrain is generated.
Tag The tag for the selected object from the list of created tags. In this case, we select Points.
Type Type of the vector object to be generated. In this case, we are generating Points.
Enabled When toggled on, the objects of this type will be generated. When toggled off, the objects of this type are not generated and won't exist in the world containing the generated terrain.
Use as Fence Option for lengthy objects such as fences and pipes.
Node The path to the basic object's *.node file.
Collider Flag indicating if collisions for the generated object are to be detected.
Notice
Available only for 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.
Notice
If you see the generated object partially, You can try to increase this value to lift it above the terrain surface.
Bake To Cluster If enabled, bakes generated point objects to Mesh Cluster. If disabled, generated objects are added to the world hierarchy as NodeReferences.
Forward Axis Axis which determines orientation of the basic object: X, -X, Y, -Y.
Split Billboards Length (km) This parameter is required if your basic object is a billboard in order to control the number of Billboards objects to be generated due to area splitting:
  • Low values will increase the number of generated Billboards objects
  • High values will reduce this number
Notice
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 total number of points, where the billboards are to be placed. Although billboards are performance-friendly, generating too many of them may reduce performance.

If you introduce any changes into created objects, click Apply to update them immediately.

5. Generating Point 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.

Here is a terrain fragment with houses generated on the basis of vector data using the basic mesh object.

Last update: 2021-04-29
Build: ()