Inverse Kinematics:
Blobby Man

CSE 557 Final Project
Mira Dontcheva
Marianne Shaw

Problem

The goal of this project was to implement inverse kinematics for character modeling and animation. Given a sequence of trajectories for a few end-effectors on the character's body, we would like to construct the character's joint angles, which interpolate the end-effector trajectories while ensuring that the character moves "naturally".

Approach

The inverse kinematics algorithm we implemented for calculation of the joint angles was an unconstrained optimization algorithm. We constructed a hierarchical model with 51 degrees of freedom and used handles to represent point-to-point constraints. A steepest descent algorithm was used to iterate through the various joint configurations and maximize the satisfaction of the constraints. An objective function was used to guide the minimization algorithm towards a more natural solution. A user can interactively place handles (constraints) on the model and therefore guide the algorithm in creating the motion desired. Each constraint function was represented in the following form:

where q is a vector of all of the degrees of freedom, hi(q) is each handle's position with respect to the degrees of freedom, and mi is the desired position of the handle. The cumulative error of all constraints was represented by the sum of squared constraint functions. In order to minimize the error the steepest descent algorithm requires that we minimize the gradient of the error function (E).

In order to calculate the gradient, the partial derivative of each of the constraints must be computed, which involves calculating the Jacobian matrix with respect to all of the degrees of freedom. The first derivative of each constraint function is in essence the first derivative of the handle position with respect to all degrees of freedom.

To calculate the Jacobian matrix, we recursively traversed the hierarchical model and computed partial derivatives with respect to each degree of freedom. Once the gradient was computed, we normalized the degrees of freedom. Because our model had a combination of joints, some of which used quarternions, while others used euler angles, we had to scale all units so that they map to values between zero and one. The steepest descent algorithm was then used to minimize the error and converge on a minimal value.

.

The user can interactively specify how small he wants the error to be. The smaller the minimal value the more effective the constraints will be, however because the algorithm converges slowly, as the convergence limit becomes smaller, the slower the application will react to movement in constraints. In order to enforce the constraints without limiting interactivity we weighted the constraints so that the handles that are not being moved are considered more important to satisfy than the handle actually manipulated. This is a tradeoff that can be varied by the user as desired.

In order to get natural movement an objective function was constructed, which the user can decide to use if desired. The objective function uses locality when choosing which degrees of freedom are affected. In other words, when moving Blobby's leg, one generally doesn't want his head to move. Therefore the objective function allows changes in different degrees of freedom based on the limb selected. Another feature implemented is the bounding the degrees of freedom for certain joints such as knees and elbows in order to better create movements seen in real life.

Results

Once the inverse kinematics core was implemented we focused on creating "natural" movement. This was a much bigger task than expected. The objective function mentioned above was successful in helping us create more realistic motion, however the more features we added the more difficult it became for the function to converge. After exploring different objective functions we came to the conclusion that we should change our approach and work with conversation of energy, which seems to be a much better way to obtain natural movement.

Below are some examples of the poses created with the our system and Blobby. The second set of images show the number of constraints used to create the pose (shown in green).

References

  1. Welman, Chris. "Inverse Kinematics and Geometric Constraints for Articulated Figure Manipulation." Simon Fraser University. 1993.
  2. CSE 557 Lecture Notes 3/7 (Inverse Kinematics).
Download Demo