A tool to bake VAT (Vertex Animation Texture) from AnimationClip with sample shaders for Unity.
Edit > ProjectSettings... > Package Manager > Scoped Registries
Enter the following and click the Save button.
"name": "fuqunaga",
"url": "https://registry.npmjs.com",
"scopes": [ "ga.fuquna" ]
Window > Package Manager
Select MyRegistries in Packages:
Select VatBaker and click the Install button
- Window > VatBaker
- Set a GamObject with Animation and SkinnedMeshRenderer.
- (Optional) Set other parameters.
- Push the Bake button.
- Assets are created under
Assets/VatBakerOutputand a VAT GameObject is put in the hierarchy.
#include `Packages/ga.fuquna.vatbaker/Shader/vat.hlsl`vertex shader
float animationTime = CalcVatAnimationTime(<baseTime[sec]>);
float vertexPositionLocal = GetVatPosition(vertexId, animationTime);
float vertexNormalLocal = GetVatNormal(vertexId, animationTime);See VatUnlit.shader, VatSurfaceStandard.shader
| Property name | Value |
|---|---|
| _VatPositionTex | Assets/VatBakderOutput/*/*.posTex.asset |
| _VatNormalTex | Assets/VatBakderOutput/*/*.normTex.asset |
| _VatAnimFps | Baked animation fps |
| _VatAnimLength | Baked animation length[sec] |
It is recommended to duplicate the material under Assets/VatBakerOutput and change the shader so that the original property values can be used as they are.
- Rhino Animation Walk © GremorySaiyan (Licensed under CC BY 4.0)