UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials

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. Using clusters substantially speeds up rendering.

Mesh Cluster

Mesh Cluster
Notice
Cluster can also have physical properties if a body is assigned to it.

See also

Mesh for Mesh Cluster

Mesh Cluster can contain only identical meshes with the same material on each of their surfaces.

  • Mesh specifies path to this mesh.
  • On Surfaces tab a material for the mesh or its surfaces is specified.

Creating a Mesh Cluster

Create To use a Mesh Cluster for managing a number of meshes, simply do the following:
  • Manually position identical meshes which have the same material applied to their surfaces in the world.
  • Add Mesh Cluster node and specify the mesh.
  • In Mesh Cluster go to Surfaces tab and specify the mesh material.
  • Make meshes child nodes of the Mesh Cluster (by dragging them with ALT pressed under a Mesh Cluster node).
  • Bake nodes into one Cluster using Create option. A Cluster will automatically load into the memory objects that are currently visible in the view frustum and unload all invisible ones. A Mesh Cluster is very efficient performance-wise and allows to handle a lot of objects without any performance drop.
    Notice
    Only enabled meshes will be baked into a Mesh Cluster. Disabled ones are left as simple child nodes.
  • To add more meshes into the same Mesh Cluster, simply make them child nodes and click Create button once again to rebake the Cluster.
Collect Another way of creating Mesh Cluster with meshes is to use Collect option. It will search for specified meshes in the world and automatically bake them.
  • Place meshes in the world.
  • Verify that the same mesh is specified for Mesh Cluster.
  • In Mesh Cluster go to Surfaces tab and specify the mesh material.
  • Press Collect button. All meshes with the specified material will be automatically baked.
Expand If it is necessary to reposition or remove some of the meshes, use Expand option to un-bake Mesh Cluster. Meshes will appear in the list as children and can be transformed or otherwise edited. Do not forget to use rebake them again with Create option.
Clear To remove all node references that were baked into a Mesh Cluster, use Clear option.
  • This option does not delete meshes when they are expanded into a list of child nodes of the Mesh Cluster.

Mesh Cluster Parameters

Visible distance Up to the visible distance all node references are rendered that were baked into a Mesh Cluster and are found within this range.
  • If set to infinity (inf), Fade distance parameter will be ignored.
  • The real range of Cluster visibility directly depends on the object (surface) maximum visible distance and also its fade out distance. In case node references disappear at a closer distance, further increase of the visible distance does not any affect the performance in any way.
Fade Distance Across the fade distance the number of rendered node references gradually decreases, as they disappear randomly one by one. The fade distance follows the Visible distance. Without the fade distance node references disappear abruptly, 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.
Shadow The distance to draw additional meshes outside the view frustum. This option allows to eliminate popping of shadows at the edges of the screen when the camera is turning.
  • Choose the smallest possible Shadow distance when there is no popping of shadows.
  • The shadow range to set depends on the mesh size, how high meshes are positioned and also the angle of the sun (which determines how long the shadows from them would be).
Last update: 2017-07-03