Generative Motion Infilling from Imprecisely Timed Keyframes

Purvi Goel, Haotian Zhang, C. Karen Liu, Kayvon Fatahalian

Abstract

In traditional animation, the precise timing of keyframes is critical for achieving physical realism and expressive character movement. However, specifying these timestamps is a labor-intensive task that often results in unnatural dynamics when done imprecisely. This paper introduces a generative diffusion model designed to treat keyframe timing as a "loose constraint." By employing a dual-head architecture that predicts both a global time-warp and local spatial residuals, the system transforms imprecisely timed poses into high-fidelity, physically plausible motion sequences.

1. Introduction

Motion in-betweening—the process of generating smooth transitions between sparse keyframes—is a cornerstone of character animation. While modern AI models have made significant strides in automating this process, they typically rely on "hard constraints," where the model is forced to reach a specific pose at an exact frame. This requirement places a heavy burden on the animator. If a keyframe is placed even a few frames out of sync with natural physical momentum, existing models often produce "jerky" motions or unrealistic accelerations as they struggle to satisfy the temporal constraint.

This research addresses the "timing problem" by allowing for temporal flexibility. The authors propose that the intent of a pose is often more important than its exact placement in time. By relaxing the temporal requirements, the model can automatically adjust the timing to ensure the resulting motion adheres to the laws of physics and natural human movement.

2. Methodology: Dual-Head Diffusion

The core of the proposed system is a conditional diffusion model utilizing a Transformer-based decoder. Unlike standard models that predict motion directly from a fixed timeline, this architecture splits the generation process into two distinct components:

2.1 Global Time-Warping ($w$)

The first head of the model predicts a global time-warp function, $w$. This function effectively "stretches" or "squashes" the input timeline. If a user provides a sequence where a character is expected to perform a complex maneuver in too short a duration, the time-warp function can shift the keyframes forward or backward to a more physically viable point in time.

2.2 Local Pose Residuals ($\Delta X$)

The second head focuses on spatial details and secondary motion. It predicts residuals ($\Delta X$) that add nuance to the motion—such as weight shifts, arm swings, and realistic transitions—that are absent in the sparse input. The final motion $Y$ is synthesized as: $$Y = warp(w, X) + \Delta X$$ where $X$ represents the initial coarse path derived from linear interpolation of the keyframes.

3. Experimental Setup

To train and validate the model, the researchers utilized the HumanML3D dataset, a comprehensive collection of human motion capture data. A significant challenge was the lack of a dataset containing "poorly timed" animations. To solve this, the authors created a Synthetic "Mistimed" Dataset. They identified "extreme" poses (e.g., the apex of a jump or the extension of a kick) in high-quality clips and randomly shifted their timestamps by several frames ($\Delta k$). By deleting the original motion between these shifted keyframes, they simulated the type of imprecise input a novice animator might provide.

4. Key Insights

The "Loose-Timing" (LT) approach yields several conceptual breakthroughs:

  • Physical Naturalism: By allowing the model to retime constraints, it finds a "physically natural" path. The model prioritizes the visual goal of the pose over the arbitrary timestamp.
  • Differentiable Warping: The explicit prediction of a time-warp function allows the model to be trained end-to-end, minimizing reconstruction error more effectively than models that simply attempt to "hallucinate" around bad timing.
  • Increased Diversity: Interestingly, the looseness of the constraints increases the diversity of the generated motion. The model can explore various ways to transition between poses—such as varying the speed or weight of a movement—since it is not locked into a rigid schedule.

5. Results and Discussion

The LT model was compared against state-of-the-art baselines like CondMDI, which utilizes hard constraints.

5.1 Quantitative Performance

The LT model demonstrated superior performance in higher-order physics metrics, specifically L2-Acceleration and L2-Jerk. Lower values in these metrics indicate smoother, more natural transitions and a better representation of physical "weight." Crucially, despite the temporal flexibility, the model maintained a low Keypose Error (KPE), ensuring that the final animation still faithfully reached the specific poses requested by the user.

5.2 Qualitative Success

In practical tests involving complex actions like martial arts and dance, the model successfully "fixed" problematic user inputs. For instance, if a kick was placed too immediately after a ducking motion, the model automatically stretched the timeline, providing the character the necessary time to shift their weight and execute the kick naturally.

6. Limitations and Future Work

While the model represents a significant step forward, several areas for improvement remain:

  • Explicit Physics: The model currently lacks an explicit physics engine, which can occasionally lead to minor artifacts like limb-floor intersections.
  • Hybrid Constraints: Future iterations could benefit from a mix of "hard" and "loose" constraints, allowing animators to lock specific moments (like a footstep hitting the ground in time with music) while leaving others flexible.
  • Multi-Actor Dynamics: The current focus is on single-actor sequences. Extending this logic to interdependent motions between two or more characters remains a complex challenge for future research.

7. Conclusion

By treating keyframe timing as a suggestion rather than a command, this generative motion model bridges the gap between user intent and physical reality. The dual-head architecture provides a robust framework for creating high-quality animations from sparse, imprecisely timed inputs, making sophisticated character animation more accessible to creators of all skill levels.

Summary updated

BibTeX
@article{goel2025generative,
  author = {Purvi Goel and Haotian Zhang and C. Karen Liu and Kayvon Fatahalian},
  title = {{Generative Motion Infilling from Imprecisely Timed Keyframes}},
  journal = {Computer Graphics Forum},
  year = {2025},
  doi = {10.1111/cgf.70060},
}
Figure