HELLO, just a mini post about Inverse Kinematics (IK) and it’s use in the Finger of God death modifier, included in the most recent release of Friendship Club.
“WHAT IS IK!?”, I hear you scream into the abyss? WELL, say you’ve got your hand on a table, then twist your upper body one way or another whilst keeping your hand on the table, in animation terms that movement would be an example of inverse kinematics. Your hand is anchored to the table, and won’t just slide off the table matching the rotation of your upper body. There are far more technical and detailed explanations of IK out there on the internet, but this is a shortish post so, I’ll direct you to this.
Squidgy!
As previously mentioned, we’re using Spine in Friendship Club for character, environment and effect animations. The characters have a basic rig, but one that doesn’t use IK, as it wasn’t available in Spine when we first moved all the animations over to it. I’m intending to retrofit their legs with IK in the near future, but the rest of their bodies don’t need it. This is due to the types of positions and movements they make during the game - it adds a lot of cartoony personality to the character animations when you’re able to ‘break’ their skeletons easily for extreme movements or poses!
…like this one.
Bones and IK nodes.
The Finger of God uses IK so it looks like it’s squishing things properly. You can see the finger tip hit the ‘floor’ and bend back, along with the second knuckle of the finger. We wanted it to be really over the top, squashing and stretching as needed, and looking really forceful as it descends towards a character. There aren’t that many bones in the finger - only enough to bend the index finger and deform the wrist.
The rest of the animation is created by the weighting of various points in the mesh of the hand. What I mean by that is that for the hand to deform at all, it needs to be transformed into a mesh made of points that can move and warp in the Spine editor. In the first image (captioned “squidgy”), you can see the image distort as it is turned upside down; parts of the PNG image of the hand are linked to these points and move the image with them as they are moved. The weighting is the influence the bones have over these points. You can assign different bones different percentages of influence over points near, or far away from them. This is how you can add quite a bit of movement to the different parts of the hand, with very few bones - like the 4 curled fingers bending slightly as the hand moves.
The other bonus to IK is that to achieve all the movement in that hand - the wrist twisting, the finger pointing, the bending and squishing at right angles - all of that was achieved with one control node. Just one. All that movement and juicy squishiness, from one node. It’s great!
This hasn’t been an in-depth view into IK, or perhaps even a particularly useful one… but I hope someone out there finds it interesting!
- Tom
Let me know what you think in the comments, on Twitter or on Facebook, and please follow this page on Game Jolt to keep up to date on the game’s progress.
1 comment