Contrib / CoreyAlexTomP2Writeup
Tom is already sorry he mispelled Cory in the title to this page. --His destruction shall be swift
Copy of source code for a linux project build: http://cs.wisc.edu/~tgrim/alextomcory-project2.zip
To build it, edit the makefile to point to your FLTK and OpenGL libraries and headers.
Also included is a .rar of a windows based Visual Studio 2005 project of the file. Simply unpack and run! You may have to retarge the FLTK and openGL libraries though, as mine are on the C drive. http://pages.cs.wisc.edu/~cory/Project2.rar
In your wiki page writeup, please include:
1. A description of the limitations of your parser.
Our BVH parser works on the following assumptions:
Beyond that the parser should be able to read any BVH file. It's been tested on at least a dozen or two files from the Graphics Group motion directory and from a design standpoint I feel it's pretty robust. If the file being loaded doesn't follow the assumed conventions it shouldn't crash, but the motion may appear incorrect.
2. A list of the basic requirements that you have working. For the basic editing operations (blending and concatenation), describe the variant the you've implemented (how you do alignment, what kinds of transitions, ...)
The code currently supports 2 kinds of concatenation - a straight cut and an interpolated cut from one animation to another.<br> Both variations align the root of the beginning of the second animation with the end of the first. Using a bit of quat math, this is configured such that we determine the angular difference between which way each animation is looking (y axis rotation). Using the angular difference and the offset in xz space (ignore y so that animations try to retain their relative distance to the ground plane), we can make a "good" alignment that deals pretty well with cutting frames together,. Because I'm not changing the XZ rotation and Y position, the root points in the straight cut line up on a y axis line and not at the exact identical points. This leaves a "jump" or high frequency in the q vectors of the animations, but it keeps the 2nd half from walking into space because of a bad starting angle or position.
The interpolated variation requires the next 5 frames from the first animation and the previous 5 from the second animation and blends those together in a weighted 10 frame blend. The root position as well as angular positions then become of function of animation A and B. <br> Forgive the ascii chart. It takes the frames from motion A and B and blends with a Motion A -4 -3 -2 -1 0 1 2 3 4 5 A weight .9 .8 .7 .6 .5 .4 .3 .2 .1 Motion B -5 -4 -3 -2 -1 0 1 2 3 4
The orientation blend is done with linear interpolation. The actual blending of angles is done with SLERPing. Unfortunately, do to the fact that I have some floating point variation when converting euler angles to quats to euler angles, the blending isn't perfect as shown in the demo. - Tom
Because I was trying to be a bit dynamic, the UI will let you select a start frame that is after the end frame. This has the effect of reversing the animation. You're allowed to mix forward and backward motions if you'd like. If you're using the interpolated concatenation, your start and end points must be at least 5 frames away from the start and end of the original motion to deal with the 5 frame extras used in blending. Pretty much, you can blend anything from frame5 to framecount-5 either forward or reverse.
For blending, I used the same rigid alignment system as above, and do a similar weighted blend between the orientation position, and angular vectors. Like the concatenation, the blending also allows you to reverse animations. Blends are done with slerping and there are are some slight floating point errors as described in the concatenation with the quat math. For right now, blending requires that you make blends of equal frame lengths.
Lastly, both the concat and blend functions require that the motions that you're using are both using the same skeletal structure. There is no code for reconfiguring the skeletons or joints.
3. A list of all of the bonus features that you've implemented. Not necessarily all bonus features, but some of the feature list:
4. A list of any outside code that you used (libraries, ...), and any resources you consulted (web pages, etc) for figuring the project out. (I'm curious what's useful)
5. A description of how to use your program. Describe the basic interface, and how to access the features. In particular, be sure to describe how you specify what blends/concatenations to do.
Usage should be pretty obvious from the UI. Use the File menu to open and save BVH motion files. Use the controls in the Playback tab to switch motions, adjust frame rate, step through the frames, etc. The Concatenate and Blending tabs are basically the same: Choose your two animations, the start and end frames for each, the type of operation from the drop-down list, give it a new name, and hit the button. The viewing window itself implements an arcball, so you'll be familiar with how to operate it. You can also switch to a Top view from the View menu. If I'm not mistaken, our Motion view option hasn't yet been implemented correctly.
6. Screenshots. In particular, if you can show off examples of where blending/concatenation works, that would be particularly good. (its hard to show in a static image).
Review of other groups:
* Eric, Blayne GroupEricBlayneBlog
* Yoh, Brandon,Finn GroupYohBrandonFinnBlog
* Betsy, Yang, Mik GroupBetsyYangMikBlog
* Dan, John, Adrian GroupDanJohnAdrianBlog
* Jeff, Will, Ryan GroupJeffWillRyanBlog