This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
VR Development
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Skinned Mesh

A  skinned mesh is an object that can contain both mesh geometry and animation data. It is usually used for rendering characters with a bone-based animation or a morph target animation (also known as blend shapes).   Skinned Mesh - это объект, который может содержать как геометрию меша, так и данные анимации. Обычно он используется для рендеринга персонажей с анимацией на основе костей или целевой анимацией морфинга (также известной как blend shapes).

The animation data and the mesh geometry can be stored in a single .mesh file or in separate .mesh and .anim files. Separate files are usually used for complex objects with a number of animation (for example, characters), single file is usually used for simple objects (for example, lift doors).Данные анимации и геометрия меша могут храниться в одном файле .mesh или в отдельных файлах .mesh и .anim. Отдельные файлы обычно используются для сложных объектов с несколькими анимациями (например, персонажей), один файл обычно используется для простых объектов (например, дверей лифта).

A skinned mesh is created in third-party graphics programs (such as 3ds Max, Maya, etc.)Skinned Mesh создается в сторонних графических программах (таких как 3ds Max, Maya и т.д.)

Most operations with the skinned mesh are performed via scripts, but you can do some of them via UnigineEditor:Большинство операций со Skinned Mesh выполняется через код, но вы можете сделать некоторые из них через UnigineEditor:

The mesh limitations set in UNIGINE:В UNIGINE установлены следующие ограничения для мешей:

Maximum number of vertices per meshМаксимальное количество вершин на меш 4 294 967 295
Maximum number of surfaces per meshМаксимальное количество поверхностей на меш 32 768
Maximum amount of weights per vertexМаксимальное количество весов на вершину 4
Maximum amount of bones per surfaceМаксимальное количество костей на поверхность 128
Maximum number of active morph targets per surfaceМаксимальное количество активных morph targets на поверхность 7 for DX11 and OpenGL; unlimited for DX12 and Vulkan (100 is set by default)7 для DX11 и OpenGL; неограниченное количество для DX12 и Vulkan (по умолчанию задано 100)

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

Adding a Skinned MeshДобавление Skinned Mesh#

To add a skinned mesh to the scene via UnigineEditor, do the following:Чтобы добавить Skinned Mesh в сцену в UnigineEditor, сделайте следующее:

  1. Run UnigineEditor.Запустите UnigineEditor.
  2. On the Menu bar, click Create -> Mesh -> Skinned.

    В строке меню нажмите Create → Mesh → Skinned .

  3. In the dialog window that opens, choose the path to the .mesh file.В открывшемся диалоговом окне выберите путь к файлу .mesh.
  4. Place the mesh somewhere in the world.Разместите объект где-нибудь в мире.
Примечание
You can change the path to the mesh at any time in the MeshSkinned tab.Вы можете изменить путь к мешу в любое время на вкладке MeshSkinned.

Loading a Skinned Mesh and AnimationЗагрузка Skinned Mesh и анимации#

To replace a loaded skinned mesh with a new one, do the following:Чтобы заменить загруженный Skinned Mesh на новый, сделайте следующее:

  1. Choose the mesh in the World Hierarchy window and go to the Node tab of the Parameters window.Выберите меш в окне World Hierarchy и перейдите на вкладку Node окна Parameters.
  2. In the Mesh Skinned section, choose the path to the new .mesh file in the Mesh field.В разделе Mesh Skinned выберите путь к новому файлу .mesh в поле Mesh.

To add animation or replace the existing with a new one via UnigineEditor, do the following:Чтобы добавить анимацию или заменить существующую на новую в UnigineEditor, выполните следующие действия:

  1. Choose the mesh in the World Hierarchy window and go to the Node tab of the Parameters window.Выберите меш в окне World Hierarchy и перейдите на вкладку Node окна Parameters.
  2. In the Mesh Skinned section, choose the path to a new .anim file in the Preview Animation field.В разделе Mesh Skinned выберите путь к новому файлу .anim в поле Preview Animation.

Setting Up AnimationНастройка анимации#

You can perform the following operations with the skinned mesh animation via UnigineEditor:Вы можете выполнять следующие операции с анимацией Skinned Mesh в UnigineEditor:

Mesh Skinned tabВкладка Mesh Skinned
Loop Play an animation in a loop.Воспроизвести анимацию в цикле.
Quaternion Toggles the dual-quaternion skinning mode on and off. The dual-quaternion model is an accurate, computationally efficient, robust, and flexible method of representing rigid transforms and it is used in skeletal animation.Включает и выключает режим скиннинга на основе двойного кватерниона. Модель на основе двойного кватерниона - это точный, эффективный с вычислительной точки зрения, надежный и гибкий метод представления жестких преобразований, который используется в скелетной анимации.
Controlled Set the flag identifying that the mesh animation is controlled by a parent skinned mesh.Установите флаг, определяющий, что анимация сетки управляется родительской сеткой со скелетом.
Time Set the animation time, in animation frames. The time count starts from the zero frame. If the time is set to be between frames, animation is blended. If the time is set outside the animation frame range, the animation is looped.Установите время анимации в кадрах анимации. Отсчет времени начинается с нулевого кадра. Если установлено время между кадрами, анимация смешивается. Если время установлено вне диапазона кадров анимации, анимация зацикливается.
Playback Speed The multiplier of the animation playback time.Множитель времени воспроизведения анимации.
Preview Animation Path to a file with animation (.anim) to be played.Путь к файлу с анимацией (.anim) для воспроизведения.
Play Start the animation playback.Запустить воспроизведение анимации.
Stop Stop the animation playback.Остановить воспроизведение анимации.

Setting Up BonesНастройка костей#

Bone hierarchy of your skinned mesh is displayed in the Bones section of the Parameters window.Иерархия костей вашего объекта Skinned Mesh отображается в разделе Bones окна Parameters.

Each bone of a skinned mesh can be bound to a separate node to control its transformation giving you a lot of flexibility. For example, you can animate these nodes via the Tracker tool or enable physics-based control over skinned mesh bones binding them to nodes driven by physics.Каждая кость Skinned Mesh может быть привязана к отдельной ноде для управления ее трансформациями, что дает вам большую гибкость. Например, вы можете анимировать эти нодв с помощью инструмента Tracker или включить физический контроль над костями Skinned Mesh, привязывая их к нодам, управляемым физикой.

Mesh Skinned tabВкладка Mesh Skinned
Visualize Bones Enable visualizer for bones and their basis vectors to monitor your settings while adjusting them. The visualizer is rendered even when a skinned mesh is not selected in the World Nodes hierarchy, making it possible to show positions of bones for multiple meshes simultaneously.
Примечание
The global Visualizer is enabled automatically, when you check this option.The global Visualizer is enabled automatically, when you check this option.
The global Visualizer is enabled automatically, when you check this option.
Включите визуализатор для костей и их базовых векторов, чтобы контролировать процесс настройки. Визуализатор отображается, даже если Skinned Mesh не выбран в иерархии World Nodes, позволяя отображать позиции костей для нескольких мешей одновременно.
Примечание
The global Visualizer is enabled automatically, when you check this option.Глобальный визуализатор включается автоматически, когда вы выбираете эту опцию.
Create Dummy Hierarchy Creates a hierarchy of dummy nodes for the skinned mesh, where each node has the same name and transform as the corresponding bone and is bound to it with default settings.
Примечание
The hierarchy can also be generated for selected bones only.The hierarchy can also be generated for selected bones only.
The hierarchy can also be generated for selected bones only.
Создает для Skinned Mesh иерархию из Node Dummy , где каждая нода имеет то же имя и трансформацию, что и соответствующая кость, и привязана к нему с настройками по умолчанию.
Примечание
The hierarchy can also be generated for selected bones only.Иерархию также можно создать только для выбранных костей.
Bind Node Node whose transformation is used to control the transformation of the bone.Нода, трансформация которой используется для управления трансформацией кости.
Node Transform Basis Defines which transformation of the bound node (World or Local) is to be used to override the transformation of the selected bone.Определяет, в какой системе координат трансформации связанной ноды (World или Local) должны использоваться для перегрузки трансформаций выбранной кости.
Bone Transform Basis Defines which transformation of the selected bone is to be overridden by the node's transformation:
  • World coordinatesWorld coordinates
  • Coordinates relative to the skinned mesh objectCoordinates relative to the skinned mesh object
  • Coordinates of the parent boneCoordinates of the parent bone
World coordinatesCoordinates relative to the skinned mesh objectCoordinates of the parent bone
Определяет, какая трансформация выбранной кости должна перегружаться трансформацией ноды:
  • World coordinatesМировые координаты
  • Coordinates relative to the skinned mesh objectКоординаты относительно объекта Skinned Mesh
  • Coordinates of the parent boneКоординаты родительской кости
Bind Mode Defines the type of blending of node's and bone's transformations:
  • Override — replace bone's transformation with the transformation of the node.Override — replace bone's transformation with the transformation of the node.
  • Additive — node's transformation is added to the current transformation of the bone.Additive — node's transformation is added to the current transformation of the bone.
Override — replace bone's transformation with the transformation of the node.Additive — node's transformation is added to the current transformation of the bone.
Определяет тип смешивания трансформаций ноды и кости:
  • Override — replace bone's transformation with the transformation of the node.Override - заменить трансформацию кости трансформацией ноды.
  • Additive — node's transformation is added to the current transformation of the bone.Additive - трансформация ноды добавляется к текущей трансформации кости.
Position Offset Translation part of the additional transformation matrix applied to the node's transformation before applying it to bone's transformation. This parameter serves for the purpose of additional correction of the node's transform for the bone's basis.Перенос - часть дополнительной матрицы трансформации применительно к трансформации ноды перед применением к трансформации кости. Этот параметр служит для дополнительной коррекции трансформации ноды для основы кости.
Rotation Offset Rotation part of the additional transformation matrix applied to the node's transformation before applying it to bone's transformation. This parameter serves for the purpose of additional correction of the node's transform for the bone's basis.Поворот - часть дополнительной матрицы трансформации, применяемая к трансформации ноды перед применением к трансформации кости. Этот параметр служит для дополнительной коррекции трансформации ноды для основы кости.
Scale Offset Scaling part of the additional transformation matrix applied to the node's transformation before applying it to bone's transformation. This parameter serves for the purpose of additional correction of the node's transform for the bone's basis.Масштабирование - часть дополнительной матрицы трансформации, применяемой к трансформации ноды, перед применением к трансформации кости. Этот параметр служит для дополнительной коррекции трансформации ноды для основы кости.
Reset Node Transform Resets initial node transformation.Сбрасывает исходную трансформацию ноды.
Reset Bone Transform Reset bone transformation. This button is used to restore initial transformation of the bone after modifying it via a bound node.Сбросить трансформацию кости. Эта кнопка используется для восстановления первоначальной трансформации кости после ее изменения с помощью связанной ноды .

Optimizing Animation PlaybackОптимизация воспроизведения анимации#

Updating each frame a huge number of objects located far away from the camera that are hardly distinguishable or observed as a mass is a waste of resources.Обновление каждого кадра огромного количества объектов, расположенных далеко от камеры, которые трудно различить или наблюдать как массу, является пустой тратой ресурсов.

To improve performance and avoid the excessive load, animation playback can be updated with a reduced framerate. When the player is out of the area specified by Update Distance Limit, the animation stops to be updated and freezes statically.Чтобы улучшить производительность и избежать чрезмерной нагрузки, воспроизведение анимации может быть обновлено с уменьшенной частотой кадров . Когда игрок находится за пределами области, указанной параметром Update Distance Limit, анимация перестает обновляться и статически зависает.

The set of frame rates enables you to specify how often the animation playback should be updated when the object is visible, when only the shadow of the Skinned Mesh is visible, or when it is not visible at all.Набор частот кадров позволяет вам указать, как часто следует обновлять воспроизведение анимации, когда объект виден, когда видна только тень Skinned Mesh или когда она не видна вообще.

Parameters tab -> Periodic Update sectionВкладка Parameters → раздел Periodic Update
FPS When Object Is Rendered To Viewport Update rate value for the case when the object is rendered to viewport.Значение частоты обновления для случая, когда объект отображается в области просмотра.
FPS When Only Object Shadows Are Rendered Update rate value when the object itself is outside the viewing frustum, and only its shadow is rendered to viewport.Значение частоты обновления, когда сам объект находится за пределами области просмотра, и только его тень отображается в области просмотра.
FPS When Object Is Not Rendered At All Update rate value when both the object and its shadow are not rendered to the viewport.Значение частоты обновления, когда объект и его тень не отображаются в области просмотра.
Update Distance Limit Distance from the camera up to which the object should be updated.Расстояние от камеры, до которого необходимо обновить объект.
Примечание
These values are not fixed and can be adjusted by the Engine at any time to ensure best performance.Эти значения не являются фиксированными и могут быть изменены двигателем в любое время для обеспечения наилучшей производительности.

This feature is enabled with default settings ensuring optimum performance and can be adjusted per-object in the UnigineEditor or via API at run time.Эта функция включена с настройками по умолчанию, обеспечивающими оптимальную производительность, и может быть настроена для каждого объекта в UnigineEditor или через API во время выполнения.

Внимание
Please be aware that using reduced update frame rate for an object should be carefully considered in your application's logic, as it may lead to various issues with rendering Skinned / Dynamic Meshes (flickering due to misalignment, e.g. in case of attaching a cloth to a skinned mesh).Помните, что использование пониженной частоты кадров обновления для объекта должно быть тщательно продумано в логике вашего приложения, так как это может привести к различным проблемам с рендерингом Skinned / Dynamic Meshes (мерцание из-за несовпадения, например, в случае прикрепления ткани к Skinned Mesh ).

Controlling Morph TargetsУправление Morph Targets#

For meshes containing morph targets, the Morph Targets Preview list is available in the Parameters window. This set of parameters in the Editor allows visualizing what the model looks like with one or more morph targets applied. Actual application of morph targets and their weights is done via code.Для мешей, которые содержат morph targets, во вкладке Parameters доступен список Morph Targets Preview. Этот набор параметров в Редакторе позволяет визуализировать вид модели с примененными к ней morph target. Фактическое применение morph target и их весов осуществляется через код.

Each target has a slider that allows configuring its weight — the extent of the morph target's effect on the resulting view of the model.Для каждого target есть ползунок, позволяющий настроить его вес — степень влияния morph target на окончательный вид модели.

Basis represents the original position of all vertices of the mesh, and its slider is shown for reference.Basis представляет собой исходное положение всех вершин меша, и его ползунок показан для справки.

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