Recent Changes - Search:

Advanced Graphics 2009

All Pages
All Changes

Login

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:

  • Every root specifies 6 channels: x,y,z offsets and z,x,y rotations
  • Every joint specifies 3 channels: z,x,y rotations

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, ...)

  • Concatenation

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.

  • Blending:

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:

  • Reading BVH files with ZXY rotations
  • FPS manipulation to speed up/slow down animations
  • Concatentation/Blending UI
  • Ability to save animations
  • Strobing
  • reversing animation (side effect of fun with concatenation)

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)

  • FLTK
  • www.euclideanspace.com - really useful for rotational math.

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).

Play back with some strobing

|Showing off the Basic Interface

Showing off the Concatonation interface with a blending of backspring and boxer1. It's a bad match, but it shows off the blending

Review of other groups:

    * Eric, Blayne GroupEricBlayneBlog
  • I liked the end tracers and the UI of this one. The monkey guy animation was quite cool and the end product looks more complete than anything on the blog - Tom.
  • I liked the different take on the UI. It was dark and colorful unlike the brightness that was the rest of our interfaces, and the end effector tracers were very nice. I'm jealous. -Cory
    * Yoh, Brandon,Finn  GroupYohBrandonFinnBlog
  • The UI and visual representation of the skeletons looked wonderful. I especially liked the piroueting cylinder guy. I also believe I overheard something about a scripting system in the background to help with this. Sorta curious what that's about. - Tom
  • The UI was nice and clean and things seemed to work. They had some spiffy extra features as well. -Cory
    * Betsy, Yang, Mik GroupBetsyYangMikBlog
  • This project looks well polished. The guy with the circle head doing a little idle dance was pretty sweet. - Tom
  • I thought this project looked nice. I didnt get too much of a chance to talk to them about how solid it is, but I will assume it is quality from what i did see. -Cory
    * Dan, John, Adrian GroupDanJohnAdrianBlog
  • This was the project that I got to see in action the most. The blending looked pretty well and I loved the C3P0 effect that was pulled off with clever blending. - Tom
  • I did not see this on in action so I cant say too much about it. -Cory
    * Jeff, Will, Ryan GroupJeffWillRyanBlog
  • The interface looks kinda industrial to me. Not relevant but i wanted to say it. They have a snazzy model, using spheres instead of dots and more solid lines. It makes for a hearty visualization and their strobing looks good. -Cory
History - Print - Recent Changes - Search
Page last modified on April 20, 2009, at 11:49 PM