Skip to content
Tutorials menu
Tutorialsmotions

3D motions

A skeleton's motions (page 8) move limbs forwards and back in a side view. That covers walks and runs, but not a sword slashing across the body, a turn, a dance, or anything from motion capture. 3D motions do: bone rotations for any humanoid, drawn on your characters in any direction through the game's camera. This page covers:

  • the motion library every game shares, and a game's own motions;
  • importing motions from motion-capture files, from Meshy's library and from a video;
  • looking at, editing and blending motions, and writing them out as VRMA;
  • a character's 3D body;
  • drawing a motion on a character with PixelLab, as a cut-out, or with Ludo.

How 3D motions work#

  • One format for every source. A motion is rotations of VRM's humanoid bones (hips, spine, leftUpperArm, leftLowerLeg and so on) over time. Whatever rig a file was made for (Mixamo, CMU's motion capture, Unity, Unreal, SMPL), it's converted on the way in, so any motion fits any character.
  • A library shared by every game. Imports go to ~/.local/share/atelier/library/motions/ by default, so a walk you import once is there for every game. When a game uses a library motion, it's copied into that game's art/motions/, so the game's repo can always redraw what it drew.
  • Licences travel with the motion. Mixamo's files are fine in games, but the files themselves mustn't be shared, so they're marked "not redistributable" and the web app says so. Exports are frames, never motion files, so a shipped game carries none of them. Keep such motions out of public repos.
  • Your character keeps its own pose. A motion moves a character's body: its limb lengths, measured from its rest poses. Each joint is the joint where the character was drawn, plus the motion's move projected through the game's camera. A stocky dwarf and a tall elf share one motion and still look like themselves.
  • Any direction. A motion is 3D, so it projects into 8, 16 or 32 directions. Near and far limbs swap depth as they swing past each other, and PixelLab is told which is in front.

Recipe: import motions#

Using Atelier, import <~/Downloads/Sword And Shield Slash.fbx> into the motion library as <slash>, and show it to me.

motion_import (free for files) reads:

File From
.fbx Mixamo (export "without skin" for a small file), Unity, most tools
.bvh The CMU motion-capture library, Rokoko's free packs, Blender
.glb / .gltf Blender and most 3D tools; the first animation, or clip for another
.vrma VRM Animation files, which name their own bones
.npz / .json SMPL and SMPL-H parameters (AMASS, HY-Motion)

On the way in, a motion is turned to face the camera, its travel is taken out so it plays in place, and its foot contacts are found. The result shows a mannequin playing it from four directions. If a rig isn't recognised, Claude passes boneMap naming its bones.

  • Into the game instead: add "into this game" (into: 'project').
  • A skeleton's motions: "add the skeleton's walk to the library" converts a side-view motion (fromSkeleton), so it can be drawn the 3D way too.
  • Meshy's library (paid, through fal): "import Meshy animations 92 and 105". Meshy rigs Atelier's stock mannequin and returns each clip, saved as meshy-<id>. A call costs $0.20 plus $0.12 a clip, up to 10 clips, so ask for several at once. This is experimental.
  • Finding Meshy's clips: motion_catalogue (free) searches its 677 humanoid clips by name and kind ("walk carry", "sword", category Fighting), and says which you already have. The Motions page has the same list under Meshy's library: search it, hover a clip to see its preview, tick up to ten and Queue for Claude, which makes a task with the motion_import { meshy } call and its price, since the import is paid. Meshy's list also has quadruped clips (ids from 1055), but fal's endpoint takes only the humanoid ones (0–696).
  • In the web app: the Motions page takes files dropped onto its Import box.

Recipe: a motion from a video#

Using Atelier, turn <clips/backflip.mp4> into a motion called <backflip>.

motion_from_video (paid: about $0.02 a frame on fal) is motion capture from a phone clip or a generated video. ffmpeg takes 15 frames a second (fps) from start for duration, up to 60 frames (maxFrames), and sends each to SAM 3D Body. When every frame is back, their 3D joints become a motion: each bone is turned to point where its joints do, frames where nobody was found are filled from their neighbours, and smooth frames either side are averaged to steady it. It's then faced to the camera with its travel taken out, like an import.

  • Film for it: the whole body in frame, side-on or three-quarter, with a still camera, and one person (with several, it follows the one nearest the last frame's).
  • What it can't see: the forearms' twist and the fingers. Check the result with motion_get, its contacts above all, then motion_edit { cycle: true } for a loop.
  • A tracker's own output: if you ran GVHMR or WHAM yourself, import its SMPL .npz free with motion_import { file }.
  • This is experimental.

Recipe: look at and edit a motion#

Using Atelier, show me <slash> on <hero>, then trim it to frames <10–45> and make it loop.

  • motion_list lists what's available, with each loop's seam in typical steps (marked JUMPS above 1.5), a loop that skips part of a stride (marked SKIPS), its notes and what it was made from; motion_get shows one, with its contacts, its loop seam, the cycle it repeats on, how far its hips drift each cycle, whether its last frame repeats its first and whether it holds whole strides, on a mannequin (with assetId, the character's own body; sheet: false for the details alone).

  • motion_edit (free) changes it where it is:

    Edit Does
    trim: [10, 45] Keeps those frames
    cycle: true Keeps one whole cycle (the one whose pose comes back closest a period later) and spreads what's left of the seam across it, hip drift included: the way to make a walk loop. cycle: { start, period } names one
    loop: 6 Cross-fades its last 6 frames into its first, so it loops. Only for a clip already about one cycle long: the result gives the seam in typical steps and warns when cycle would do better
    mirror Swaps left and right (a left-handed slash from a right-handed one)
    turn: 'front' Faces it to the camera on its first frame
    neutralise: { neck: 0, head: 0.5 } Takes out that share of each bone's constant turn and keeps its swing: Mixamo's walks lean the neck forward about 17°, which reads as a heavy nod on a big-headed character
    speed: 1.5 Plays it faster, by its frame rate
    duration: 2 Retimes it to last that many seconds (a loop: one cycle), by its frame rate
    frames: 32 Resamples it to exactly that many frames, keeping its length
    fps: 15 Resamples it, keeping its length
    notes: '…' What it's for, or how it differs from similar ones
    inPlace: false Puts its travel back
    saveAs: '<id>' Keeps the original and saves the edit as a new motion
  • Edits apply in that table's order, so { cycle: true, duration: 2, frames: 32 } keeps one cycle, makes it last 2 s and resamples it to 32 frames.

  • Every edit can be taken back. Atelier keeps each motion as it was imported, with the list of edits since. motion_edit { history: 'undo' } takes back the last one, 'redo' puts it back, and 'revert' returns the motion as imported (redo then steps forward again, one edit at a time). motion_get lists the edits. A new edit after an undo drops what was left to redo.

  • motion_delete (free) removes a motion and its history: the game's copy if it has one, else the library's (which every game shares), or the one where names. It can't be undone. Sprites already drawn from it keep their frames; the result names any animation that would need it back to be redrawn.

  • Importing a file again: motion_import refuses an id that's already taken; pass overwrite: true to replace it (its edits and their history go too, and the new import is the new original) or another id to keep both.

  • On the Motions page: pick a motion to see it play on a mannequin. Drag across the mannequin to orbit it: left and right turn it to any angle, up and down tilt the camera. The 8 direction buttons snap to theirs, and the yaw and pitch are shown under it. Choose a character under On a character to see the motion on its skeleton in every direction it has a rest pose in, the way PixelLab will get it. Trim, loop, speed, mirror and the rest are beside it, with Undo, Redo, Revert to original and the list of edits so far, and Delete (which asks first). Dropping a file whose motion is already there asks whether to Replace it, Keep both (under the next free id, such as walking-2) or Skip.

Recipe: blend one motion into the next#

Using Atelier, blend <walk> into <carry-walk> over <8> frames.

motion_blend (free) makes a transition motion to play between two others. Over frames frames (default a third of a second) each bone fades from the first motion's pose to the second's, both still playing. Into a loop, it lands on the second motion's phase closest to the first one's, so the stride carries on without a skip; the result (and the transition's notes) says which frame of the second motion to play on from. A one-shot is held at its last frame, or at its first when it's the one being blended into.

  • The transition is a motion of its own (walk-to-carry-walk, tagged transition): draw it like any other, with animate_from_model, export_cutout or animate_from_skeleton.
  • include: 'all' saves the first motion up to the fade, the fade, then the second motion to its end, as one clip.
  • at starts the fade at another frame of the first motion, and toFrame names the frame of the second to land on.
  • On the Motions page: Blend into, under the editor.

Recipe: write a motion out as VRMA#

Using Atelier, write <walk-cycle> out as a VRMA file.

motion_export (free) writes exports/motions/<id>.vrma, a VRM Animation file that three-vrm, UniVRM, VRoid and Blender's VRM add-on read. Its bones stand in VRM's T-pose at about 1.7 m, so each track is the motion's own rotation, with the hips' height and sway on their own track. A loop's first frame is written again at its end, since glTF clips don't wrap. rootMotion: true puts back the travel taken out on import. Motions that aren't redistributable (Mixamo's) are written with a warning to keep the file private. The Motions page has Download VRMA.

Recipe: a walk that loops cleanly#

Motion-capture walks rarely loop as they come. A typical 32-frame walk is a 31-frame cycle whose last frame repeats its first, and whose hips sink a little each cycle, so the loop hitches. A carry-walk cut to the wrong length holds two thirds of a stride, and skips. Cross-fading fixes neither.

Using Atelier, make <walking> a seamless single-cycle loop called <walk-cycle>, lasting about 2 seconds in 32 frames.

  1. motion_get says where it repeats ("Repeats every 31 frames … the hips drift −0.093 hip heights") and how far its seam jumps, in typical steps (about 1 is seamless; above 1.5 shows).
  2. motion_edit { cycle: true, duration: 2, frames: 32, saveAs: 'walk-cycle' } keeps one cycle, spreads the seam and the drift across it, makes it last 2 s and resamples it. The result gives the new seam.
  3. For a big-headed character, add neutralise: { neck: 0, head: 0.5 }.

A clean seam isn't enough. A cross-faded loop can join up smoothly and still hold part of a stride too many or too few (a loop of 1.4 steps, say). Atelier checks two things: the loop's length against the period it repeats on inside itself, and its foot-downs, which in whole strides alternate left and right at an even beat, the one across the seam included. motion_get says "Stride: SKIPS part of one" with the reason, and motion_list marks it.

Paid calls check the seam and the stride first. animate_transfer_motion { motion }, animate_from_skeleton { motion } and animate_from_model's paid outputs refuse a loop whose seam jumps more than 1.5 steps, or that skips part of a stride, before anything is sent; pass acceptSeam: true to go ahead anyway. Where the client can ask you directly (page 14), Atelier asks "send it anyway?" instead of refusing, and only your yes sends it. Free renders only warn.

Timing for sprites: a game that picks walk frames by distance needs exactly one cycle in its frame count. Ludo draws for whole half-seconds (1 to 5 s), so a cycle of about 2 s (duration: 2) fits one Ludo call exactly; the result warns when the frames won't hold a whole number of cycles.

Recipe: a character's body#

3D motions need the character's body: how long its limbs are and how wide its shoulders and hips. Atelier measures it from the rest poses (skeleton_estimate or human_pose, page 8) whenever a motion needs it, for free.

Using Atelier, measure <hero>'s body and show it to me.

body_estimate saves that measurement on the asset and shows a mannequin with it. With method: 'sam3d' (about $0.02 on fal), SAM 3D Body measures the proportions from one still instead, which helps when the rest poses were rough (experimental).

Recipe: draw a motion on a character#

Using Atelier, check <slash> on <hero> with guides, then draw it in all directions.

  1. skeleton_render_guides { motion: 'slash' } (free) draws the motion's skeleton over each direction's still.
  2. animate_from_skeleton { motion: 'slash' } draws it with PixelLab, exactly as for a skeleton motion: one paid job a direction. The frame count comes from the motion's length at 10 frames a second (3 to 15), and its contacts from the motion's. For 16 or 32 directions, PixelLab is sent the nearest of its 8 and the joints carry the true angle.
  3. normalise_frames, then qa_report, which checks the frames followed the motion, as for any skeleton animation.

As a cut-out (page 8): name 3D motions in export_cutout { animations }. Their parts carry a depth track, so a near arm swings in front of the body and back behind it; CutoutSprite draws them in that order.

For painted characters (Ludo): animate_transfer_motion { motion: 'slash' } renders the motion at each direction's view and sends that video as the motion to copy, telling Ludo to draw for the video's own length (otherwise it draws about 2 s and loops a shorter guide: a 1 s walk came back as two cycles). With ffmpeg installed it's an MP4 ; otherwise a GIF.

  • With a rigged model (page 13), the character's own model plays it: by far the better guide.
  • Without one, a mannequin with the character's body plays it. A character with no rest poses gets a typical adult's body, and Ludo then draws it with adult proportions: a chibi's walk comes back tall and thin. So a character whose head is far bigger than an adult's is refused unless it has rest poses (skeleton_estimate), a body, or a rig, or you pass confirmTypicalBody: true (or, where the client can ask you, you say go ahead when Atelier asks).
  • qa: { retries: 1 } measures each direction's head width against its still when the frames come back, and redraws the ones that came back small (paid, within the budget), keeping whichever drawing is closer.

Troubleshooting#

Problem Fix
"Can't find leftUpperArm … among the file's bones" The rig wasn't recognised: pass boneMap with its bones' names (the error lists them).
The motion lies down or faces away Rigs are stood up and faced from their rest pose; a SMPL capture uses up: 'z'. motion_edit { turn: 'front' } faces it.
Feet slide or float Check its contacts in motion_get. A clip with no planted foot keeps the nearest foot on the ground every frame.
The arms sit oddly on a character Its body came from rough rest poses: fix them with human_pose, or try body_estimate { method: 'sam3d' }.
"not redistributable" It's a Mixamo file (or you said so): fine in your game, but don't publish the motion file.
The loop hitches or skips motion_get shows the seam in steps, the cycle and whether it holds whole strides; motion_edit { cycle: true } keeps one whole cycle. loop (cross-fade) only suits a clip already one cycle long.
"loops cleanly but skips part of a stride" A paid call refused a loop with part of a stride missing or doubled: motion_edit { cycle: true }, or pass acceptSeam: true.
A motion from a video jitters or lies down Raise smooth (2 or 3), film side-on with a still camera, and check the joints were found in most frames (the result says how many were filled in).
A blend steps out of phase Pass toFrame to land on another frame of the second motion, or lengthen the fade (frames).
"jumps at its loop seam … Nothing was sent" A paid call refused a loop that jumps: fix it with cycle: true, or pass acceptSeam: true.
A walk drawn by Ludo has two cycles in its frames Ludo drew longer than the guide. Retime the motion (motion_edit { duration: 2 }) or pass duration.
An edit made it worse Undo it, or Revert to original (motion_edit { history: 'revert' }); no need to import it again.
"Nothing to undo" on a motion you edited A file changed outside Atelier starts a new history from the motion as it is. Import the file again with overwrite: true (or Replace it on the page) to start from the original.

Next: Animated 3D characters, which play these motions on a character's own rigged model.

Found a mistake? Edit this page on GitHub.