- Notifications
You must be signed in to change notification settings - Fork48
Fast GPU vertex shader based animation library for Unity (VAT, Vertex Animation Texture, Morphing Animation)
License
codewriter-packages/Mesh-Animation
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Mesh Animation is lightweight library for rendering hundreds of meshes in one draw call with GPU instancing.
NOTE: To use MeshAnimation library you need to installTri Inspector - Free and open-source library that improves unity inspector.
Mesh Animation bakes vertex positions for each frame of animation to texture. Custom shader then move mesh vertexes to desired positions on GPU. This allows draw the same original mesh multiple times with GPU Instancing. Unique animation parameters are overridden for each instance with Material Property Block.
- Supported up to 2048 vertices per mesh.
- Bakes one SkinnedMeshRenderer animation per prefab.
- Requires special shader for vertex animations.
- Animations can only be baked in editor mode.
- Possibly low animation quality on some GPUs.
- Vertex animation may be not supported on some old devices.
- Create Mesh Animation Asset (in
Assets/Create/Mesh Animation
menu). - Assign skin, shader and animation clips fields in inspector.
- Click
Bake
button. - Assign generated material to gameObject.
- Add
MeshAnimator
component to gameObject. - Play animation from code.
gameObject.GetComponent<MeshAnimator>().Play("Zombie Walking");
Works with Humanoid. Not works with legacy. Other not tested.
About
Fast GPU vertex shader based animation library for Unity (VAT, Vertex Animation Texture, Morphing Animation)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Contributors2
Uh oh!
There was an error while loading.Please reload this page.