This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and 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
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
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.

Mesh Cluster

A cluster is an object that can contain a great number of identical meshes with the same material, which are managed as one object. Cluster meshes can be scattered either automatically, or each mesh can be positioned, rotated and scaled manually.

The cluster mesh is usually used for objects of the same type, for example, houses in neighborhoods.

Meshes of the cluster object that will be visible in the viewing frustum will be loaded, those ones that will not be visible will be culled. Using clusters is very efficient performance-wise: it substantially speeds up rendering and allows you to handle a lot of objects without any performance drop.

Notice
Cluster can contain only identical meshes with the same material assigned to each of their surfaces.

There are two ways to create a cluster in UnigineEditor:

  • Create a cluster by baking all of the identical child meshes.
  • Collect a cluster by baking all of the identical meshes in the world.

See also

Creating a Cluster

To create a cluster by baking the child meshes, do the following:

  1. On the Menu bar, click Create -> Object -> Mesh Cluster.

  2. In the dialog window that opens, choose the path to the .mesh file. This mesh would be used as the source one for the cluster.
  3. Place the cluster somewhere in the world. It won't be seen as it serves just like a source mesh for child meshes.
  4. Manually position identical meshes in the world and make them children of the created cluster.
    Notice
    To make a node a child of another node, drag it to the left under the parent node.
  5. To bake the child meshes to the cluster, click Create in the Mesh Cluster tab. The child meshes won't be no longer seen in the nodes hierarchy.

    Parameters window, Mesh Cluster tab
    Notice
    Only enabled meshes are baked into a cluster. Disabled ones are left as simple child nodes.

    To add more meshes into the same cluster, simply make them its children and click Create once again to rebake the cluster.

    To change all of the child meshes at the same time just change the path to the source cluster mesh in the Mesh field of the Mesh Cluster tab.

Collecting a Cluster

To create a cluster by baking all of the identical meshes in the world, do the following:

  1. On the Menu bar, click Create -> Object -> Mesh Cluster.

  2. In the dialog window that opens, choose the path to the .mesh file. This mesh would be used as the source one for the cluster.
  3. Place the cluster somewhere in the world. It won't be seen as it serves just like a source mesh for child meshes. Meshes that are going to be baked should have the same .mesh file as a cluster mesh.
  4. Specify the same material that is assigned to meshes going to be baked for the cluster in the Node tab of the Parameters window (the Surfaces section).
  5. Click Collect in the Mesh Cluster tab. All of the meshes having the same mesh and material assigned will be baked to the cluster. This meshes won't be no longer seen in the nodes hierarchy.

    Parameters window, Mesh Cluster tab

    To change all of the child meshes at the same time just change the path to the source cluster mesh in the Mesh field of the Mesh Cluster tab.

Expanding a Cluster

To expand a cluster (either created or collected) click Expand in the Mesh Cluster tab. It may be necessary for some meshes repositioning or removing.

Notice
Meshes that were collected would become cluster children.

Clearing a Cluster

To delete all of the meshes baked to cluster click Clear. Make sure that the meshes are created or collected, as the operation won't be performed if they are rebaked.

Mesh Cluster Parameters

The following parameters are available for a cluster in the Mesh Cluster tab:

Parameters window, Mesh Cluster tab
Mesh Change the source cluster mesh thus changing all of the children meshes.
Visible The distance up to which all of the cluster meshes are visible.
  • If set to infinity (inf), the Fade parameter will be ignored.
  • The real range of cluster visibility directly depends on the object (surface) maximum visibility distance and also on its fade out distance. In case meshes disappear at the closer distance, further increase of the visibility distance won't affect the performance in any way.
Notice
To avoid flickering of cluster meshes, the object maximum visibility distance should be greater than the sum of minimum visibility distance and minimum fade out distance:

Max Visibility > Min Visibility + Min Fade
Fade The distance up to which the number of rendered cluster meshes gradually decreases, as they disappear randomly one by one. The fade distance follows the visibility distance. Without the fade distance set meshes disappear sharply, as a clearly seen line. Using fade distance allows the objects to disappear one by one until up to the fade distance only a few left. It makes the disappearing smooth and much less noticeable.

For the best result, it is also recommended to combine this effect with objects fade-out.

Last update: 2018-04-26
Build: ()