Josh's CS 527 Website

splash page project 1 project 2 project 3 paper presentation final

Josh's Third Project for Computer Animation - Motion Capture

TEAM AWESOME:

Jason Gorski, Joshua Buss, Sai Prasad

For our third and final project, "Koosbane Karaoke", we worked in groups. The goal was to use motion capture data to animate a non-humanoid character to music, much like the way Jim Henson's earliest muppets could believably dance even without the expected human limbs.

We knew one of the most important parts by far was to select a good song, so our first step was to consider many different songs and pick one that we felt would work best. I'm not quite sure how it happened, but "Hamster Dance" was chosen (even over Macarena) and a country hoe-down theme became the basis of our animation. I edited the original song down to a version that included the main important parts and wasn't much longer than 60 seconds.

I set off right away to make a hamster 'cause I figured that would be the easiest (and cutest) thing to animate, but after asking Andy if that would be too 'humanoid' he basically confirmed that since our hamster would still be dancing somewhat like a human it wasn't acceptable. Foiled again by Andy! Luckily, we could still use him in a supporting role.

After making a last minute decision to change our main character from a hamster to a wheelbarrow and pitchfork, we were exceptionally grateful that our two real dancer friends were still willing to help out. (Thank you so much Christine and Stefanie!!!!)

We all worked together to figure out how best to 'dance like a wheelbarrow and pitchfork', but inevitably the motion capture session was long and tedious simply because we wanted enough data that we'd have a full 60 seconds of GOOD data. We walked out of the cave with almost 10 MEGABYTES of tracker data.


Next up - time to start assembling all the elements of the scene. I took point on creating all the models and smoothing the data, Jason took point on creating the tools in electro we'd need to create the final animation, and Sai dove right into the heavy math involved with translating information from the motion data and adapting it to the models we created.

Noticable in these two pictures here is the fact that I was probably gunning for a little too much in our scene.. but even so, I tried to make a couple different complexities of the scene and ran into some rather humorous scaling issues using models downloaded from Google's 3D warehouse.


Jason made a ton of utilities both separate and in the code itself to aid Sai and me. By far the coolest and most useful tool though was the sequencer. This gem allowed us to map four arbitrary models to any set of motion data we wanted to visualize, and then play back the file at varying speeds and exaggerations of movement. It also had the ability to set entrance and exit points to a data file, so that precise timing going from one clip of data to another could be timed easily. When all the parameters were in good shape, a write_out function would create a new data file with the trimmed size, time-scaled keyframes, and any changes made to the scale of movements all preserved.



I used excel to graph the data to visually find any rough spots, and wrote a couple simple macros to pull extraneous values back into usable ranges and just generally smooth the tracker data as well. The joint code in electro failed us all pretty badly, so we spent the vast majority of our final work on the project tweaking custom translation functions that brought the motion data into the appropriate values for our characters' extremeties. One saving grace however was the reliability of the orientation values of our main 'body' sensor - using this greatly eased the process of figuring out the other sensors positions in relative object space for the wheelbarrow.



With decent data and decent code for actually using that data, the last steps were just a marathon of building out each piece and sequencing it all together. Jason's tools made it much nicer though, so mad props to him for making the rest of the work go that much quicker.. we never would've finished in time without his tools or his work on translating the motion capture data into the correct object space.



I built the scene itself and all the models in sketchup, but we used numerous other modeling tools for tweaking the models until just about everything about them was fit for our use. Getting the lighting right on the wheelbarrow was especially difficult. We tried lighting inside for the barn itself, but it never looked as good as flat lighting on the barn and dynamic lighting on the wheelbarrow, so we stuck to that.

Also worthy of mention were the functions Jason built that allowed us to create our own key-frames for more absolute model positioning and orientation. Once we got the hang of using these functions I keyed animations for the wheelbarrow's entrance and the motion of the camera itself. Jason and Sai used these to animate the 'bigger' motions of the pitchfork, including its hops and tilts.


When it was all said and done we really just didn't have enough time for all of our ideas. This wasn't really anyone's fault, it's just the way it happened. We're still pleased with the end result, but we had some even cooler ideas we are kinda bummed we didn't have time to implement. Some points about the animation itself:

- There's well over 100 seconds of non-repeated real-time motion capture data in the 70 second animation, since the wheelbarrow, hamster, and pitchfork were all 'danced out' by us. Some motions turned out better than others for the wheelbarrow, so two different dances are actually repeated, but the hamster's motions come from one long data file for the whole time. The pitchfork motions consisted of about 10 seconds of data that gets repeated several times.
- Each character's motions came from completely different transformation math. In other words, to get the motion data mapped into "pitchfork tine space" completely different mapping functions were needed than for "wheelbarrow arm" space. For "wheelbarrow body" space we used rather complicated functions that considered the motion of two sensors, since the wheel can't move too far from the body, can't turn without the body, and can't slide in any direction perpendicular from the direction to the body.
- The project was scripted in lua, executed with electro, and modeled in google sketchup with the help of AC3D, wings, and some hand-editing of mtl files too. For graphics paint shop pro was used, and for editing the song we used audacity. The motion capture data of course came from the EVL C-Wall.
- Over 4 full pots of coffee were consumed in a 72 hour period by Team Awesome. Very little sleep took place. I found out my cell phone works pretty nicely as a modem while waiting outside of Best Buy for 6 hours straight the morning of "Black Friday". I actually did all the smoothing while waiting outside, taking breaks to sit in the car while my laptop charged up again and my brother held our spot in line.
- The motion capture data for the wheelbarrow's hands passes through 4 complete vector space transformations before it is in the proper coordinate system. The position of each hand tracking point is actually only used to determine the orientation of a vector that the wheelbarrow's arm is aligned on. This vector always originates from a fixed 'shoulder' point that is determined dynamically based on the orientation of the body sensor and position of the local body entity pivot. This was by far the trickiest part of the assignment, and we have Jason to thank for spending the time needed to understand the marriage of all these elements.
- We were going to have cows with bouncing heads in the back, and the four ropes you see hanging were going to start dancing along towards the end.

A few action shots of Team Awesome hard at work:


Download the final project HERE

Instructions:
Unzip contents into their own directory, and drag "main.lua" over "electro.bat" and release.
Press escape to exit.
Press F2 for full screen.
Press F3 and F4 to change resolution.

Note that you need opengl support for the animation to run properly. If you encounter any error messages while the animation starts you can press F1 to hide the console.

To run the project on linux and macs you'll need do install the 725 version of electro from the source code available on the electro website.

Questions from students and answers:

Q (Person): Why aren't there any questions here?
A:
All questions and answers happened in class.

Any more questions? Feel free to e-mail me.