[Previous] [INDEX]

Motion Editing With Various Interpolations of Displacement Maps

With the difficulty in implementing space-time constraints, it may be worthwhile to investigate cheaper methods for motion editing that may yield results that could be good enough. One such approach is motion displacement mapping, which can produce modified motion that preserves the high-frequency behavior of the original motion [1][2]. For this project, the displacement map will be generated interactively. On top of an underlying motion (either a series of motion-capture frames or a "default" stationary motion curve), the user manually edits joint positions at keyframes and an inverse kinematic solver computes the corresponding joint angles. The displacement maps will be created from the keyframe points by various interpolations: by spherical interpolation of quaternions, by some cubic interpolation of euler angles, and possibly by other interpolation techniques. The quality of the different techniques can then be visually examined and compared.


The MotionEditing program works on motion capture data in the Biovision BVH format. From any of the projection views, the user can edit the root position or joint angles of the skeleton in any frame. These changes are stored as points in displacement maps. The modified motion is computed by adding the potentially-interpolated values from the displacement maps to the original motion capture data.

Interpolation in the root position displacement map is achieved with a cubic Hermite-style spline using the slope between neighboring points as the tangent (first derivative). Specifically, for the four points p1, p2, p3, p4, interpolating a point between p2 and p3 is effected by solving the following equations:

y2 = ax23 + bx22 + cx2 + d
y3 = ax33 + bx32 + cx3 + d
y2' = (y3 - y1) / (x3 - x1) = 3ax22 + 2bx2 + c
y3' = (y4 - y2) / (x4 - x2) = 3ax32 + 2bx3 + c
For the joint angles, three methods of interpolation are supported:
  1. linear interpolation of quaternions,
  2. linear interpolation of Euler angles, and
  3. cubic interpolation of Euler angles.

One of the motivations for this project was to see if linear interpolation of quaternions can achieve better results than interpolation of Euler angles. The observation from editing several motion capture files is that to maintain the significance of the high-frequency motion capture data, only small changes to joint angles should be made; but when joint angles are small, there is practically no difference between interpolation of Euler angles and of quaternions. It is unclear whether linear or cubic interpolation is "better", they behave differently, and can each be useful in different circumstances.


Summary of commands

Usage: MotionEditing <BVH-file>
keycommand
pPerspective View
xX-projection Views
yY-projection Views
zZ-projection Views
iZoom in
oZoom out
hPan left
jPan up
kPan down
lPan right
aAnimate (start/stop animation)
sSlow motion 1
fForward one frame
bBackward one frame
uChange up direction
mToggle wireframe mode
tTrace end effector positions
qQuaternion/Euler mode
cCubic/Linear interpolation mode
sSet interpolation key 2
dDelete interpolation keys 2
gCenter camera on root node
nShow "normal" skeleton (Frankenstein pose)
rReset all states in current window
AAdd displacement map points for selected joints in current frame
DDelete displacement map points for selected joints in current frame
MMerge displacement map data onto motion capture data
PClear motion-capture position data
QClear position displacement map
RClear motion-capture rotation data
SClear rotation displacement maps
OWrite motion to output.bvh file
IPrint displacement map points for selected joints in current frame to stdout
wNew window 3
vNew view 3
XClose window/quit

1 For "normal" animation, this will ensure frames are never skipped. When displaying an interpolation, this slows down the animation 10x.
2 When two interpolation keyframes are set, subsequent animation will show the interpolation between the two keyframes. Delete the keys to resume "normal" animation.
3 Different windows share a common skeleton. Different views share the same frame (e.g. they will display animations concurrently).

Editing and Selecting

When the user clicks on a node, the "selected"-ness of each joint from that node to the root node is toggled. For example, to select a single joint, click successively on the nodes on each end of that joint. If the user clicks on the root node, the entire skeleton is selected/deselected. Selected joints appear in purple.

A number of actions are performed only on selected nodes. Most importantly, only edited nodes and joints can be edited. Simply click-drag on a selected node to edit its position.


Editing "LeftWrist" Joint.

References:
[1] A.Burderlin, L.Williams. "Motion Signal Processing". SIGGRAPH '95.
[2] A.Witkin, Z.Popovic. "Motion Warping". SIGGRAPH '95.