|
| |
This ASSIGNMENT is
in two parts. Part 1 due 10/7 (before class) and Part 2 due 10/14 (before
class). Be warned the 1 week difference in due dates for part 1 and part 2
does not mean that part 2 is expected to only take 1 week. Work on part 2 before
part 1 is due to make the DUE date.
Part 1: Motion blending and warping,
due 10/7 (before class)
Motivation:
When an animator wants to create an animation using motion
capture, rarely is the entire sequence captured in full. It is much
more practical to gather a variety of short clips and blend them together
in sequence. The ability to merge clips together allows clips to be reused
which reduces time and resources spent during the often laborious motion
capture process.
In this part of the assignment, you will blend and warp motion clips together.
For example, if you have a walking clip and a running clip, can you interpolate
the end of the walk with the beginning of the run in order to create a smooth
transition from a walking clip to a running clip?
Background material:
-
Witkin , Popovic, Motion warping, SIGGRAPH
1995 [ACM|PDF]
-
Bodenheimer, B., Rose, C., Rosenthal, S., and Pella, J.,
"The
Process of Motion Capture: Dealing with the Data'', Computer Animation
and Simulation '97, Eurographics Animation Workshop, Sept. 1997, D.
Thalmann and M. van de Panne, eds., Springer-Verlag, Wien, pp. 3-18. [PDF|PS|Bodenheimer's
Web Page]
-
Arikan and Forsyth, "Interactive Motion Generation From
Examples", ACM Transactions on Graphics (TOG) , Proceedings of the 29th
annual conference on Computer graphics and interactive techniques, 21(3),
(SIGGRAPH 2002) July 2002 [PDF]
-
Rose, C., Cohen, M., and Bodenheimer, B.,
``Verbs
and Adverbs: Multidimensional Motion Interpolation'', IEEE Computer
Graphics and Applications, v. 18, no. 5, Sept. 1998, pp. 32-40. [PDF|PS|Bodenheimer's
Web Page]
-
Kovar , Gleicher , Pighin, "Motion Graphs" ACM
Transactions on Graphics (TOG) , Proceedings of the 29th annual conference on
Computer graphics and interactive techniques, 21(3), (SIGGRAPH 2002) July
2002 [PDF]
In particular, pay attention to the last two on how they do their transition
selection. String together several clips of data and see if you can smoothly
blend between them.
What you need to do:
You will need to choose a variety of clips of motion from
/net/dvfx/CA/Data/Mocap/ (in directory
BVH)
(see
http://www.cs.wisc.edu/graphics/Courses/cs-838-1999/Jeff/BVH.html
OR
http://www.biomechanics-inc.com/software/data/bvh/index.html OR
http://www.okino.com/conv/imp_bvh.htm for info on BVH format OR
Working with
Motion Capture File Formats)
(See other sources of
data below)
More data is available from MoreBVH/directory from the above
directory.
Combine data from these file to make longer sequences.
For this part of the problem set, You will write code to read in
two or more .bvh clips and output a
.bvh clip
of the merged data. You may manually specify some
parameters to guide your merging if necessary. The emphasis will be on your
blending and warping algorithm -- that is, on the form of interpolation
and other techniques you apply.
You must combine at least 2 sets of 2 motions together. That is, you will
create 2 sequences, each of which is comprised of 2 merged clips.
In order to choose your clips and gather information to inform your
algorithm, you will obviously need to look at the data.
Viewing MoCap DATA (and your results)
There are many options to view MoCap files.
1) Using MAYA
To view the data simply run Maya.
-
Open the script editor
Window | General Editors | Script Editor
-
and do a
File | Open Script
-
and point it to the
bvhimport.mel script. (in /net/dvfx/CA/Data/Mocap/MEL/)
-
Once the script is loaded into the window, press
Ctrl+Enter to execute the script.
-
It will open up a window, and you
should point it to some mocap data.
To ensure smooth playback,
-
go to
Window | Settings/Preferences | Preferences.
-
Click the Settings Category on the left-hand side and make sure that Time is set
to NTSC (60 fps).
-
Click on the Timeline category and make sure that Playback
Speed is set to Half (15 fps).
-
NOTE: These settings are for data captured at 120Hz
(15fps/60fps = 1/4 sampling). Motion Capture can also come at 250Hz or
other rates.
Let's take a look at some motion data. Click on a particular joint and
periodically hit stop and start. Notice how the joint angles (the rotation
values for the joint) change over time. Also note how the translation
values do NOT change. In order to define a pose for a 3D character at time t,
we only need to specify the translation for the root joint (in this case, the
hips), and traverse down the skeletal hierarchy, adjusting joint angles. (Note
that if you wanted to write a retargeter, this would be useful to observe. This
is mainly here for your own knowledge and experience.)
If you read through the BVH file you will actually see the BVH hierarchy defined
in the first half of the file. The second half describes the joint angle data.
For more information on the BVH format please see
http://www.cs.wisc.edu/graphics/Courses/cs-838-1999/Jeff/BVH.html
OR USC ICT's
Motion Capture File Format Documentation OR Working
with Motion Capture File Formats)
2) Some other viewer
If you can get a handle on the various MoCAP file formats
(see Working
with Motion Capture File Formats, OR USC ICT's
Motion Capture File Format Documentation) then you can devise a simple viewer or
also find one on the web that may help with viewing. We have one of
our own. As with all free viewers, they are NOT perfect. See the
following links for some examples (Not in order and with NO gurantees!)
IMPORTANT NOTE
When viewing the data, pay attention to aspects of the motion that might
influence your ability to blend clips together. You will probably need to
record some numbers (e.g. frame numbers) for your program to use when merging
the clips. Better yet, implement a general algorithm for aligning, warping,
and interpolating clips.
What to turn in:
You will need to turn in the .bvh files containing the
merged clips as well as a write-up describing your approach. You will be
graded on how smooth and natural the transitions look as well as the
variety of the animations merged.
Submit in
/net/dvfx/CA/2004/Submit/P2/<username>/
(Include a README.txt file to say which files are which)
Part 2: Skinning a character and interaction,
due 10/14 (before class)
(A) In the directory /net/dvfx/CA/Data/Models/ is a 3D model of a
stick figure, our beloved Woody (woody.mb). Load your clip into Maya and see if you
can animate Woody with your mocap data. You will need to scale Woody to fit your
skeleton and you will need to put him into the initial pose of your mocap data.
Finally, you will need to skin the model to the skeleton in order for the model
to be driven by the skeleton. See the Maya tutorial on Character Setup for more
information. For your convenience, we have provided a
tutorial showing a quick and dirty way to
skin a character for this assignment.
Now that you know the basics, create a character using maya or find a character
on the web and skin it. Your character must have different dimensions
from Woody.
Using your new character, create animations for all your clips from
part 1 -- that is, the input clips as well as the output clips.
(B) Try adding some object(s) into the scene and figuring out how
to make your character interact with them. For example, put a ball in the way
and have your character kick it or simply build a wall and have your character
run through it. Yes, this means dynamics. But if you're clever, it may
not be as difficult as you think.
What to turn in:
You will need to turn in videos (mpg/mov/avi) corresponding to
each of your clips. Also turn in a short write-up discussing what you learned
and observed from the character setup and animation. In particular, you may
notice some peculiarities in the animation quality when your character is
of quite different scale or shape from the original mocap skeleton.
Submit in
/net/dvfx/CA/2004/Submit/PS2/<username>
(same directory as
part 1).
(Include a README2.txt file to say which files are which)
HINTS:
I'M LOST! WHERE DO I START?
Code:
Startup code (Windows-based) is located
in the ProblemSets/PS2/code directory. Included are the header
files and a .lib file (for Visual C++).
Start a Visual C++ Project and include the headers and library file in your
project.
The code is what you will need to get started, and does reading and writing
of BVH data. For example, you can do something like:
int main( int argc, char *argv[] )
{
BVH myBVH;
// read in command line argument as bvh file
myBVH.read( argv[1] );
// munge some data
myBVH.write( "somefile.bvh" );
}
The data is stored in a structure called (of all things) "data", while the
joint names and offsets are stored in an array. Look through the provided
.H files for details. To access the joint angle data, you would do
something like
myBVH.data[frame#].body_parts[bodypart#].data[0] = 23.56;
note that the ending data element is an array of size 3 holding the XYZ
values, e.g., data[0] = X, data[1] = Y, data[2] = Z. Again, read through
the .H files for more information.
Motion blending:
How do you start blending data? Well, read through the papers
mentioned above and you should get an idea of
the naive approach. Essentially, the naive approach will find similarities
towards the end of clip 1 and the beginning of clip 2 and do a smooth linear
interpolation between the two. Naturally, a linear interpolation isn't the
best way to do it - can you think of other ways? Cubic splines, perhaps?
|