Various Projects in Computer Animation

Course: CS 274C - Computer Animation
Quarter: Spring 2007
Professor: Petros Faloutsos

Course Description

Introduction to computer animation, including basic principles of character modeling, forward and inverse kinematics, forward and inverse dynamics, motion capture animation techniques, physics-based animation of particles and systems, and motor control.

Movie Quick Links (more details below)

A missile chases a moving car, demonstrating the use of splines in animation
A particle system of particles and springs, bouncing on the ground
A particle is "grabbed" with the cursor and the particle system reacts
A character traces the word "animation" on a chalkboard using inverse kinematics




Hermite Splines

Splines are widely used in computer graphics since curves are aesthetically pleasing and the behavior of many objects that exhibit a "smooth" quality can be characterized functionally with curves.

For this project in particular, we use a cubic hermite spline between two points, described by the positions and tangents at each point.  By chaining these together we create a piecewise hermite spline.

To the right is a sample hermite spline created by clicking specific control points (shown in green).  The tangents at the control points are initialized using the Catmull-Rom algorithm which takes the average of neighboring tangents.


(click image to enlarge)

To the right is a movie demonstrating the use of splines.  Here, a car follows a path specified by a hermite spline.  A missile chases the car, which itself is following a dynamically changing hermite spline between itself and the car.

We also wish to make the animation more aesthetically pleasing by adding a "fade in" and "fade out" effect for the car.  In other words, we wish to have the car accelerate from rest at first, travel a certain distance at constant speed, then decelerate to a stop.  This can be achieved by using a motion curve parameterized by arclength.  By specifying arclengths at appropriate times (which itself is defined by another curve!), we have more control over the motion of the car.


(click to watch movie)


Particle System

Particle systems are another popular technique in computer animation.  They are simple to implement and useful for modeling natural phenomena with many degrees of freedom such as fluids, fire, explosions, etc.

In this project, we build a system of particles (shown in green) connected by several springs (white lines).  We create a dynamic simulation, meaning that physical forces are present and drive the particles motion.  In particular, we add gravity to the simulation, spring forces with damping to retain the systems shape, and a ground penalty force that "pushes up" on the cube as it hits the ground.  In this example, the particle system exhibits "jello" like behavior as it bounces on the ground.

For each particle, we must use an integration method to compute the particle positions at each time step from their accelerations due to forces.  In this project we use Forward Euler Integration, Symplectic Euler Integration, and Verlet Integration.  These methods differ in simplicity (computational speed) and simulation stability (numerical fidelity and prevention of crashes) which usually conflict.  The movies below use the Verlet Integration method.

The left movie shows the particle system bouncing on the ground. 
The right movie shows an interactive cursor which "grabs" the particle, modeled as a spring force that pulls the particle towards the cursor.


(click to watch movie)

(click to watch movie)


Inverse Kinematics

Inverse kinematics is an animation technique where an animator specifies a desired end position of a character's arm/leg, etc. and wants to compute the proper joint configuration to reach this position. 

In this example, we wish to have a character trace the word "animation" on a chalkboard with its hand.  The character is modeled as an articulated rigid body attached by joints using quaternions for rotations.  Given a position on the chalkboard at a given time during the animation, we need to calculate the proper shoulder, elbow, and wrist rotations of the right arm so that the hand is touching the correct place on the board at the right time.

In general, there are an infinite amount of solutions to this problem since a single hand position yields an infinite amount of arm poses.  To solve this we apply an iterative technique to help us converge to a solution representing the "shortest path" of joint rotations. 

We first define a transformation matrix that converts a point in the world reference frame to the hand reference frame through a series of translations and rotations.  For each iteration, we compute the current Jacobian matrix of this transformation matrix which contains all partial derivatives relative to each input joint angle.  The Jacobian represents an instantaneous relationship between the arm angle velocities and hand position velocity.

After computing an approximate inverse to the Jacobian using a pseudo-inverse technique, we are able to solve for an angle change given a desired hand position change.  This allows us to iteratively move the hand to a desired position on the chalkboard by applying our calculated angle changes.

As a side task, we also used an alternative animation technique called cyclic coordinate descent to solve the same problem.  This method solves the joint configuration analytically from one end of the chain to the other.  This method is much faster than the iterative solution but sometimes yields unpleasant results (arm is bent strangely).


(click to watch movie)
Make a Free Website with Yola.