AutoMovie API
    Preparing search index...

    Function inertializePose

    • Inertialize a transition between two poses: the target motion plays from the cut, and the source's offset from it decays to zero.

      At the cut the displayed pose was the source; from then on it is the target plus an offset. Every rotation's offset q_s q_t^-1 (each joint's articulation and the root's rotation) decays as its rotation vector, per axis, with the angular velocity offset, by inertializeOffset (Bollo, GDC 2018), and is applied before the target rotation; the root translation decays per axis the same way. Each is therefore continuous in value and velocity at the cut, reaches the target exactly at its own clamped decay time and never overshoots it.

      A ball joint is blended as a rotation, never per clinical angle: its [flexion, abduction, twist] is an Euler chart, and at the chart's gimbal nearly equal rotations have far apart triples, whose per-angle blend swings the bone through poses neither side holds. The blended rotation is lowered to angles through the rig (poseJointCodec), in the chart its range of motion admits best. A joint with no offset left returns the target's own angles untouched.

      A hinge or a two-axis joint (poseJointCodec.ICodec.ball false) is blended per angle instead, each angle's offset decayed with its rate offset: the rotations its angles span are a lower-dimensional set, and an offset rotation applied to one of them leaves that set, which the lowering would answer with motion on an axis the joint does not have. Its angles have no gimbal inside their range, so the per-angle blend is the faithful one.

      The result is a pure function of the elapsed time and the target pose at that time, so a caller can evaluate it on any grid. Contact corrections (foot planting, grips) belong after it: an inertialized planted foot would slide in world space (Holden, Dead Blending, 2023).

      Parameters

      • source: IAutoMoviePoseState

        The displayed pose and its velocity at the cut.

      • target: IAutoMoviePoseState

        The target's pose and velocity at the cut.

      • duration: number

        Requested decay time, seconds; positive.

      • through: boolean = false

        Whether an offset heading to its target faster than the decay absorbs passes through it and returns, as inertializeOffset bounds, instead of stopping short of it within milliseconds: the "never overshoots" above is then given up for a bounded acceleration at the cut.

      • Optionalrig: IAutoMoviePoseRig

        The rig the joints' angles are read through, the one both states' spins were sampled with; the default basis with rest-relative angles when omitted.

      • Optionalprepared: ICodec | (() => ICodec)

        Optional same-rig codec or lazy getter shared with the actual source/target rate sampling; the concrete codec retains the existing offset lifetime.

      Returns (elapsed: number, pose: IAutoMoviePose) => IAutoMoviePose

      The displayed pose for an elapsed time and the target pose at it.