CS91 Computer Animation: Lab 8

In which, we implement features to directly set positions for joints.

In this assignment, you will implement inverse kinematics.

Step 1: Get the source


Happily, this week's source has been checked into your repositories! Yay!
> git pull

Step 2: Compile and run


Same as before, you should compile all source in a build subdirectory. The compiled applications will be in /bin as with the rotation assignment. Additionally, the asisgnment includes 'solution' versions of the assignment libraries which you can use to build a 'solution' version of the demo.
> cd build
> make
> ../bin/IKViewer
> ../bin/IKSimple
> ../bin/IKViewer-Soln

User interface overview


The basecode includes a simple interface and 3D viewer for testing your IK algorithms. See above for a screenshot.

The camera can be controled with the mouse:

IK controls

The left panel contains controls for your IK algorithm.

The target position can also be moved with the mouse by holding down the Ctrl key.

Assignment: IK Due April 22

In this assignment, you will implement inverse kinematics. Unlike the previous assignment, where we compute the pose outward from the root, we will now compute the limb orientations based on desired positions for a limb. You implement two algorithms for doing this: a direct analytic method and cyclic coordinate descent (CCD).
  1. (20 points) Implement IKSimple::updateIK() located in aIKViewer/IKSimple.cpp. This application creates a 2 link skeleton to match the example discussed in class. In updateIK, solve for the rotations (Joint* root, elbow) which places the end effector (e.g. Joint* wrist) at the desired goal position.
  2. (20 points) Implement IKController::solveIKCCD() located in libsrc/animation/aIKcontroller.cpp. Given the joint specified by jointid, make its position match goalPos. The chainsize indicates how many descendents to use for the CCD algorithm. When the function returns, IKController::mSkeleton's pose will have the end effector matching the goalPos (as close as feasible).
  3. (20 points) Implement IKController::solveIKAnalytic() located in libsrc/animation/aIKcontroller.cpp. Given the joint specified by jointid, make its position match goalPos. Base your answer on the analytic method you implemented in the previous question adapted to a generic character skeleton. When the function returns, IKController::mSkeleton's pose will have the end effector matching the goalPos (as close as feasible).

Implementation Hints

Extra challenge

Submission Guidelines (5 points)

Submitting your assignment

Students should submit their code along with a README and videos. The README can be very brief, consisting of Videos should show results, including any extra challenges. Videos will be collected together and shown during class presentations. Please submit a mp4 of length no more than 60 seconds. For example

About checkins

You will be asked to briefly checkin (less than 1 minute) about your homework assignment. This is not intended to much work. Please don't prepare slides or a voice over for your video. None of these are necessary! Some ideas of what you might like to talk about: