Skip to main content

Animation Baking

Animation baking is a technique used to convert animations from avatars, to generic animations. Currently, Luna does not support avatar animations, and so they must be baked in order to be used with the Luna Engine.

In order to bake your avatar animations, we recommend animation baker.

Using the Animation baker plugin#

Animation baker is a free plugin, downloadable from the Unity asset store - use this link

To begin using this plugin to convert your Avatar-based animation into animations that are supported by Luna, there are a few steps that are required for you to take:

Import Animation baker into your Unity Project.#

  1. Open Window > Animation baker
  2. Select the avatar character and click inside the baker window to add it to the character list
  3. Select the Animation and click in animation list inside the baker window to add it in
  4. Start recording animation

Preparing the animation#

Open up the Animation baker window and start adding in the character and animation.

images-small

In the example below both the character and animation clips are added inside the Animation baker window from the asset folder. Once you have the characters and animations you can click Start recording to begin the capture.

images-medium

Upon completion of the recording process a new animation clip will be present inside the AnimationBaker > UnityAnimations.

images-small

Once recording is complete you are happy with the newly created animation, you can add it to the character like a normal animation, using Animation controller and setting up the new animation which can now be used in your Luna builds.

Before starting a Luna build, navigate inside the Luna UI window > Source code and exclude the animation baker folder. This will exclude only the C# files that would normally cause errors in the build process. This will not exclude the animation clip.
images-medium

Animation Size#

Recording the animation with keyframes can also bloat the size of the animation, due to the number of keyframes required.

There are some things to consider in order to help reduce its size:

  1. In the Animation baker window, Recording options you can incrementally reduce the Samples count.
images-small

Depending on how low you go it will reduce the amount of keyframes used in the animation clip. In turn this will also reduce its size.

Keep in mind that lowering the sample count will also lower the animation quality.
  1. Options Checked for root constraints and baked options can also inflate the size of the animation clip.