Welcome back to the world of games on The HotSeat! This week, I’ll be talking about Inverse Kinematics. Never heard of it? I’ll be willing to bet that if you ever played a 3D perspective game any time in the last decade you may have come across it. It’s one of those things that is vital to making a character moving in 3D environment that little bit more realistic. On to Exhibit A!

Exhibit A –

This is a wireframe of a humanoid character in a videogame, it shows the ‘skeleton’ if you will, of the character, where all of the joints are connected to create points of articulation and movement during character animation. While it gets pretty complex pretty quick (most people need a degree in computer animation to do this stuff), I just want to point this wireframe out because it is the basis of how Inverse Kinematics works.

So, what exactly is Inverse Kinematics you ask? Well, simply put, Inverse kinematics is important to game programming and 3D animation, where it is used to connect game characters physically to the world using dynamic mathematical calculations, such as feet landing firmly on top of terrain. Cue Exhibit B!

Exhibit B

1

In this in-game screenshot of The Shadow of the Colossus for the PS2, if you would just ignore Agro (the horse) on the left there having a fit, and focus on the player character in the middle (his name’s not explicitly clear, so let’s just call him Wander). Take a good look at the character’s feet placement. You will see that Wander’s feet, and by extension his entire legs are planted on the uneven ground in a way that is rather realistic. His feet doesn’t ignore the terrain he is standing on, and this my friends, is through the technological magic that is Inverse Kinematics!

An important point to remember here is that Inverse Kinematics can be applied not just to feet, but to other limbs or general body parts, but this means that the wireframe must be properly configured for this to happen. In The Shadow of the Colossus, Inverse Kinematics was applied to many things:

  • Agro’s and Wander’s entire bodies when Wander is riding him, to help simulate the look and feel of real-life horse-riding.
  • Wander’s entire body when he scales the mighty Colossi in the game, in combination with the physics applied to him when the beasts make movements, simulating the realistic changes in body movement that occur when actively climbing a moving object.

Wow! Inverse Kinematics sure is dandy, isn’t it! Let’s take a look at another example. Cue Exhibit C!

Exhibit C –

2

This is another in-game screenshot, this time from Dark Souls for the PC/Xbox360/PS3. You can see here once again, how the playable character’s feet understand where they should be planted while standing on some stairs. The feet on the left are understood as being planted higher up, so the rest of the left leg bends forward, mimicking actual legs. Once again, a powerful tool when utilized in a game that focuses on visual realism.

But the thing is, this isn’t the magical one size fits all that 3D games need. The sad thing about Inverse Kinematics is that it is more of a bells and whistles-like feature, rather than a mandatory part of 3D animation, due to several factors:

  1. This stuff is really hard to program.
  • The programming involves how to dynamically (yeah, that’s right, DYNAMICALLY, as in… in real time, while the game is running) calculate the placement of characters’ body parts in relation to the rest of the world, and then complete the calculations and perform the dynamically generated animations to create the visual effect.
  • This stuff is so hard, that most small-time indie companies and even larger companies without an extensive animation department can’t feasibly program Inverse Kinematics for their games.
  • Don’t take my word for it, see for yourself! The following is one common mathematical technique for creating the Inverse Kinematic algorithm:

Exhibit D –

3

  1. This stuff is kinda’ taxing on your processor.
  • Remember the keyword: ‘dynamically’, well, that doesn’t come for free. You need to tax the processor of the computer running the game to constantly perform these calculations really quickly, otherwise they would appear delayed on-screen, and be hilarious and not realistic at all.
  • This is not unlike the dynamic calculations done for shadow effects in games nowadays, these dynamic calculations are sometimes the thing that decides whether a game can even be played on certain platforms. Most consoles in the past would struggle to process all these dynamic calculations, and sometimes a game developer will decide to not bother with them, just for the sake of better performance on their chosen systems. A shame, but that’s how it is.
  1. Maybe it doesn’t fit with the visual style of your game.
  • Not every game’s visual aesthetic has to be realistic-looking, so you might reconsider applying Inverse Kinematics to certain things in the game just so you can maintain whatever visual style you were going for.
  • Take MineCraft for example, it was made on a low budget by a tiny team of developers, and the game, while in 3D, was coded in Java, so if they wanted to have Inverse Kinematics, it would have taken so much time, hardship and money that it wouldn’t be worth having the effect. Besides, the game’s visuals wouldn’t stand to gain much anyways, so in this situation… Who needs Inverse Kinematics when you got a full set of Iron Armor AND can hover in the air!

Exhibit E –

4

Well, if you managed read through all of that stuff above, then congratulations on making it to the end! Nothing like a good bit of learning to get you more excited about all the small little features in games that you never knew had so much work and effort put into them. The lesson to take home here is that a lot of the things that make up a solid gaming experience are often taken for granted, but hopefully this time we spent together here will get you to appreciate all the little things in games (and in life!) from now on!

Next week on The HotSeat, shut your blinds, hide your children, and turn down the lights as we’ll delve deep into the pit of darkness that is:

“The Science behind Horror Games or this is why I play scary games in broad daylight surrounded by fluffy animals”

ArcticLyrae is a 3rd-year Monash University Sunway undergraduate with great enthusiasm for all things related to gaming in its many forms. He writes articles discussing various gaming-related discussions in his weekly blog, The HotSeat.


Leave a comment