Advanced Animation and Modeling Project
CS460 is divided into 4 coding projects: Skeletal animation; Path following and motion blending; Inverse Kinematics; and finally Rigid Body Dynamics. Subjects such as animation file formats, quaternions (interpolation, splines), and Catmull-Rom splines (my favorite kind :) ), are covered in the process.
I was also the TA for the class. I lectured about importing data from animation file formats, making an exporter for 3D Studio MAX, and other topics.
All the projects are done using OpenGL.
Skin and bones skelatal animation
I used Flexporter to export character and animation data from 3DSMAX and Character Studio. Animated the characters using skin and bones.
The character file format specifies a hierarchy of bones and the vertices they affect. Animations are stored as sequences of frames (orientation/translation pairs) for each bone. Orientations are stored as quaternions.
First the bones are transformed using skeletal animation. Given the current time, the correct transform for each bone is found by interpolating between the two closest frames' transformations. For quaternions, spherical linear interpolation (SLERP) is used. In addition, each bone's transformation concatenates its parent bone's transformation. After this is done, each bone stores a transformation matrix. Then each vertex that is influenced by a particular bone is transformed by that bone's matrix. If multiple bones influence a vertex, the vertex is transformed using each bone then averaged using stored coefficients.
Modeling and Animations by Ryan Hammond, Shane McIntire and Colin Turner for the game Scavenger Hunt.
Path following and motion blending
Using the same framework, I make the chracter run along a path. The path is specified using a Catmull-Rom Spline, and parameterized by arc length numerically. This allows to perfectly control the speed of the character along the path. In this case the character first accelerates to a constant speed, then slows down towards the end. A standing and a running animation are blended together with respect to the character's current speed.
Download the Project
Download a Movie
Using Forward Kinematics we can calculate the position in space of the end point of a linked structure, given the angles of all the joints. This is, in a sense, what regular Skeletal Animation does. It is easy, and there is only one solution. Inverse Kinematics does the reverse. Given the end point of the structure, it tries to find what angles the joints need to be in to reach that end point. It can be difficult, and there can be many solutions, or none at all. We had to choose between the Cyclic-Coordinate Descent (CCD) or the Jacobian Transpose Method. I used CCD.