This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
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
Учебные материалы

Сэмпл Vertex Animation (анимация вершин)

This material graph sample demonstrates how to use a vertex animation texture in UNIGINE.Этот сэмпл графа материала демонстрирует, как использовать текстуру анимации вершин в UNIGINE.

Vertex animation can be baked into a texture via one of the modern DCC tools (the example contains textures baked in Blender) and then exported as a set of several files: a geometry file (.fbx) and texture files: textures for the model and textures storing animation (an .exr texture with position offsets and a .tga texture with normals). Then these files are imported into UNIGINE to create the material graph.Анимация вершин может быть преобразована в текстуру с помощью какого-либо из современных графических редакторов (пример содержит текстуры, обработанные в Blender), а затем экспортирована в виде набора из нескольких файлов: файла геометрии (.fbx) и файлов текстур: текстур для модели и текстур, хранящих анимацию (текстура .exr со смещениями положения и текстура .tga с нормалями). Затем эти файлы импортируются в UNIGINE для создания графика материала.

The textures with animation are imported with the following settings:Текстуры с анимацией импортируются со следующими настройками:

Текстура Position offsets Текстура Normals
  • Image Type: 2D
  • Image Format: RGBA16F
  • Mipmap Type: Box
  • Mipmap sRGB Correction: Enabled
  • Image Type: 2D
  • Image Format: RGB8
  • Mipmap Type: Box
  • Mipmap sRGB Correction: Enabled

Albedo and Roughness data for the Vertex Animation material are sampled via the Sample Texture node from the provided albedo and shading textures with accordance to the specified UVs (the Vertex UV 0 node). The Roughness data is also multiplied by a roughness coefficient after sampling. Данные Albedo и Roughness для материала Vertex Animation отбираются через ноду Sample Texture из предоставленных текстур albedo и shading в соответствии с указанными UV-координатами (нода Vertex UV 0). Данные Roughness также умножаются на коэффициент шероховатости после сэмплирования.

Object-space Normal data for the material is obtained by blending of tangent-space normals sampled via the Sample Texture node from the provided normal and animation normal textures and subsequent transforming the output tangent-space normals to the object-space ones (the Rotate Space node). Данные Normal пространства объекта для материала получены путем смешивания нормалей пространства касательных, отобранных через ноду Sample Texture из предоставленных текстур normal и animation normal, и последующего преобразования выходных нормалей пространства касательных в нормали объектного пространства (нода Rotate Space).

At that, when sampling of the animation normal texture is performed, the original UV is modified as follows: the U coordinate is provided by the Vertex UV 1 node, the V coordinate is the time multiplied by the animation speed. After sampling, vertex interpolation is performed (the Vertex Interpolation node). При этом, когда выполняется выборка обычной текстуры анимации, исходный UV изменяется следующим образом: координата U предоставляется узлом Vertex UV 1, координата V - это время, умноженное на скорость анимации. После выборки выполняется интерполяция вершин (нода Vertex Interpolation).

Vertex Position data for the material is sampled via the Sample Texture node from the provided position offsets texture according to the UV that is modified as follows: the U coordinate is provided by the Vertex UV 1 node, the V coordinate is the time multiplied by the animation speed. After sampling, the data is multiplied by the vertex offset intensity and then added to the Vertex Position. данные Vertex Position для материала отбираются через ноду Sample Texture из предоставленной текстуры position offsets в соответствии с UV, который изменен следующим образом: координата U предоставляется узлом Vertex UV 1, координата V - это время, умноженное на скорость анимации. После выборки данные умножаются на vertex offset intensity, а затем добавляются к Vertex Position.

The resultРезультат
Последнее обновление: 19.12.2023
Build: ()