Advanced Animation Techniques: FK & IK

Hey guys, welcome back to the Wulverblog!

Evan Doody here with yet another tech art blog post! Due to the popularity of my Intro to Skeletal Animations post, I’ve decided to write an update that covers some of our new, more advanced techniques. My next three posts will cover some of the newer features the guys over at Esoteric Software have added to Spine since the last time I wrote about it, as well as some tricks and techniques we’ve learned to implement into our workflow. This post will be covering Inverse Kinematics, or IK for short.

FK and IK Rigging

A traditional skeleton rig uses Forward Kinematics. In an FK rig, each bone follows the parent bone’s behavior. If you rotate your shoulder, your elbow, wrist, and hand will follow. This type of setup is shown in Fig 1 on our archer character’s leg. When we rotate at his thigh, every bone down the hierarchy follows.

Fig-1-Forward-Kinematics

Inverse Kinematics work, as the name suggests, inversely up the skeleton hierarchy. With the addition of a “target” or “pin” bone, the angle between two bones can be calculated. Think of a hand glued to a table. As the body moves around, the elbow bends accordingly. IK Rigs are particularly useful in the legs of skeletons.

Fig-2-Inverse-Kinematics

An IK set-up is the easiest way to make sure the feet remain planted on the ground while the body above is free to move. One of the earlier problems we faced in Spine (before IK was added as a feature) was making sure the feet felt planted during idle animations. This required many additional keyframes, and occasionally caused a subtle shaking in a character’s feet.

Fig-3-FK-vs-IK

Spine lets the user tween between Forward Kinematics and Inverse Kinematics. This lets us use IK when we want feet to be planted (Standing/Attacking), and FK when we don’t (Knocked Down/Jumping). You can even change the strength of IK influence mid animation, to have a little of both. In a walk cycle, when the feet are on the ground they can be controlled by IK, and when they are lifted they can be switch to use FK. This is extremely helpful, and saves a lot of time while animating. 

Experimenting and Expanding on the Basics

I also enjoy trying to use IK in more interesting ways to improve animation workflow. Our Archer uses a skinned mesh and several bones to allow his bow to bend backwards as the the string is drawn. Although the basic FK set up works well enough, every time we want to bend the bow in any way, we have to key each bone in the bow and make sure the top and bottom are bending the same amount. This is tedious and more likely to cause problems or look unnatural. 

Fig-4-Drawing-FK-Bow

Using IK, I created a single bone that could control the entire bow: bend each limb of the bow back, have the bow bend more towards the tip than at the grip, keep the string pointed at a single point, and have the drawing arm follow. I was able to achieve all of this under a single “bow controller bone.”

Fig-5-Drawing-IK-Bow

With a lot of experimenting, positioning, and changing of bone order, I was able to tie everything I wanted into the scale of a single bone. Each bone in the bow is pointing to a child bone of the bow controller. Each of those children inherits the scale from the bone above it. This set up makes the makes the bow bend more the further away it is from the grip. A standard IK constraint makes the hand follow the string. This made a potentially slow and painful process for our animator quick and easy. Every bow-wielding character in Wulverblade uses this set up.

Inverse kinematics are an extremely useful tool and always fun to experiment with. Combined with other newer features, like Skinned Mesh (which will be our next topic here on the Wulverblog), we are able to get some really fantastic, expressive movement out of our characters. Make sure to check back in a few weeks for our next installment of advanced rigging and animation techniques. As always, thanks for reading! Make sure to subscribe to our newsletter for our latest updates, and follow us on twitter @evandoody and @michaelheald. If you have any questions or comments, feel free to share down below!

Until next time,

Evan Doody

 

 

  • Felix

    Really cool stuff – when is the next blog post coming? ;)

    • Evan Doody

      New one actually just went up! Thanks for reading!