Offset at the cut, any unit.
Offset velocity at the cut, that unit per second.
Requested decay time t1, seconds; positive.
Seconds since the cut.
Whether an offset heading to zero faster than the decay absorbs passes through it, bounded as above, instead of stopping short.
The offset, its velocity and the decay time used.
The decaying offset of one channel after a transition, by inertialization.
Bollo (Inertialization: High-Performance Animation Transitions in Gears of War, GDC 2018) replaces a cross-fade with an offset: at the cut the new motion starts at once, and the difference between the old and the new value (
x0) and velocity (v0) decays to zero overt1seconds on a quintic with zero value, velocity and acceleration att1. Written abouts = t1 - t, that quintic isx(t) = s^4 (b + c s)withb = (5 x0 + v0 t1) / t1^4andc = -(4 x0 + v0 t1) / t1^5: it starts atx0with slopev0, so the displayed value and velocity are continuous at the cut, and it keeps the sign ofx0exactly whenbdoes, that is whent1 <= -5 x0 / v0for a velocity heading toward zero. Bollo's clamp shortenst1to that bound, so the offset never overshoots; a velocity heading away needs no clamp. A zero offset leaves the signed lobev0 s^4 t / t1^4, which returns to zero without crossing it.Unlike a critically damped spring, which only approaches zero, the quintic ends at exactly zero at
t1, so a transition has a finite, known end; it is closed-form in the elapsed time, so any frame can be evaluated alone, and it is the method of Unreal's Inertialization node.The clamp buys its guarantee with acceleration: the quintic starts at
-(8 v0 t1 + 20 x0) / t1^2, which at the clamped time is4 v0^2 / (5 x0), without bound as a channel is cut nearer the instant it passes its target. A channel cut there stops within milliseconds, a step in velocity in all but name. Withthroughthe clamp is not taken: the same quintic runs the wholeduration, so its starting acceleration stays within(8 |v0| duration + 20 |x0|) / duration^2, and the offset passes through zero and returns, by no more than the velocity in excess of5 |x0| / durationtimes256 duration / 3125, the peak of the signed lobe. That is the follow-through of a body that reaches a pose at speed.