This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Настройка свойств
Освещение
Landscape Tool
Sandworm
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Ноды (Nodes)
Эффекты
Декали
Источники света
Geodetics
World Objects
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
Rebuilding the Engine Tools
GUI
Двойная точность координат
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
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Mesh Cluster

A mesh 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.Mesh Cluster - это объект, который может содержать большое количество идентичных мешей с одним и тем же материалом, которые управляются как один объект. Элементы Mesh Cluster могут быть распределены автоматически, либо вы можете позиционировать, вращать и масштабировать каждый из них вручную.

The mesh cluster is usually used for objects of the same type, for example, houses in neighborhoods.Mesh Cluster обычно используется для объектов одного типа, например, домов в микрорайонах.

Meshes of the mesh cluster object that are visible in the viewing frustum are loaded, meshes outside the frustum are culled. Using the mesh cluster is very efficient performance-wise: it substantially speeds up rendering and allows handling a lot of objects without any performance drop.Меши объекта Mesh Cluster, которые видны в пирамиде видимости, загружаются, меши за пределами пирамиды видимости отбрасываются. Использование Mesh Cluster очень эффективно с точки зрения производительности: оно значительно ускоряет рендеринг и позволяет обрабатывать большое количество объектов без потери производительности.

Примечание
The mesh cluster can contain only identical static meshes with the same material assigned to each of their surfaces.Mesh Cluster может содержать только идентичные статические меши с одинаковым материалом, назначенным каждой из их поверхностей.

There are two ways to create a mesh cluster in UnigineEditor:Есть два способа создать Mesh Cluster в UnigineEditor:

  • Collect a mesh cluster by baking all identical meshes in node's hierarchy or in the world.Собрать Mesh Cluster, запекая все идентичные меши в иерархии узлов или в мире.
  • Create a mesh cluster manually by baking all its identical child meshes.Создать Mesh Cluster вручную, запекая все его идентичные дочерние меши.
Примечание
Mesh Cluster is always culled by the Occlusion Query and not rendered when outside the viewing frustum.Для Mesh Cluster всегда выполняется запрос окклюзии, за пределами пирамиды видимости объект не визуализируется .

See alsoСмотрите также#

  • The ObjectMeshCluster class to edit clusters via APIКласс ObjectMeshCluster для редактирования кластеров через API
  • A set of samples located in the <UnigineSDK>/data/samples/objects/ directory: Набор примеров, находящихся в каталоге <UnigineSDK>/data/samples/objects/:

Collecting a ClusterСборка кластера#

A mesh cluster can be collected from all identical meshes that were added in the world or from all identical child meshes of a certain node.Mesh Cluster может быть получен из всех идентичных мешей, которые были добавлены в мир, или из всех идентичных дочерних мешей определенного узла.

Baking Identical Meshes of a Node HierarchyЗапекание идентичных мешей в иерархии объектов#

To create a mesh cluster by baking all identical meshes in the hierarchy, right-click the parent node of the hierarchy in the World Hierarchy window and select Create Mesh Clusters From Hierarchy in the context menu.Чтобы создать Mesh Cluster путем запекания всех идентичных мешей в иерархии, щелкните правой кнопкой мыши родительский узел иерархии в окне World Hierarchy и выберите Create Mesh Clusters From Hierarchy в контекстном меню.

Applying this operation creates a dummy node with the _clustered postfix added to the parent node name. This dummy node contains two child nodes:Применение этой операции создает dummy node с постфиксом _clustered, добавленным к имени родительского узла. Этот узел содержит два дочерних узла:

  • Node that is a parent of all mesh clusters. This node is named by adding the _mesh_clusters postfix to the source parent node name. Mesh cluster names are formed using the mesh name and the _cluster postfix.Узел, являющийся родительским для всех Mesh Clusters. Этот узел называется путем добавления постфикса _mesh_clusters к имени исходного родительского узла. Имена Mesh Cluster формируются с использованием имени меша и постфикса _cluster.
  • Node that is a parent of all other child nodes of the source parent node. This node is named by adding the _other_nodes postfix to the source parent node name.Узел, который является родительским для всех остальных дочерних узлов исходного родительского узла. Этот узел называется путем добавления постфикса _other_nodes к имени исходного родительского узла.

The created clusters contain all identical meshes of the source node including meshes that are referenced by Node References. Other nodes are added as a linear list. The source node is disabled.Созданные кластеры содержат все идентичные меши исходного узла, включая меши, на которые ссылаются Node References. Остальные узлы добавляются в виде линейного списка. Исходный узел отключен.

Creation of a clustered node: nodes that are not in clusters are added as a linear listСоздание кластерного узла: узлы, не входящие в кластер, добавляются в виде линейного списка
Примечание
A mesh cluster is created only if a hierarchy contains at least 8 identical meshes.Mesh Cluster создается только в том случае, если иерархия содержит не менее 8 идентичных мешей.

Baking Identical Meshes in the WorldЗапекание идентичных мешей в мире#

To create a cluster by baking all identical meshes in the world, do the following:Чтобы создать кластер путем запекания всех идентичных мешей в мире, выполните следующие действия:

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

    В строке меню щелкните Create -> Cluster -> Mesh.

  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 mesh cluster.В открывшемся диалоговом окне выберите путь к файлу .mesh. Этот меш будет использоваться как исходный для Mesh Cluster.
  3. Place the mesh cluster somewhere in the world. By default, is shall contain 4 instances of the selected mesh (you can remove them). Meshes to be baked should have the same .mesh file as the one selected for the mesh cluster. Разместите Mesh Cluster где-нибудь в мире. По умолчанию он должен содержать 4 экземпляра выбранного меша (вы можете удалить их). Запекаемые меши должны иметь тот же файл .mesh, что и выбранный для кластера.
  4. Specify the same material that is assigned to meshes going to be baked to the cluster in the Node tab of the Parameters window (the Surfaces section).Укажите тот же материал, который назначен мешам, которые будут запекаться в кластер, на вкладке Node окна Parameters (раздел Surfaces).
  5. Click Collect Similar in the Node tab, Mesh Cluster section. All meshes having the same mesh and material assigned will be baked to the cluster. Baked meshes are no longer seen in the nodes hierarchy.

    Parameters window, Node tabParameters window, Node tab

    To change all child meshes at once, just select a required asset in the Mesh field of the Mesh Cluster section.To change all child meshes at once, just select a required asset in the Mesh field of the Mesh Cluster section.

    Parameters window, Node tabTo change all child meshes at once, just select a required asset in the Mesh field of the Mesh Cluster section.
    Щелкните Collect Similar во вкладке Node раздел Mesh Cluster. Все объекты, имеющие одинаковые меш и назначенный материал, будут запечены в кластер. Запеченные меши больше не отображаются в иерархии узлов.

    Parameters window, Node tabОкно Parameters, вкладкаNode

    To change all child meshes at once, just select a required asset in the Mesh field of the Mesh Cluster section.Чтобы изменить все дочерние меши сразу, просто выберите требуемый ассет в поле Mesh раздела Mesh Cluster.

Creating Mesh Clusters from Mesh CluttersСоздание Mesh Cluster из Mesh Clutter#

To create a Mesh Cluster from a Mesh Clutter, use the following context-menu option:Чтобы создать кластер из Mesh Clutter воспользуйтесь следующей опцией контекстного меню:

Using this option disables the Mesh Clutter and creates and enables a mesh cluster with the same name and postfix _Cluster added.Использование этой опции отключает Mesh Clutter и создает и включает Mesh Cluster с тем же именем и добавленным постфиксом _Cluster.

Creating a Cluster ManuallyСоздание кластера вручную#

To create a mesh cluster by baking its child meshes, do the following:Чтобы создать Mesh Cluster путем запекания его дочерних мешей, сделайте следующее:

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

    В строке меню щелкните Create -> Cluster -> Mesh.

  2. In the dialog window that opens, choose a *.mesh asset to be used as the source mesh for the cluster.В открывшемся диалоговом окне выберите *.mesh ассет, который будет использоваться в качестве исходного меша для кластера.
  3. Place the cluster somewhere in the world. By default is shall contain 4 instances of the selected mesh (you can remove them).Разместите кластер где-нибудь в мире. По умолчанию он должен содержать 4 экземпляра выбранного меша (вы можете удалить их).
  4. Manually position identical meshes in the world and make them children of the created cluster.
    Примечание
    To make a node a child of another node, drag it under the parent node in the World Hierarchy window.To make a node a child of another node, drag it under the parent node in the World Hierarchy window.
    To make a node a child of another node, drag it under the parent node in the World Hierarchy window.
    Вручную разместите идентичные меши в мире и сделайте их дочерними по отношению к созданному кластеру.
    Примечание
    To make a node a child of another node, drag it under the parent node in the World Hierarchy window.Чтобы сделать узел дочерним по отношению к другому узлу, перетащите его под родительский узел в окне World Hierarchy.
  5. To bake the child meshes to the cluster, click Apply in the Mesh Cluster section of the Node tab. The baked child meshes are no longer seen in the nodes hierarchy.

    Parameters window, Node tabParameters window, Node tab
    Примечание
    Only enabled meshes are baked to a cluster. Disabled meshes are left as child nodes.Only enabled meshes are baked to a cluster. Disabled meshes are left as child nodes.

    To add more meshes to the same cluster, simply click Edit make them its children and then click Apply to rebake the cluster.To add more meshes to the same cluster, simply click Edit make them its children and then click Apply to rebake the cluster.

    To change all child meshes at once just change the mesh asset in the Mesh field of the Mesh Cluster section.To change all child meshes at once just change the mesh asset in the Mesh field of the Mesh Cluster section.

    Parameters window, Node tabOnly enabled meshes are baked to a cluster. Disabled meshes are left as child nodes.To add more meshes to the same cluster, simply click Edit make them its children and then click Apply to rebake the cluster.To change all child meshes at once just change the mesh asset in the Mesh field of the Mesh Cluster section.
    Чтобы привязать дочерние меши к кластеру, щелкните Apply в разделе Mesh Cluster вкладки Node. Запеченные дочерние меши больше не отображаются в иерархии узлов.

    Parameters window, Node tabОкно Parameters, вкладка Node
    Примечание
    Only enabled meshes are baked to a cluster. Disabled meshes are left as child nodes.В кластер запекаются только включенные меши. Отключенные меши остаются дочерними узлами.

    To add more meshes to the same cluster, simply click Edit make them its children and then click Apply to rebake the cluster.Чтобы добавить больше мешей к тому же кластеру, просто щелкните Edit, чтобы сделать их его дочерними, а затем щелкните Apply, чтобы повторно создать кластер.

    To change all child meshes at once just change the mesh asset in the Mesh field of the Mesh Cluster section.Чтобы изменить все дочерние меши сразу, просто измените ассет меша в поле Mesh раздела Mesh Cluster.

Editing a ClusterРедактирование кластера#

To edit a mesh cluster (either created or collected), for example, to reposition or remove some meshes, click Edit in the Mesh Cluster section of the Node tab.Чтобы отредактировать Mesh Cluster (созданный или собранный), например, чтобы изменить положение или удалить некоторые меши, щелкните Edit в разделе Mesh Cluster вкладки Node.

Примечание
Meshes that were collected would become mesh cluster children.Собранные меши станут дочерними элементами Mesh Cluster.

Clearing a ClusterОчистка кластера#

To delete all meshes baked to a mesh 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, щелкните Clear. Убедитесь, что меши созданый или собраны , так как в случае их перезапекания операция не будет выполнена.

Mesh Cluster ParametersПараметры кластера#

The following parameters are available for a cluster in the Mesh Cluster section of the Node tab:Для кластера в разделе Mesh Cluster вкладки Node доступны следующие параметры:

Parameters window, Node tab, Mesh Cluster sectionОкно Parameters, вкладка Node, раздел Mesh Cluster
Mesh Change the source cluster mesh thus changing all children meshes.Измените меш исходного кластера, изменив таким образом все дочерние меши.
Visibility Distance The distance up to which all cluster meshes are visible.
  • If set to infinity (inf), the Fade parameter will be ignored.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 a closer distance, further increase of the visibility distance won't affect the performance in any way.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 a closer distance, further increase of the visibility distance won't affect the performance in any way.
Примечание
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
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
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 a closer distance, further increase of the visibility distance won't affect the performance in any way.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
Расстояние, на котором видны все элементы кластера.
  • If set to infinity (inf), the Fade parameter will be ignored.Если установлено в бесконечность (inf), параметр Fade будет проигнорирован.
  • 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 a closer distance, further increase of the visibility distance won't affect the performance in any way.Реальная дистанция видимости кластера напрямую зависит от максимальной дистанции видимости объекта (поверхности), а также его дистанции плавного перехода . В случае, если меши исчезают на более близком расстоянии, дальнейшее увеличение расстояния видимости никак не повлияет на производительность.
Примечание
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
Чтобы избежать мерцания элементов кластера, максимальная дистанция видимости для объекта должна быть больше суммы минимальная дистанция видимости а также минимальное расстояние исчезновения:
Max Visibility > Min Visibility + Min Fade
Fade Distance 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.For the best result, it is also recommended to combine this effect with objects fade-out.

For the best result, it is also recommended to combine this effect with objects fade-out.
Расстояние, до которого количество отрисовываемых элементов кластера постепенно уменьшается, поскольку они случайным образом исчезают один за другим. Дистанция плавного перехода следует за дистанцией видимости . Без установки дистанции плавного перехода меши резко исчезают в виде четко видимой линии. Использование расстояния плавного перехода позволяет объектам исчезать один за другим, пока на расстоянии плавного перехода не останется только несколько объектов. Это делает исчезновение более плавным и менее заметным.

For the best result, it is also recommended to combine this effect with objects fade-out.Для достижения наилучшего результата рекомендуется также сочетать этот эффект с плавным переходом .

Последнее обновление: 29.04.2021
Build: ()