Keyframe Animation with Hiearchy

And a very aggrivating attempt at Linear Combination of Transforms

BASICS

This program persents a short animation, demonstrating keyframe animation, as well as a simple hierarchial animation. While the animation is hard-coded into the program, it is stored only as keyframes, defining the position of each object at a particular time within the cartoon. As for the intermediary frames, the program can handle these in one of three ways:

The hirearchy of objects is handled by attaching an dependent object to a specific point on in relation to it's controller. This is done in such a way that any transformations applied to the controlling object are applied to the dependants, as well. The main animation has only two independent objects: The robot arm and the frog body.

The frog has two small objects appended to each side (whether they are legs or eyes is up to the viewer and their own imagination.) The lower section of the robot arm is independently rotanting about the orgin. Attached to it is a small joint, to which the second arm is attached. Another joint connects the arm to the final cone in the same way. In this example, each arm shares the exact same keyframe list. The difference in their actual movement is due to a static 90 degree rotation applied to the each joint.

USE

IN DEPTH

There are three main data structures at use in this program:

The program was designed to be extended into a Sricpting Based Animator, which reads text files and defines objects, keyframes and transforms as appropriate. Due to Lack of time, this extension was not made. but the test animations hard coded into the program show how this could be done.

PSEUDOCODE for using this system to create animations.

Define spherical and cylindrical objects.
Define Transforms corinciding with the positions taken by the objects throught the animation, relative to the origin.
Define keyframes, which attack the transformations to the objects to take place at specific times.
Attach dependant objects to controllers to produce hierearcheal animation.

In the case of the Robot Arm animation: The Arms have a series of keyframes, each one rotating about the y axis at 15degree/5sec intervals. The Frog has four keyframes: One to define his position at the beginning of the animation. One to keep him there until jumping. One to define the peak of his jump. And one to return him to the ground.

Linear Combination?? Not quite.

In my first attempt at this program, I used only Alexa's method of interpolataion using Linear Combinations of Transformations. Unfortunatley this did not work out as well as I'd hoped. The implementation of it as it is used in this program is bugged in such a way a that Severe scaling and shearing occurs with every rotation. Eventually a more standard linear interpolation was added to the program, allowing the user to see this:

Instead of this:

(The above images were taken from the 'blobs' program, identical to the main program 'proj' and included with the main program's source)

This is most likely due to rounding errors, caused by the fact that the translations here are held as single floats, instead of doubles. (though, perhaps, it could be a bug, or omission, in the algorithm itself, or perhaps one of the supplementary alogoithms used to calculate log(), sqrt(), or inverse() of a transformation matrix.