Why l'm learning IK
I never paid too much attention to programming animations until recently.
I used to look for an art asset to build some sort of game or tech demo around. Playing the animation and having it manage through a state machine or blend tree seemed good enough. If the animation didn't play well in certain situations I would shrug my shoulders and think that was it for the art asset. It had limitations and I had to work around them. It was the animators fault for not putting in more or better animations. I did not have a list of 200 animations to work from per character, like all the major studios do. Just play the animations for walk, jump, crouch and run, I would think to myself, the rest is the animator's problem. If a character died, have the ragdoll mode activate.
There are many ways a programmer can make an animator's character animation look like crap. For example, if the blend curve between two animations is done directly in code, the wrong equation or wrong blend type, and boom, you've created a visual error. Of course, now we have game engines with visual tools to refine the animations and fix visual bugs with a click of a button.
Graphics, more than anything are driving the sales of new games, and annoying visual bug are the most visible in a prototype demo. It leaves the investor or publisher wondering if it will be this way in the final game. Most of human communication occurs through body language, and communicating the narrative of a game works the say way. If the visuals are off, the body language is off, and so the narrative is off. Worse, these glitches draw the player's attention out of the gameplay and break the fifth wall.
Inverse kinematics provides many solutions to visual bugs in games, its not the end all, but it could be with the right team and with the amount of development.
These visual bugs can include:
1. Sliding against a wall in a jump pose.
2. Hand grips in climbing animations not aligning with handholds.
3. Standing horizontally on an incline.
4. Jumping onto a horse with hands not aligning with the horse's mesh.
5. Hands not aligning with picked up objects.
6. Jumping from a small surface, feet jump off a surface of air.
7. The character's collider(s) being pressed against by an object. Character remains idle.
8. Character not making visual contact during conversation.
9. Character shooting weapon directly forward when a target is above or below.
10. An attack movement like a spear thrust, completely missing a character's body mass.
11. A shot registers to only one body part. But the whole body plays a hit animation.
12. An so on.
A robust system is going to need a well thought out design to handle all of these situations and in an extensible way. It is going to need some data structure, hierarchical state machines, animation behavior trees or something. Not to mention logic collision can occur between similar states. And the sort of programmer who fixes these things is going to have an eye to spot these visual bloopers.
When early 3D animations appeared in games, players accepted 3D constraints of 3D animation. But more recent games have used inverse kinematics to provide better visuals, and now IK is becoming an expectation for good visuals. Video Games are compared to other video games in the genre. It is just how it works. IK is a becoming a requirement, its actually becoming a requirement for even junior animation programmers at some studios.
Unity3D offers solutions for IK visuals fixing feet, hand, torso and head positions. Its so simple it feels like cheating, too easy, and there can be too much of a black box if you want to learn to do something more advanced. Certainly unity 3D can adjust the foot position for a biped quite easily, but what about a quadruped?
If I did make an IK tool, I'd like to make one that is better than the next guy. But if I did make a tool for a game engine, the engine takes a cut of my income too. We'll see where this goes. I'm not going to lie, I've looked at some equations, articles, and some functions in game engines, its a start. Only a start.
So that is how I figure learning IK is going to be useful and an asset.
Discussion