This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
Tutorials

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.顶点动画可以通过现代DCC工具之一烘焙到纹理中(示例包含在Blender中烘焙的纹理),然后导出为一组文件:一个几何文件(.fbx)和纹理文件:用于模型的纹理和存储动画的纹理(一个.exr纹理与位置偏移和.tga纹理与法线)。然后将这些文件导入UNIGINE以创建材质图。

The textures with animation are imported with the following settings:使用以下设置导入带有动画的纹理:

位置偏移纹理 法线纹理
  • 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. Vertex Animation材质的AlbedoRoughness数据通过Sample Texture节点从提供的albedoshading纹理中根据指定的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数据是通过混合从提供的normalanimation normal纹理中通过Sample Texture节点采样的切线空间法线来获得的,随后将输出的切线空间法线转换为对象空间法线(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结果
最新更新: 2024-08-16
Build: ()