Final Project
Interactive Billsbury Doughboi
Alan Haug, ahaug@ucsc.edu
UCSC CMPS 161 Winter 2011
UCSC CMPS160
For this program I used Microsoft Visual C++ 2008 Express Edition on my home laptop running Windows Vista 64-bit and GLUT for the GUI.
My final project is a simulation of an interactive Pillsbury Doughboy -like figure, known as the Billsbury Doughboi. He sorta looks like a
robot. When you click on him, he will respond. If you don't click on him, he just chills in his little computer world, looking around. And
he is VERY ticklish on his stomach. The program detects user clicks through picking and the namestack. Animations are called and they are checked
in the main for completion. The character animations are done with forward kinematics, I specified all the angle rotations and speeds, not the
limb positions. The figure is constructed in a hierarchical manner using the Opengl Matrix stack.
Source code (and executable)
README (user guide, it's pretty simple)
Technical Paper
THE MAN, THE MYTH, THE LEGEND
THE BILLSBURY DOUGHBOI
The basic layout of the program is as follows:
The display method in main.cpp is the opengl render function. Display checks for flags. These flags (one for each clickable body part) are set to
true if that part was clicked on. If a flag is true then it checks if the associated animation function (i.e. head flag checks doughboi.animate_head())
is still returning true, meaning the animation is in the process of playing, if it returns false then the animation is done playing and then the flag
resets back to false. If no flags are detected, then the default doughboi.idle() function plays, which has the head look around in random positions
and the body appears to be breathing. The animations are basically a series of switch statements depending on that functions 'timer' variable. Each
case sums up a done variable depending on which moves are completed, then after the done reaches a acertain level, the timer changes and goes
to the next case in the statement. Once the last statement is reached, all affected body parts are returned to their original positions and the
function returns false, signifying its completion.
The model is made in a hierarchical structure utilizing OpenGL's matrix stack and transformations. The hand is based off the arm is based off the body
and such. For each animation, different angles are specified as the limits and they are incremented until the limit is reached. Therefore it is a form
of forward kinematics, except I am not concerned with the positions of the limbs, just how they look during the animation.
VIDEOS (in real-life the frame rate is better, recording software slows stuff down)
- Video(faster in realtime, 30.3MB)
He is ticklish
Who's awesome?
You're Awesome!
Goodbye
Resources
-http://www.lighthouse3d.com/opengl/picking/
-http://www.nullterminator.net/gltexture.html
-http://www.youtube.com/results?search_query=pillsbury+doughboy&aq=f
-http://nehe.gamedev.net