THOUGHT:

Investigating animation retargeting

Corporation Pop undertook an animation retargeting research project aimed at finding ways to reuse animations. We wanted to be able to apply them to a range of 3D characters regardless of height, build or anatomy. This is what we discovered.

Characters in virtual spaces, like 2D platformers, 3D game worlds, movies and metaverses, need animation to convey movement and emotion. 

Usually an animation only suits one particular character’s height and build, limiting its use. Furthermore, it’s often expensive to create these animations to a high standard. When you have lots of characters, costs are then multiplied and before you know it, you’ve blown your budget.

Four characters of varying height and build

Goals

The key benefit of making modular, reusable animations was time saving which ultimately has a positive impact on budgets. If we didn’t have to start from scratch with every project, we could focus more on other areas of development.

What we didn’t want, however, was for it to be obvious that all characters had the same animation. Our goal was still to produce characters with their own traits and personalities. For instance, in a running animation an elderly character should have smaller steps than a younger one.

Naturally there were several considerations and challenges to address and overcome which you can read about below.

Root Motion

Root Motion is the motion of a character based on an animation from the root bone of the skeleton. We needed to understand how root motion variations affected different characters’ movement so we did some testing. 

We looked at a walking animation across different 3D characters and made some interesting observations. Retargeting of animation was successful, however, perhaps predictably, the bigger a character’s step, the further they walked. This led to an unwanted mismatch in speed between characters. 

We negated this by adjusting animation speeds so steps were slower with a slower root motion. We also restricted the step on larger characters which moved too fast, by limiting how much their bones could rotate using Unity’s avatar system.. This meant the character took smaller steps using the same animation. Problem solved.

Robot character in motion
Unity avatar

Anatomy

Next up, we investigated the effects of anatomical differences on characters using the same animation.

The Unity game engine has assets called Animator Controllers. Animators use these to set up animation trees and control when different animations occur. Within them, there is an Override Controller asset which swaps out animations altogether. This means if an animation is not suitable for a character’s physique or personality we can swap it for another.

This is important because it means we can use one Animator Controller for all the characters in a project. Doing this optimises the set up of characters as we’ve only one Animator Controller to focus on. This is important because it means we can use one Animator Controller for all the characters in a project. Doing this optimises the set up of characters as we’ve only one Animator Controller to focus on.

This is important because it means we can use one Animator Controller for all the characters in a project. Doing this optimises the process of setting up characters as we’ve only one Animator Controller to focus on.

This offers more consistency between characters, improved performance and easier collaboration amongst the rest of the team.

Character skeleton setup

Animations drive characters, by moving skeletal rigs, which move the 3D model. We needed to understand if an animation would still work when a model has a different skeletal rig.

We used Unity’s avatar system to re-target animations to different bones in a skeletal rig. Animations may have differently named bones however, Unity can still link them with corresponding bones on a typical 3D character. We then used an IK (Inverse Kinematics) system to drive the feet making them follow the original animation more closely.

Unity’s IK system supports chains in characters meaning we could have an IK bone touch another object directly. This allowed us to set characters’ feet to always connect with the floor whilst walking regardless of leg height. Handy when you don’t want them to wander off into mid-air. We could also set hands to always connect when clapping, regardless of the distance between their arms. 

Animation uniqueness

Something we want to avoid when using the same animation for different characters, was them appearing too similar. We decided the best way to do this would be to add subtle differences to each of them. Their unique anatomies and sizes immediately helped the animation look different which was a great start.

Being able to specify how a skeletal rig should move gave us more control over animations. We could limit the rotation of individual bones which directly affected how the characters moved. This in turn affected how each character performed the animation, thus differentiating them and offering them unique personalities.

Outcome

Corporation Pop’s research into animation retargeting has successfully developed a method to reuse animations across a range of 3D characters, regardless of their height, build, or anatomy. 

By investigating and addressing challenges such as root motion variations, anatomical differences, and character skeleton setups, we have optimised the animation process to save time and costs while maintaining unique character traits. 

Our use of Unity’s Animator Controllers, Override Controllers, and IK systems ensures consistent and adaptable animations. This ultimately allows for more efficient and cost-effective character development in virtual spaces.