Animate your rigged character with motion from a video

Your video model makes the motion; your own rig plays it. The clip is made of a colour-coded picture of your rig, read back frame by frame, and turned into keyframes on your character's own bones. The art is never redrawn, so it stays exactly as you made it.

You bring
A rigged character, and a video model (or footage to copy the motion from).
You get
Your character with new bone animations: a .riv, plus a fit sheet showing every frame matched.
Needs
The npm install (reading video), and Chrome or Edge.

Which rigs it takes

Your rigWhat comes back
Parts cut by Polymation, from a picture or a layered PSD (Rig a character from a picture)A .riv of those parts with the new animations.
A character rigged in Rive: a .riv file, or the one open in your session (for example an SVG rigged with rig_svg). Bones, or a group per moving part; vector shapes, images and paths that bend between bones.Your own file with new animations, still vector, keyed on its own bones.
A character rigged in Spine: the skeleton (.json or .skel, Spine 3.8 JSON and 4.0 to 4.3) with its atlas, and the skins to wear.Your skeleton with the new animation added and everything else left as it was, as Spine JSON next to a .riv of the same character. IK and other constraints on the moved bones are held off while it plays.

Rigs from Live2D and DragonBones aren't read. Their art can come in as a layered PSD and be rigged here.

A flipbook, or your rig?

Video clip to sprite animationThis guide
What playsThe video's frames, as picturesYour rig, posed by keyframes
The artWhatever the video model drewYours, never redrawn
File sizeGrows with every frameOne set of parts
Edit afterwardsFrame by frameMove keys, change timing and easing, blend with other animations
Best forMotion a rig can't draw: turning, cloth, bendingA rig you already have, many animations sharing one set of art

Ask your assistant

  • Make a guide clip from my spineboy-pro.json so my video model can animate a wave, then add the animation to the skeleton.
  • Write me a video brief to make my rigged fox (fox-parts/manifest.json) run, with a jump as an extra move.
  • Animate mascot.riv waving, using my video model. Keep its own bones.
  • I filmed myself doing a dance (dance.mp4). Put that motion on my rigged character.
  • Here are the clips: run.mp4 and jump.mp4. Key them onto the rig and check the motion.

How it works

  1. The brief. sprite_art_brief in video mode, given your rig, writes guide.png: your rig's own parts at rest, each painted one flat colour with darker edges, on green, on a floor strip. The colours are picked so no two parts share one, however many parts the rig has, and parts that meet (an upper arm, its forearm, its hand) get colours far apart, so a video model's smear can't merge them. It writes one clip prompt per motion, and one per extra move, describing the guide as a flat cut-out paper puppet, which keeps open video models from redrawing it.
  2. Your video model animates the guide. Attach guide.png and use each prompt as written.
    • Motion from footage: give the brief a reference clip, such as you filmed doing the move. The brief is then for a video tool that copies motion from a video onto a picture (motion transfer), and the rest is the same. Nothing here detects poses itself.
  3. Frames. video_to_sprite turns each clip into frames, with the background and floor keyed out.
  4. The fit. frames_to_rig reads every frame back part by part, by colour, so a near leg is never mistaken for the far one, and poses your rig to match it. The poses become keyframes on your character's bones. Extra moves become their own animations, each played by a trigger and returning to the loop.
  5. Read the verdict and look at the fit sheet: the answer opens with GOOD, FAIR or POOR and why, and the sheet shows every frame beside the rig posed to match it, the frames that are off marked. Then review_motion checks how the motion reads: sliding feet, moves that stop dead, wobble, a jump at the loop point.

Good to know

  • Spine skeletons: name the joints to move when the skeleton bends meshes with helper bones, or has more than about 24 moving parts. The guide's colours stay apart that way. A binary .skel comes back as JSON with its bones and the new animation, ready for Spine's Import Data.
  • Parts only turn at their joints. A limb that bends along its length, gets shorter, or turns toward the camera can't be drawn by turning parts, and the fit sheet shows where. Keep motion like that as a flipbook.
  • The video model has to keep the guide's flat colours. The brief asks for it. A clip that repaints the guide in shading or texture reads worse, and the verdict says so. Open models run locally have smeared the colours of moving parts. Clips made before 1.21 still read: their colours are recognised.
  • Motion that leaves the canvas, like a sword raised overhead, is fitted whole: the canvas grows to hold it, and so does the artboard built from a parts manifest.
  • A one-shot as the main clip: pass loop: false to frames_to_rig. It is written to play once, and review_motion judges it as a one-shot, which it can also be told with its own loop.
  • IK chains in a Rive rig would override the new keys, so the new animations hold their strength at 0.
  • Time: a 24-frame clip on a 14-bone rig takes about a minute and a half, with progress shown frame by frame.

Related