[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>
 key command p Perspective View x X-projection Views y Y-projection Views z Z-projection Views i Zoom in o Zoom out h Pan left j Pan up k Pan down l Pan right a Animate (start/stop animation) e Slow motion 1 f Forward one frame b Backward one frame u Change up direction m Toggle wireframe mode t Trace end effector positions q Quaternion/Euler mode c Cubic/Linear interpolation mode s Set interpolation key 2 d Delete interpolation keys 2 g Center camera on root node n Show "normal" skeleton (Frankenstein pose) r Reset all states in current window A Add displacement map points for selected joints in current frame D Delete displacement map points for selected joints in current frame M Merge displacement map data onto motion capture data P Clear motion-capture position data Q Clear position displacement map R Clear motion-capture rotation data S Clear rotation displacement maps O Write motion to output.bvh file I Print displacement map points for selected joints in current frame to stdout w New window 3 v New view 3 X Close 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.