Animation Creator

Final Project for Brian Middaugh
CPE 471, Winter 2012
Project Name: Animation Creator

To Compile:
-navigate to directory containing the Animation Creator source files
-type "bash ./build" (without quotes)
-this will build the Animation Creator and the GLUI library for the User Interface components
-Will create an executable named "animate"

To Start the Animation Creator:
-Type in the command "./animate [filename]"
-[filename] is an optional argument, if a filename is provided, Animation Creator will attempt to open the specified animation file
-if the file is not found, Animation Creator will create the specified animation file upon the first save operation
-if the file is found, Animation Creator will load the animation from the file, which can then be played back or modified
-if no filename is provided, Animation Creator will start a new animation and save to the default file "new_animation.anm"

Usage:
-Right click on any part of the robot's body to select that body part, the body part will highlight in green
-Drag the mouse with the left mouse button held down to move the currently selected body part
-Vertical mouse movements will rotate the selected body part about the camera's current horizontal axis
-Horizontal mouse movements will rotate the selected body part about the camera's vertical axis
-Click the "Capture Frame" button (or optionally press the 'c' key) to capture the robot's current position in a frame, subsequent captures will add to the end of the current list of frames.
-Click the "Delete Frame" button (or optionally press the 'x' key) to delete the most recently added frame from the list.
-Press the 'a' or 'd' keys to rotate the camera left and right, respectively.
-Click the "Play Animation" button (or optionally press the 'p' key) to make the Animation Creator play back your current list of frames, in order.
-To adjust the speed of the animation, modify the contents of the "FPS" text box. This value must be between 0.5 and 20.0, and specifies the number of frames from the list that will be played per second.
-To adjust the number of subdivisions per frame, modify the contents of the "Subdiv./Frame" text box. This value must be between 1 and 120, and specifies the number of draws that will be performed between each frame.
-More subdivisions = smoother animation, adjust to taste and graphics card capabilities.
-To save the current list of frames to a file, click the "Save Animation" button (or optionally press the 's' key.
-If you started Animation Creator with a filename argument, the animation will be saved to that file
-If you started Animation Creator with no arguments, the animation will be saved to a file called "new_animation.anm"
-To reload the animation that is currently saved, press the 'o' key. This is really only useful for recovering data from the default "new_animation.anm" file or reverting changes that haven't been saved yet.
-Press 'q' to quit (or exit the window).

General Tips:
-Mouse movements rotate around axes which are relative to the camera's current perspective. Use this to your advantage! For example, it is easiest to rotate the arms about the z-axis if your view is perpendicular to the z-axis.
-When subdividing frames, anything being rotated will take the shortest radial path from frame1 to frame2. eg) if you want the arms to rotate in a path longer than 180 degrees, you will need more than one frame.
-The picking algorithm for choosing body parts does not perform a depth-check. So selecting an object that is directly in front of another object can be tricky (the solution is simply to rotate the camera until they are not in-line)
-I generally find it easiest to restrict my mouse movements to vertical and horizontal ones, and rotate the camera when I need to rotate in a different plane, buy you're free to rotate about any axis in the plane perpendicular to the camera.
-Included in the handed in files are a few .anm files, any of these can be loaded on application startup so you can watch some of the animations I have made!

Known defects:
-(On Ubuntu 11) Very rarely, the program will run out of memory. I haven't been able to consistently reproduce this error, and I have made several changes since, so it is possible that it has even been fixed.
-Sometimes jerking the mouse when right clicking causes the currently chosen body part to pop to a new position.
-The Animation Creator does not check to make sure that a file is really an animation file before opening it, so if you specify a file that is not an animation file created by the Animation Creator, then it's behavior is indeterminate (but probably not what you want).