Cool Materials for Unreal
- UE5 Niagara Fluid FX
- IK Interactions
- Dynamic Atlas Baker
- Hello world!Welcome to Kenta Sites. This is your first post. Edit or delete it, then start writing!
- Vertex Animated Textures
VATs
Bake Tool
As of Unreal Engine 5.2 the AnimToTexture Plugin is your source for converting skeletal animation sequences into vertex animated textures for static mesh objects.
Setting up the bake process is not exactly straight forward and can take a minute, which is why I created an Editor Utility Widget that takes you through the steps to bake your assets.
When used with Materials that implement the VAT Layers, the bake tool will automatically fill in the animation details of the MI, speeding up your workflow.
VAT Material Layers
For ease of use and modularity, I break up our VAT Mode options into 2 Material Layer Types, which are selectable in the Material Instance’s parameter settings:
ML_VertexAnimation_Multi
Vertex animation bakes 2 textures: Vertex Position & Vertex Normal. The accuracy of the geometry deformations is fairly low, you will get some sharp edged corners not seen in the original skeletal mesh animation. The animations simply lerp between each frame.
ML_BoneAnimation_Multi
At the cost of 1 more texture sampler, this version uses 3 textures: Bone Position, Bone Rotation, & Bone Weight; which produces more accurate deformations.
VAT Material Functions
Related to each of the VAT Mode Type Layers, we have two Material Functions: MF_VertexPositionAndNormal & MF_BlendBonePositionAndNormal. These nodes do the bulk of the work translating the textuer data into World Position Offset and Normal values.
VAT and LODs
This is where the performance gains are really seen with VATs, but this is even less straight forward the initial bake itself.
The easiest method is to import each LOD level as a separate mesh into UE and go through the bake process individually. You then have to make new material instances for each LOD level and apply their specific VAT texture set.
For Bone VAT sets, the Position and Rotation textures will remain the same for each LOD level, only the Weight texture will change.
Take advantage of Material Instance Parental Hierarchy. That way you won’t have to duplicate any parameter values other than the specific values related to the LOD level.