motioncraft
Action-aware animation quality gate checking weight, anticipation, foot skate, and spacing.
Action-aware motion QA gate layered above onion.py that evaluates walks, runs, jumps, balls, and throws for bob amplitude, phase lag, foot skate, flight time, anticipation, volume preservation, and spacing.
git clone https://github.com/BestRoiMedia/anim-toolkit.gitWhy we built it
An animation can have zero frame-to-frame pops or loop seams and still look lifeless—like a walk with no vertical bob, a run with no airborne flight phase, or a jump with no anticipation. We built motioncraft to encode classical animation principles into measurable, confidence-rated JSON checks.
Architecture & how it works
motioncraft.py ingests joint tracks (from keylib), rig pivots (from onion), or extracted silhouettes/bboxes (from frame folders), tracking confidence as high (joints/rig), medium (silhouette), or low (bbox). Depending on the declared --action (walk, run, jump, ball, throw) and optional --profile (heavy, bouncy), it measures vertical bob, stride speed, planted foot sliding, toe push-off holds, airborne lift, anticipation dips, silhouette volume drift, and balance, emitting structured WARN diagnostics with measured values and thresholds.
Key capabilities
- Action-specific rule sets for walk, run, jump, ball, and throw cycles
- Diagnostic codes: WALK_BOB_LOW, WALK_BOB_PHASE, CYCLE_FAST, FOOT_SKATE, WEAK_PUSHOFF, RUN_NO_FLIGHT, EVEN_SPACING, OFF_BALANCE, NO_ANTICIPATION, SIMULTANEOUS_JOINTS, VOLUME_DRIFT
- Direct ingestion from onion reports (from-onion), keylib sequences (from-keylib), or raw frames (from-frames)
- Confidence grading (high, medium, low) and INSUFFICIENT_DATA reporting when required landmarks are absent
- Heavy vs. bouncy spacing-profile comparison via --profile
Usage example
python3 anim/motioncraft.py from-onion ./out/walk --action walk --fps 24
python3 anim/motioncraft.py from-keylib ./seq --action run --profile bouncy
python3 anim/motioncraft.py check ./tracks.json --action jump