Post news Report RSS Angular and linear keyframe blending

In games, character animation is usually done using keyframes. That is, by defining important poses and placing them on a timeline.

Posted by on

In games, character animation is usually done using keyframes. That is, by defining important poses and placing them on a timeline. For example, in a roll animation, the keyframes might look like this:


Note the green and red borders around keyframes 1 and 2 -- they will make it easier to identify them again later.

As you can see, there are only five frames here. However, if the roll lasts for a second and the display refreshes at 60 frames per second, we need to stretch these five frames out to 60 frames! To make this look smooth, we need to create 'in-between' frames that connect the keyframes in a believable way.

The most simple solution is to linearly blend the position and rotation of each bone from one keyframe to the next. Here are some in-between frames created using this method:


This gets the job done, but not very well. The linear arm movement looks unnatural -- the hand appears to bend backwards and pass through the thigh.

The easiest way to solve this kind of problem is to use angular blending. In this method, we pick a root bone (usually the pelvis) and then propagate local rotations out from there. For example, in this roll transition, the wrist joint has no independent movement, but inherits the rotation of the arm and upper body. Here are some in-between frames using angular blending:


In this case, the angular blending works much better than linear... not surprising for a roll animation! However, we often need to combine linear and angular blending in the same animation (as in a punch or kick), or need to change the root of the angular hierarchy (as in a swing or throw). We can look at how these more complex cases work later.

Do you have any questions about how these blending methods work? The rolling in Overgrowth is more complicated than just blending between five keyframes, but I simplified it for clarity here.



Track us
on ModDB (visit our page)

Please join us here too:
Facebook icon ModDB icon Steam icon Twitter icon YouTube icon

Post comment Comments
Ryswick17
Ryswick17 - - 416 comments

(buried)

Just out of curiosity, why are you explaining how keyframes work?

Reply Good karma Bad karma-14 votes
jeffr Author
jeffr - - 383 comments

We recently added angular keyframe blending to the engine and when we add new features, we traditionally explain what they are.

Reply Good karma+10 votes
SliderFF
SliderFF - - 896 comments

It isn't necessary to some people, but the majority of local inhabitants interestingly, continue in the same spirit!

Reply Good karma Bad karma+7 votes
qeloqoo
qeloqoo - - 58 comments

Do you plan to release some sort of tutorial-compendium "Overgrowth: Behind the 'rock'"?

Reply Good karma Bad karma+9 votes
Smoth
Smoth - - 1,098 comments

I do not know about such things and enjoy reading these peaks into how engines can work.

Reply Good karma Bad karma+3 votes
Dragonlord
Dragonlord - - 1,934 comments

He's though right in one thing. Explaining Forward Kinematics as a news post is really a bit heavy. As an article or a profile-private news/article this is okay but pushing real news off the front page with a mini-lecture on FK which you can find in less than a few seconds on google is rather questionable.

Reply Good karma Bad karma0 votes
Betelgeuze
Betelgeuze - - 872 comments

Be carefull saying that, before you know it they contact your project leader!

Reply Good karma Bad karma+1 vote
Blandr3ws
Blandr3ws - - 84 comments

I disagree, posts like these show genuine progress being made with the engine so are very valid news.
And as for knocking other posts off the front page, there are many articles that are simply just 'look I threw together a few brushes in hammer maybe in 6 months we might be able to call this a map!, and here's some retardedly hi-poly 'things' some-one tweaked in mudbox/zbrush :D'
However I do understand that some of Overgrowth heavier dev posts (this really isn't one of them!) that many mod players won't full understand them but I'm sure the majority still greatly appreciate them.

ps qeloqoo's idea of a book would be freaking awesome, I'd definitely buy it :)

Reply Good karma Bad karma+4 votes
Dragonlord
Dragonlord - - 1,934 comments

I agree that these kind of news posts are not news posts neither and should not end up on the front page too. ModDB is a bit slacking on that part recently.

Reply Good karma Bad karma-2 votes
jeffr Author
jeffr - - 383 comments

Dragonlord, clearly I should be running my news by you first instead of the actual ModDB staff members! :) Sadly you haven't responded to my email or friend request.

Reply Good karma+2 votes
Dragonlord
Dragonlord - - 1,934 comments

Not my job. But that doesn't mean I'm not allowed to criticize it ;) . And what goes for this friend crap... I don't give a damn about this Web 2.0 social network crap so unless there is a good reason I randomly hit accept/deny :P

Reply Good karma Bad karma+2 votes
Tex1090
Tex1090 - - 148 comments

You're right, it isn't your job. You may be able to criticize it, but criticize the correct people (the staff who approve the posts) and not the people who submit them.

I personally find it interesting, I'm no good at anything to do with game design, but I still like to look into it and read about how an engine does certain things or what processes are being taken to do something. Wolfire just so happens to do those things in their news posts (and blog), which is very interesting to me and many other people.

Reply Good karma Bad karma+2 votes
iopzx
iopzx - - 148 comments

YOU FOOL! STOP MAKING FUN OF YOUR SELF.

Reply Good karma Bad karma+1 vote
stoopdapoop
stoopdapoop - - 151 comments

wait, so you guys build animations in engine?

That's interesting.

Reply Good karma Bad karma+2 votes
jeffr Author
jeffr - - 383 comments

Yeah, we built our own animation tool! This video is quite out of date, but should demo the early versions of the animation editor: Youtube.com

Reply Good karma+1 vote
Fjahgo
Fjahgo - - 30 comments

Doesnt matter if i or other people knew it already, i (and others too, i bet) always find it interesting to read about game mechanics :)

Reply Good karma Bad karma+4 votes
SolidFake
SolidFake - - 1,200 comments

I'm as well, but I'm still missing gameplay :P

Reply Good karma Bad karma+1 vote
symbolzzzz
symbolzzzz - - 282 comments

As ever a good and interesting read.
Thanks and keep it up.

Reply Good karma Bad karma+1 vote
aerozol
aerozol - - 179 comments

As a martial artist, I really don't think I was looking at what I'm meant to in this news item... Mr. Rabbit really needs to extend his arm more, or at least his shoulder, so the roll is more diagonal across the spine.
apologies, I can't help it (;

Reply Good karma Bad karma+2 votes
Awesome_ninja
Awesome_ninja - - 809 comments

well, you are currently helping them by tellign how to do it right =)

Reply Good karma Bad karma+1 vote
Lopper
Lopper - - 1,559 comments

Why's it called a "Keyframe" anyways?

Reply Good karma Bad karma+1 vote
hogan_skoll
hogan_skoll - - 359 comments

because there are only several 'key' - important frames in the animation, where the character is posed - and the engine fills in the gaps.

Reply Good karma Bad karma+2 votes
NullSoldier
NullSoldier - - 973 comments

I find this very interesting. I'm just now getting into 3D programming. I've been addicted to 2D for so long.

Reply Good karma Bad karma+1 vote
Dra6o0n
Dra6o0n - - 534 comments

The movement of the rabbit keeps reminding me of that disney character... Goofy?

-_-;

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: