MAB: Baking Animations

Workflow: Baking Animations

This is the core workflow for converting your characters into high-performance animated assets. This is all done using the Animation Baker tool.


Step 1: Prepare Your 3D Model

For this system to work, your character model must be optimized for instancing. This means it should ideally use only one material. If your model has multiple materials for different parts, you will need to combine their textures into a single Texture Atlas and re-assign the UVs in a 3D program like Blender.

To use GPU Instancing it is important that you set the bool „Enable GPU Instancing“ to true on your characters material


Step 2: Use the Animation Baker

  1. Open the baker window from the Unity menu: Tools > TopsonGames > Animation Baker.
  2. Fill out the fields in the window:
    • Character Prefab: Drag your original character GameObject or Prefab here. It must have a SkinnedMeshRenderer component.
    • Animation Clips: This is a list. Add all the AnimationClip files you want to bake for this character (e.g., idle, walk, run, attack).
    • Save Folder: The project folder where the new MeshAnimation assets will be saved.
    • Frame Sampling (%): A slider to reduce the number of baked frames. 100% bakes every frame, while 50% bakes every other frame. This is perfect for creating LOD versions of your animations.
    • Scale Correction Factor: Use this to fix scaling issues from your 3D application. If your baked character is 100 times too large, set this to 0.01.
    • Bones to Bake for Attachments: A list of bone names (e.g., mixamorig:RightHand) that you want to track for the attachment system. The names must be exact.
    • Create Character in Scene: If checked, the baker will automatically create a fully configured character in your current scene after baking is complete.
  3. Click the „Bake All Animations“ button.

Step 3: The Result

The baker will create one .asset file for each AnimationClip you provided. This MeshAnimation asset contains all the baked mesh frames, bone data, and other animation information, ready to be used by the MeshAnimator component. Please make sure that you assgin the right Material to your character (with Enable GPu Instancing set to true)!