Home

Awesome

Mesh Animation Github license

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 install Tri Inspector - Free and open-source library that improves unity inspector.

preview

How it works?

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.

Limitations

How to use?

  1. Create Mesh Animation Asset (in Assets/Create/Mesh Animation menu).
  2. Assign skin, shader and animation clips fields in inspector.
  3. Click Bake button.
  4. Assign generated material to gameObject.
  5. Add MeshAnimator component to gameObject.
  6. Play animation from code.
gameObject.GetComponent<MeshAnimator>().Play("Zombie Walking");
<br>

Mesh Animation

FAQ

Which Rig AnimationType are supported?

Works with Humanoid. Not works with legacy. Other not tested.