Forward Kinematics and Shadows

Diego Villafana (dvillafa@ucsc.edu)


Description:

Forward Kinematics animation making a dog shadow:
The two most prominent methods in computer graphics for animating models use either inverse
or forward kinematics. Inverse kinematics involves a given destination pose, and inversely,
forward kinematics modifies the angles until it reaches a destination wanted. Inverse Kinematics
is used more popularly because it is faster to calculate a whole sequence by just giving it poses
animate from. Forward kinematics is simpler to implement, but more tedious to use for animation,
since you have to perform each transformation manually. For my final project I wanted to load a hand
model and animate it to for the shape of those popular shadow puppets we all use to make when we were
young. So I used our model loader from our first assignment to load the model of a woman. I iterated
through all of the polygons and highlighted and saved those that composed the hand. Once I had the
whole hand, I had to find out how I would modify the vertices. I struggled with trying to share
vertices and transform then all at the same time, so I resorted to break down the hand into even
further segments and apply forward kinematics then. Each finger was broken down into three parts/levels
and three joints to rotate around.
I had a total of 13 joints and 14 different parts of the hand as can be seen in the following figure.
.
The way forward kinematics works is that you have full control
over every segment of the hand. All segments transform in respect to the predescecing segments, in other words
they take into consideration the current angles and transformations of their parent nodes. In this case, the
base part of each finger affected the 1st level's transformation, and the second level depended on both the
first and the base's transformations. And finally the third level of the finger depended on the base, first and
second level's transformation. All the preceding transformations are to be applied in the correct hierarchy order.
I will facilitate your understanding with the following video

Video of finished project:

Controls: `/~ = base level of the pinky
1/! = base level of the pinky
q/Q = 1st level of the pinky
a/A = 2nd level of the pinky
`/~ = sideways pinky
./> = base level of the ring finger
2/@ = base level of the ring finger
w/W = 1st level of the ring finger
s/S = 2nd level of the ring finger
3/# = base level of the middle finger
,/< = base level of the middle finger
e/E = 1st level of the middle finger
d/D = 2nd level of the middle finger
4/$ = base level of the index finger
r/R = 1st level of the index finger
f/F = 2nd level of the index finger
5/% = base level of the thumb
etc.
experiment with the code here

Code: