Getting Started with rig-c
You start with one painting of a character. You end with that character rigged — split into movable pieces on a skeleton — breathing, blinking, and waving in your browser.
Repository: https://github.com/rig-c/getting-started
The whole pipeline in three steps
- Paint one character. Any image model or illustration workflow produces a front-facing, full-body character PNG on a plain white background with arms clear of the body.
- Split it into layers, and mark the joints. See-through cuts the painting into layered parts (twice: full figure + head crop). Body-18 joints come from a lightweight CPU script (
rtmlib) or hand placement. - Run the rig-c packages on the CPU.
@rig-c/parts,@rig-c/core,@rig-c/pose, and@rig-c/playassemble the parts, author meshes and bones, gate the build, retarget motion, and play it in the browser. No GPU is used in step 3.
Try it first — no GPU, no Python
This builds a published example character whose painting and See-through layers are already made. Its joints are hand-placed, so this route needs Bun 1.4.4 (the version tested below), curl and tar, with a macOS or Linux shell. The new reproduction below ran on Linux; Windows was not tested. Painting and layer generation happen before this recipe, on the full guide's GPU or hosted routes. A person still judges how the result looks.
Choose a versioned run. The commands here pin four packages, their dependency overrides, the helper-script commit and the example input commit. They reproduce this page's historical package combination; they are not an install of the latest packages. For a rolling-latest walkthrough, use the upstream guide and its existing scheduled CPU walkthrough CI. Its tested-with record has its own date and versions. That job polls npm daily and runs weekly regardless.
What the time records include
The historical Apple M4 runs on 2026-10-21 covered steps 1–10, including 9b and 9c: install, input download, assembly, the idle build, wave, hello, cloth rebuild and server checks. They used Bun 1.4.2, helper commit 093204686165630a9d6912675fc0cf9df6ada398, @rig-c/parts 1.54.0, rig-c 2.65.1, @rig-c/pose 0.38.0 and @rig-c/play 1.12.0. Other jobs kept the load average between 20 and 95.
| Historical run | Observed duration, steps 1–10 with 9b and 9c |
|---|---|
| Empty Bun cache; includes package downloads and the 41 MB example; hand-placed joints | 536 s |
| Warm caches; step 6 used the CPU detector, with pose models already downloaded | 571 s |
These are two observed durations under that load. They establish neither an upper bound nor a quiet-machine estimate. Image generation, the two See-through runs and human review are outside them. Step 10 checked HTTP 200 for the page and both models, then stopped the server; these times do not include a person's browser review. The recipe below replaces the old default-branch clone and unversioned install with verified archives and explicit pins, so it has a separate reproduction record.
Pinned recipe reproduced 2026-10-27. A new empty working directory on a Linux x86_64 / WSL2 shared runner, with Bun 1.4.4, npm 11.19.1 and Node 24.22.1, passed all 12 step groups (1–10 plus 9b/9c). The direct versions are the four listed above; the dependency overrides are printed in step 1. The runner used an isolated HOME and a new dedicated Bun cache; this is not a claim about cold OS, network or CDN caches. Helper and input archives passed the printed SHA-256 checks. The quoted output figures below matched, including hello's 33.6 px / 16.05 → 12.92 degrees and cloth's 12/13 measured bars, one SKIP and five warnings. Chromium 153 also exercised both step-10 URLs: advancing poses, pause/resume and breeze, with no page errors. This is a Linux reproduction, not a new Apple timing or a human visual verdict.
Start from an empty directory and run the numbered steps in order. Keep the shell open: step 1 sets a dedicated Bun cache for this run. An empty working directory alone does not mean every cache is cold.
1. Install the packages
mkdir rig-c-start
cd rig-c-start
export BUN_INSTALL_CACHE_DIR="$PWD/.bun-cache"
curl --fail --location --output helpers.tar.gz https://codeload.github.com/rig-c/getting-started/tar.gz/093204686165630a9d6912675fc0cf9df6ada398
bun -e 'const b = await Bun.file("helpers.tar.gz").arrayBuffer(); if (new Bun.CryptoHasher("sha256").update(b).digest("hex") !== "df9731cbbd9a983fca2c7353a0fc8b78c49319ba7e29e34fda1a0f72536e848a") throw new Error("archive checksum mismatch")'
mkdir getting-started
tar -xzf helpers.tar.gz --strip-components=1 -C getting-started
rm helpers.tar.gz
mkdir my-rig
cd my-rig
cat > package.json <<'EOF'
{
"private": true,
"type": "module",
"overrides": { "rig-c": "2.65.1", "ag-psd": "31.0.3", "base64-js": "1.5.1", "pako": "2.1.0" }
}
EOF
bun add --exact --backend=copyfile @rig-c/parts@1.54.0 rig-c@2.65.1 @rig-c/pose@0.38.0 @rig-c/play@1.12.0
Every command from here on runs in my-rig. The helpers come from the full commit above; the archive checksum is checked before extraction. --exact saves exact direct dependencies, and the explicit overrides hold parts and pose to the same compiler and explicitly set the three transitive dependency versions used in this run. --backend=copyfile keeps this install independent of cache hardlinks. Keep the generated package.json and bun.lock with your result for later reinstalls. bun run rig-parts and bun run rig-pose use this project's installed CLIs.
2. Get the example inputs
curl --fail --location --output exam.tar.gz https://codeload.github.com/rig-c/exam/tar.gz/01436ee3f02c189fe1a1e9656fe62068889837f5
bun -e 'const b = await Bun.file("exam.tar.gz").arrayBuffer(); if (new Bun.CryptoHasher("sha256").update(b).digest("hex") !== "c2224a08620ec0929c8e139a7dfcf257b30eba562d306300e6455ed54c2ba977") throw new Error("archive checksum mismatch")'
tar -xzf exam.tar.gz --strip-components=3 exam-01436ee3f02c189fe1a1e9656fe62068889837f5/tasks/01-build/inputs
tar -xzf exam.tar.gz --strip-components=1 exam-01436ee3f02c189fe1a1e9656fe62068889837f5/LICENSE exam-01436ee3f02c189fe1a1e9656fe62068889837f5/NOTICE.md
rm exam.tar.gz
You now have inputs/ with painting.png, layers/full/ and layers/head/. These inputs are CC BY-NC 4.0 — see Licensing.
3. Start the config
cat > config.json <<'EOF'
{
"key": "exam-01",
"seethrough": { "resolution": 1024, "steps": 30, "seed": 42, "offload": true },
"assemble": { "rig_scale": 0.5 }
}
EOF
bun run rig-parts inputs --source inputs/painting.png --config config.json --out work
You should see st_input_full.png 2432x2432 and a note that there is no head box yet.
4. Find the head box
bun run rig-parts layers inputs/layers/full
bun run rig-parts propose --head-box --full inputs/layers/full --canvas 1664x2432 | tail -n 1 > work/head_box.json
bun ../getting-started/scripts/take.ts work/head_box.json config.json seethrough.head_box=head_box
bun run rig-parts inputs --source inputs/painting.png --config config.json --out work
You should see 29 layer(s): 29 with opaque pixels, 0 WARN line(s), work/head_box.json holding {"head_box":[616,32,1132,548]}, then st_input_head.png 516x516.
5. Assemble the parts
bun run rig-parts assemble --propose-plan --source inputs/painting.png --full inputs/layers/full --head inputs/layers/head --config config.json > work/plan.json
bun ../getting-started/scripts/take.ts work/plan.json config.json assemble.plan=plan assemble.extend_below_crop=extend_below_crop
bun run rig-parts assemble --source inputs/painting.png --full inputs/layers/full --head inputs/layers/head --config config.json --out work
You should see 22 parts, then recomposite vs source: mean |d|=1.13, within 8: 97.8%.
6. Put the joints in place
sed -n '/^```json$/,/^```$/p' ../getting-started/docs/KEYPOINTS.md | sed '1d;$d' > keypoints.json
This copies the hand-placed body-18 joints for this painting out of the guide's docs/KEYPOINTS.md, which also explains how to place them for a painting of your own.
The optional CPU detector needs Python/uv and downloads pose models. It is a separate route in the upstream guide; it was not run for this pinned no-Python recipe. The historical warm-cache timing above used that detector, which is why it is kept separate from the hand-placed route here.
7. Draft the bones
bun -e 'const f = "keypoints.json", k = await Bun.file(f).json(); k.people[0].joints.l_ankle.at = [848, 2140]; await Bun.write(f, JSON.stringify(k, null, 1) + "\n")'
bun run rig-parts propose --parts work/rig --source inputs/painting.png --out work --keypoints keypoints.json
bun ../getting-started/scripts/take.ts work/proposal.json config.json bones meshes regions motion limbs
This is where a person corrects the draft, and the first line is the example's one correction: it puts the left ankle on the shin at [848, 2140], so both ankles lie on the leg art and propose cuts the shoes into one part per foot. The hand-placed file already has it there; the script puts it 12 px off the art, and without the line propose prints a LINT and leaves the shoes one part that no leg bone moves.
You should see 0 LINT line(s) over 6 mesh(es) and the hip and a coverage line ending 44 bone(s) — 29 checked and clean, 0 checked with a LINT line, 15 not checked.
8. Build the rig
bun run rig-parts build --config config.json --source inputs/painting.png --full inputs/layers/full --head inputs/layers/head --out out --loop
You should see limb cut: "shoes" opaque 13735 = "foot_r" 8071 + "foot_l" 5664, then check: PASS; 11 of 13 bar(s) measured, 2 skipped (FEET_STAY_LEVEL, STRESS_OFF_CHAIN), then build: PASS. FEET_STAY_LEVEL is skipped because the idle turns no leg; step 9b's hello does. Open out/idle.gif: the character breathes and blinks in a loop.
out/check/build), playing its idle: 40 frames at 12 fps, looping, drawn by @rig-c/play 1.12.0 over the page rather than by rigc render, whose frames are opaque by design. Captured from the then-current walkthrough, run on 2026-10-20 with @rig-c/parts 1.42.0 and rig-c 2.64.1. With reduced motion on, the first frame stands still.A skipped bar is named with its reason; any FAIL line means nothing was written, and the line says what to change. A green build means the checks passed — whether it looks right is yours to judge (out/idle.gif, or Review).
9. Give it a wave
bun ../getting-started/scripts/wave.ts keypoints.json wave.pose.json
bun run rig-pose clean --pose wave.pose.json --out wave.pose.clean.json
cat > map.json <<'EOF'
{
"spec": "rig-pose-map/1",
"chains": [
{ "name": "trunk", "bones": ["chest"], "joints": ["mid_hip", "neck"], "aim": ["neck"] },
{ "name": "arm_r", "bones": ["sleeve_r0", "sleeve_r1"], "joints": ["r_shoulder", "r_elbow", "r_wrist"], "bend": "free" },
{ "name": "arm_l", "bones": ["sleeve_l0", "sleeve_l1"], "joints": ["l_shoulder", "l_elbow", "l_wrist"], "bend": "free" }
],
"translate": { "bone": "hip", "joint": "mid_hip", "scale": { "pose": ["mid_hip", "neck"], "rig": ["hip", "neck"] } }
}
EOF
bun run rig-pose retarget --rig out/rig --map map.json --pose wave.pose.clean.json --out wave.motion.json --name wave --profile spine-html --build wave-build
You should see 73 frame(s), 3 s at 24 fps, a GATE … green line, and wrote wave.motion.json — animations: idle, wave. wave-build/ holds the rig with both animations.
9b. Say hello
A motion can also be written as keys on the bones and handed to the build, which checks it with the rig. The guide's scripts/hello.ts writes a hello of under five seconds that way from the rig step 8 built; the config names the file in motion.animations_from, and the build runs again.
bun ../getting-started/scripts/hello.ts out/rig/rig.json
echo '{"animations_from": "hello.anim.json"}' > work/hello-from.json
bun ../getting-started/scripts/take.ts work/hello-from.json config.json motion.animations_from=animations_from
bun run rig-parts build --config config.json --source inputs/painting.png --full inputs/layers/full --head inputs/layers/head --out out --loop
You should see hello.ts: 4 beats (hm?, heh, wave, settle), 4.75 s at 24 fps, 16 tracks of 115 keys; sleeve_r0 at most 4.0 deg and a settle of 33.6 px in and 16.05 -> 12.92 deg on the hand-placed joints, then from the build FEET_STAY_LEVEL: PASS, check: PASS; 12 of 13 bar(s) measured, 1 skipped (STRESS_OFF_CHAIN); 1 warning(s) and build: PASS. The warning is SEAM_OVER_MOTION, never a bar: a sliver of the forearm shows past the sleeve's cuff where it turns at the elbow. The wave is the forearm's, because on this painting swinging the whole arm out, as step 9 does, opens a gap at the armhole. As the arm comes down she re-plants her weight, her right foot sliding in toward the other and back, on the two feet step 7's correction made.
9c. Let the hair and the skirt answer
A cloth block in the config hands the skirt (bottomwear) and the hair around the face (front hair) to physics, propose --cloth drafts chains with a physics constraint on each link, and the build carries them. Then her breath, her head and the hello's hip move them, and no key does.
bun ../getting-started/scripts/hello.ts out/rig/rig.json --no-skirt-keys
cat > work/cloth.json <<'EOF'
{
"cloth": {
"bottomwear": { "chains": 3, "links": 3, "wind": [1, 6], "gravity": [2, 12], "translate": 0.2,
"swing": { "scales": [1.2, 1, 1.2] } },
"front hair": { "chains": 1, "links": 3, "wind": [1, 6], "gravity": [2, 12], "translate": 0.2,
"strength": { "trunk": 100, "branch": 100, "edge": 100 } }
}
}
EOF
bun ../getting-started/scripts/take.ts work/cloth.json config.json cloth
bun run rig-parts propose --parts work/rig --source inputs/painting.png --out work --keypoints keypoints.json --cloth config.json --write-config config.cloth.json
mv config.cloth.json config.json
bun -e 'const f = "config.json", c = await Bun.file(f).json(); c.motion.tracks.find((t) => t.bone === "bun").amp = 1; await Bun.write(f, JSON.stringify(c, null, 2) + "\n")'
bun run rig-parts build --config config.json --source inputs/painting.png --full inputs/layers/full --head inputs/layers/head --out out --loop --lead-in 1
The first line writes the hello again without its skirt keys (14 tracks of 115 keys): from here physics follows her hip. propose --cloth writes the config with the new chains and every other byte as read, and mv makes it yours. The proposal prints one LINT line about the chain amplitude before the correction below. Two lines correct the draft: strength makes the side locks stiff enough not to pull off her cheek when her head turns, and the bun -e line raises the bun's swing, without which the build stops at CHECK_CHAIN_LAG.
You should see check: PASS; 12 of 13 bar(s) measured, 1 skipped (STRESS_OFF_CHAIN); 5 warning(s) (SEAM_OVER_MOTION, CLOTH_SETTLES, not a bar), a lead-in: line ending max |d| 0, 0 px over 40 — the jump at the wrap, and build: PASS. CLOTH_SETTLES is a warning, not a failure: the skirt hangs into place within 2 seconds and then rests, because the idle never moves her hip. --lead-in 1 plays the idle once before out/idle.gif is cut from it, so the loop starts after the skirt has settled.
10. Play it in your browser
bun ../getting-started/scripts/serve.ts
Open hello over idle: she notices you, smiles with two little shrugs, waves with her forearm beside her shoulder and re-plants her weight, while the locks beside her face and the skirt trail after her. &under=idle keeps the idle playing beneath, so she breathes through it. The page also blows a light breeze through @rig-c/play's player.environment(); untick breeze, or add &wind=0, for the runtime's own steady wind. Open step 9's wave; the menu switches animations. Ctrl+C stops the server.
hello from the 2026-10-21 walkthrough's out/check/build after the guide's steps 9b and 9c, unedited: 4.75 s, 57 frames at 12 fps, looping, in the page's breeze, after one pass of settling so the hair and skirt are already moving. Step 10's page plays the hello over the idle, so she also breathes through it; this clip is the hello alone, because the two loops (4.75 s and 3.33 s) never line up into one that repeats. Its wave is an elbow-down wave, the upper arm kept within 4 degrees of rest, and every seam the guide's build reads stays inside its tear bars (gap ≤ 25 px, ghost ≤ 50 px) at every phase of the breeze. Drawn by @rig-c/play 1.12.0 over the page rather than by rigc render, whose frames are opaque by design. That walkthrough was run on 2026-10-21 with @rig-c/parts 1.53.0, rig-c 2.65.1, @rig-c/pose 0.37.0. With reduced motion on, the first frame stands still.The full guide — making your own character, the GPU routes, troubleshooting and every measured figure — is the rig-c/getting-started README and its docs/REFERENCE.md.
Three ways to use the output
- On the web with
@rig-c/playor an engine adapter: Loadskeleton.model.jsonand part PNGs directly. The packages are MIT and integrate no Spine Runtime. - In the Spine 4.3 Editor: Import
out/check/build/skeleton.jsonviaImport Dataand pointImagestoout/rig/images/to refine timelines by hand (requires rig-c 2.51.1+; the editor is under the Spine Editor License Agreement). - In a game engine via official Spine Runtimes: Load
skeleton.jsonandskeleton.atlasin Unity, Godot, Unreal, or C++ runtimes under the Spine Runtimes License.
The example inputs in step 2 come from rig-c/exam and are CC BY-NC 4.0, not MIT: free to use with credit, not for commercial use, and what you build from them carries that licence. Which terms each route brings: Licensing.