Sparrow WebGL Devlog 16: Animation Blending

Multiple animations and smooth animation changes

Christian Behler
Level Up Coding
Smoothly switching animations. Image by author.

Most video game characters have more than one animation: Walking, running, jumping, attacking, blocking, climbing, swimming, and more. But how do you import and store the different animations and most importantly, how do you switch between them?

The animation system is one of the most complicated aspects of any game engine. There is no universal approach that’s the best for all scenarios. The simplest approach would be to have one animation per model and when you want to change the animation, you just replace the whole model. On the other hand of the spectrum, you can have multiple animations for the same model and very advanced inverse kinematic rigs where the environment can control the animation (e.g. always placing the feet on uneven ground).

For now (and luckily), I don’t need fully environment-driven inverse kinematics for my WebGL engine, but the character for my new portfolio website needed to have at least two animations. This meant that I had to improve my old animation system which only supported a single animation.

Multiple Animations

The first thing I had to figure out was how to create multiple animations for the same model in Blender and how to export them to a…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

No responses yet

What are your thoughts?