Animation Blending Library

Solo
C++
Animation
Team size Solo
Role Research and Development
Duration 8 weeks

BlendMotion is a standalone framework agnostic animation blending library that I created over 8 weeks in my second year at Creative Media & Game Technologies at Buas.

Background

This project started as a self study block in my second year of the Creative Media & Game Technologies study at Buas. The goal of this block was to do research on a game development topic and create something that could be used in later projects again. I decided on working on animation blending because this was something I had never done before and wanted to know more about!

Bone Masking

One of the features I added during this project was bone masking. This feature allows animators to create separate animations for actions without having to make the combination of all of those actions. For example a full locomotion animation set and a separate aim animation. They can be combined using layers and bone masking.

In the video there is an example of a walking animation combined with a aim animation. The animation for aiming does not contain any walk movement, so these animations are blended together using the bone masks. Using this system, it is possible to select the bones on which the animation should be played, which makes this very versatile. This example uses only two animations, but by adding more layers it is possible to create more complex behaviors.

Animation statemachines

One of the things that make this animation system work, is the addition of animation statemachines. These statemachines allow for way more complex behaviors. It allows the user to display different animations based on certain criteria. User input is an example that can be used to differentiate the animation that should be played.

Having a character that has the option to hold a weapon and attack with it is something that was made possible by the animation statemachines. The video shows how the weapon can be attached to one of 2 sockets and when it is attached to the hand, it can be used to create an attack. By setting up rules and conditions for the transitions between the states, this system can handle almost anything you want as long as you can make determine what animations should be played at what time.

2D blendspaces

The most important feature in this library was the ability to blend 2 or more animations together to get smooth animations. There are multiple ways to blend animations together. The two I decided to focus on were 1D and 2D blendspaces. Especially the 2D blendspaces are interesting because there are a lot of different techniques to blend the animations. Because this project started out as research there is the option to choose which technique gets used to blend the animations together.

The video above shows one of the 2D blendspace techniques on a locomotion animation set. This technique requires a minimum of 3 animations to start blending them together, but has the possibility to blend with a lot more animations. Different blend techniques have different rules as to how the animations should be blended together. Some techniques have falloffs, while other techniques have more animations with influence.

2D blendspaces

There are 2 different variables used for the blending. For example an x and y input direction. These variables create a position on a 2D grid which is used to determine how much of what animations should be played. The user determines what animation plays at what position of the grid.

The video shows a visualization of the 2D blend space with a couple of animations in there. The video shows a character moving around and a Blend Space Visualizer panel that shows a triangulation for the 2D blend space which is setup with an idle, forward, sprint, left stride and right stride animation. You can also see the target which is the actual controller input relative to the forward of the character.

End Result

I created a custom animation blending library that can be integrated in almost any 3D game engine project!

GitHub project

Feel free to reach out!

Jesse Mampaey

jesse.mampaey@gmail.com

Based in The Netherlands & available worldwide