Skip to content
Projets

À propos

A tool to bake VAT (Vertex Animation Texture) from AnimationClip with sample shaders for Unity.

Design et médias

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
+2
in 15 days
+2
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

VatBaker

npm version openupm

A tool to bake VAT (Vertex Animation Texture) from AnimationClip with sample shaders for Unity.

Installation

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

Usage

  1. Window > VatBaker
  2. Set a GamObject with Animation and SkinnedMeshRenderer.
  3. (Optional) Set other parameters.
  4. Push the Bake button.
  5. Assets are created under Assets/VatBakerOutput and a VAT GameObject is put in the hierarchy.

Use VAT on your shader

Use VAT functions at the vertex shader.

#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

Set material properties for VAT.

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.

Example Asset

Reference

Explorer des projets similaires

Chargement…