Algorithm Search⌘K

Techniqueadvanced

Motion signal processing

Also called motion multiresolution filtering.

Treat joint angle curves as signals and edit motion by multiresolution filtering, waveshaping and timewarping of frequency bands.

Motion signal processing treats each joint angle curve of a motion as a sampled signal and edits it with the tools of signal processing. The main tool is a band decomposition: repeated lowpass filtering splits each channel into a slow base and a few bands of higher frequency, like a Laplacian pyramid in one dimension. The animator then sets a gain for each band and adds the bands back: more gain on the middle bands makes a walk more lively, less gain on the high bands makes it calmer, and the sum with all gains 1 gives the original motion back exactly. The same paper also uses waveshaping (a function applied to the channel values), timewarping (to align two motions before a blend), multitarget blends by band, and motion displacement mapping, the idea of motion warping. Bruderlin and Williams presented the method at SIGGRAPH 95.

In plain words

A joint angle that changes over time is like a sound. It has slow parts, such as the large swing of a leg, and fast parts, such as small shakes. The method splits the curve into layers, from slow to fast, by smoothing it again and again and keeping what each smoothing removed. You make each layer louder or softer. Then you add the layers back together. If you change nothing, you get the same motion. If you make the middle layers louder, the motion looks more energetic; if you make the fast layers softer, it looks more relaxed.

When it applies

The technique applies to motion stored as channels sampled at a fixed rate: joint angles, root positions, or the parameters of a face. Band gains suit stylistic edits that change all frames a little, such as more or less energy. They do not keep constraints: a gain on the hip and knee bands moves the feet, so contacts need a cleanup afterward. The decomposition is a linear operation, and the claims about it below are properties of the filter. That a gain makes a motion look "more lively" or "calmer" is a visual judgment, and the gains are a control of the user.

Angles must be continuous in time: unwrap jumps of 2π2\pi before filtering. Channels of Euler angles filter well only away from gimbal lock; three angles of one joint filtered alone can give a rotation that is in neither neighbor frame.

The template

  1. Choose the levels. For a channel of ff samples, take LL levels, few enough that the widest kernel of step 2 still fits in the signal.
  2. Lowpass again and again. Set G0G_0 to the channel. For l=0,…,L−1l = 0, \dots, L - 1, convolve GlG_l with the kernel w=(1/16,1/4,3/8,1/4,1/16)w = (1/16, 1/4, 3/8, 1/4, 1/16) widened for level ll, to get Gl+1G_{l+1}. The kernel at level ll spans 2l2^l times the time of the base kernel, made by placing zeros between its taps. The signal is not downsampled, so every GlG_l has ff samples. At the ends, extend the signal, for example by repeating the end value or by reflection.
  3. Form the bands. Ll=Gl−Gl+1L_l = G_l - G_{l+1} for l=0,…,L−1l = 0, \dots, L - 1. The last lowpass GLG_L is the base (the paper calls it the DC band).
  4. Set the gains. Choose a gain klk_l for each band, and possibly a separate gain for each channel.
  5. Reconstruct. The new channel is GL+∑l=0L−1klLlG_L + \sum_{l=0}^{L-1} k_l L_l. With every kl=1k_l = 1 the sum telescopes to G0G_0, the original channel, exactly.
  6. Fix constraints. Restore the foot contacts and other constraints with inverse kinematics or footskate cleanup.

The kernel is the binomial filter of B-spline smoothing that Burt and Adelson used for the Laplacian pyramid: its taps are positive and sum to 1, so it keeps constants and is a lowpass filter. Each level costs 5f5 f multiply and add steps, so the decomposition costs O(fL)O(f L) per channel, and the reconstruction the same.

Classic examples

A band gain by hand. Take the impulse G0=(0,0,0,0,1,0,0,0,0)G_0 = (0, 0, 0, 0, 1, 0, 0, 0, 0) and one level. The lowpass is G1=(0,0,1/16,1/4,3/8,1/4,1/16,0,0)G_1 = (0, 0, 1/16, 1/4, 3/8, 1/4, 1/16, 0, 0), and the band is L0=G0−G1=(0,0,−1/16,−1/4,5/8,−1/4,−1/16,0,0)L_0 = G_0 - G_1 = (0, 0, -1/16, -1/4, 5/8, -1/4, -1/16, 0, 0). With k0=2k_0 = 2, the result is G1+2L0=(0,0,−0.0625,−0.25,1.625,−0.25,−0.0625,0,0)G_1 + 2 L_0 = (0, 0, -0.0625, -0.25, 1.625, -0.25, -0.0625, 0, 0): the peak is higher and has negative side lobes, so the high frequencies are stronger. With k0=0k_0 = 0, the result is G1G_1, a smoother peak. With k0=1k_0 = 1, the result is G0G_0 again. At the next level the kernel with zeros is (1/16,0,1/4,0,3/8,0,1/4,0,1/16)(1/16, 0, 1/4, 0, 3/8, 0, 1/4, 0, 1/16), which spans 9 samples instead of 5.

Walking style. The paper applies band gains to all joints of a walk and shows how the style changes; for example, higher gains on the middle bands give a more exaggerated walk.

Waveshaping. A shaping function ss maps each value of a channel to a new value, θ′(t)=s(θ(t))\theta'(t) = s(\theta(t)). A function that flattens near a joint limit keeps the joint from overextending; a function with small waves adds an undulation to the motion.

Timewarping and blends. To blend two motions, the paper first aligns them in time with dynamic time warping of their signals, then blends band by band, so that the base of one motion can mix with the detail of another. The same need for alignment is the reason for registration curves.

Displacement. Motion displacement mapping adds a smooth curve through a few keys to a channel; it is the same idea as motion warping from the same conference.

Variations

  • Downsampled pyramid. Downsample each lowpass by 2, as in the image Laplacian pyramid. It stores less, but the bands no longer have one value per frame, and an edit needs an upsampling step.
  • Fourier methods. Unuma, Anjyo and Takeuchi (1995) used Fourier series of cyclic motions to interpolate and exaggerate emotions.
  • Wavelets. Wavelet transforms give bands that are orthogonal, at the cost of a less smooth reconstruction when the gains change.
  • Per joint gains. Set the gains for each channel, for example to calm the arms and keep the legs.
  • Displacement on top. Combine the bands with a motion warping offset to meet keys after the style change.

Pitfalls

  • Contacts. Band gains move the feet and hands. Planted feet slide unless a cleanup follows.
  • Ends of the signal. The kernel reads past the ends of the clip. The choice of extension changes the first and last frames; cyclic motions should wrap around.
  • Angle jumps. A jump from π\pi to −π-\pi in a channel is a large step to the filter. Unwrap the angles first.
  • Large gains. A high gain on a low band changes the pose a lot and can put limbs through the body or the floor.
  • Rotations as angles. Filtering Euler angles channel by channel is not the same as filtering rotations; near gimbal lock the result can twist.
  • The name. The alias "motion multiresolution filtering" names only the band part of the paper, not the waveshaping or the timewarping.

Exercises

  1. Show that GL+∑l=0L−1Ll=G0G_L + \sum_{l=0}^{L-1} L_l = G_0 for any number of levels and any lowpass filter. Answer: the sum telescopes, GL+(G0−G1)+(G1−G2)+⋯+(GL−1−GL)=G0G_L + (G_0 - G_1) + (G_1 - G_2) + \dots + (G_{L-1} - G_L) = G_0.
  2. Show that a constant channel has zero bands at every level, so no gain changes it. Answer: the taps sum to 1/16+1/4+3/8+1/4+1/16=11/16 + 1/4 + 3/8 + 1/4 + 1/16 = 1, so the lowpass of a constant is the same constant, also with zeros between the taps, and every difference Gl−Gl+1G_l - G_{l+1} is 0.
  3. How many samples does the widened kernel span at level ll, and what is the largest LL for a walk of 120 frames if the kernel of the last level L−1L - 1 must fit? Answer: 4⋅2l+14 \cdot 2^l + 1 samples; 4⋅2L−1+1≤1204 \cdot 2^{L-1} + 1 \le 120 gives 2L−1≤292^{L-1} \le 29, so L=5L = 5.
  4. Compute the result of the impulse example with k0=0.5k_0 = 0.5. Answer: G1+0.5L0=(G0+G1)/2=(0,0,1/32,1/8,11/16,1/8,1/32,0,0)G_1 + 0.5 L_0 = (G_0 + G_1)/2 = (0, 0, 1/32, 1/8, 11/16, 1/8, 1/32, 0, 0).

References

  1. Armin Bruderlin and Lance Williams, Motion signal processing, SIGGRAPH 95, 1995, 97 to 104, Section 2.1 (multiresolution filtering with the kernel 1/16, 1/4, 3/8, 1/4, 1/16), and the sections on multitarget interpolation, timewarping, waveshaping and motion displacement mapping
  2. Peter J. Burt and Edward H. Adelson, The Laplacian pyramid as a compact image code, IEEE Transactions on Communications 31(4), 1983, 532 to 540, the generating kernel and the bands as differences of successive lowpass images
  3. Andrew Witkin and Zoran Popović, Motion warping, SIGGRAPH 95, 1995, 105 to 108, the displacement curve through keys, which is the same idea as motion displacement mapping

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples