Skip to content
Proyectos

Acerca de

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

Diseño y multimedia

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
+2
in 15 days
+2
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

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

Explorar proyectos relacionados

Cargando…