Sunday, April 24, 2011

Forward and inverse kinematics

Forward kinematics is a hierarchy of matrices attached to various parts of a model where child nodes are positioned and oriented relative to their parent node.  For example, lets say that you have a model of an arm where the forearm is a child of the upper arm.  If the upper arm is oriented upwards, the forearm stays attached and thus moves along with it, staying in the same orientation relative to the upper arm.  In other words, you don't need to manually reposition the forearm when the upper arm is moved.

"Forward" kinematics is called that because changes are propagated down the hierarchy from where they were applied.  So if you wanted to move the hand to a specific spot, you would have to orient the upper arm, and then the forearm, and finally the hand.  You could possibly make this easier by orienting the upper arm in such a away that the forearm doesn't need to be oriented,  but this might not look very natural.

The obvious limitation with forward kinematics is that you cannot directly move the hand from our example.  A much better method would be to move the hand, and have the rest of the arm follow along.  This is called "inverse kinematics", because it is the exact reverse of forward kinematics:  The changes propagate back up the hierarchy rather than down it.  This is achieved by using invisible bones, but I'm not quite clear on the specifics.  I'll post more details as I learn them.

No comments:

Post a Comment