@rig-c/parts
One painting and its See-through layers in — measured parts, a drafted rig and a looping idle out.
out/parts/. The assembled figure that opens and closes the loop is drawn at the positions parts.json records, in the rig's draw order; the labelled grid and the dissolves between them are this page's illustration.Skip to Install · Inputs and outputs · Limits · Docs
Cutting a painted character into rig parts is slow, and the mistakes show up late: a layer holds the wrong pixels, a part leaves a hole, a chain swings a skirt about its middle. rig-parts measures each of these and prints the number, so an agent that cannot see the image can still tell where it went wrong. A refusal names the object, the value found and the value required; nothing is written after a red, and no value is invented where the input is silent.
How Character 1 was made
1. Two See-through runs
2. Parts, and what they miss
assemble merges the two runs into rig-space parts, then lays them back together and compares the result with the painting. The error map is the point of that step: it shows, in colour, the painting that no part holds.





For this build parts.json records a mean difference of 0.873 per pixel, 98.3% of pixels within 8, and 6,041 uncovered error pixels. The largest hole it lists is 834 px along the edge of bottomwear. A clean recomposite is what lets the rig move without showing the background through.
3. A drafted rig that idles
propose drafts bones, weighted meshes, regions and a looping idle over those parts, for a person or an agent to correct; build runs assemble, rig and check in one process and stops at the first refusal.
build --loop wrote it: 41 frames at 12 fps, 0 to 3.33 s with both ends included. Here the same build plays the 3.33 s loop (40 frames, the 41st being where it wraps), drawn by @rig-c/play 1.12.0 over the page rather than by rigc render. With reduced motion on, the first frame stands still.
check's contact sheet of the same idle — what the measured bars read.The idle then goes on: Pose gives the same rig a recorded motion, and Core is the compiler every one of these builds went through.
How it works
- Inputs.
inputscuts the two images See-through is fed: the painting on a white square, and a square crop around the head. - Layers. You run See-through by any route — a hosted demo, the upstream CLI, or ComfyUI. rig-parts reads its
.psdor the ComfyUI wrapper form; an artist's own layered PSD works too, with no See-through step. - Assemble. The two runs merge into rig-space parts; uncovered holes are listed and the error map shows them.
- Propose. Bones, meshes, regions and an idle are drafted with an overlay to correct against. It is a draft, not a step of
build: you copy its sections intoconfig.json, and LINT lines flag what still looks wrong. - Build. Assemble, rig and check in one process; compiling, gating and packing are rig-c's.
Key terms. See-through layers — the painting's decomposition, one run on the full figure and one on the head. Parts — the merged, measured pieces in rig space (parts.json). Proposal — the drafted bones, meshes, regions and motion, to be corrected. Config — config.json, the character's part plan, head box, bones and idle; unknown or missing fields are refused by name. FAIL line — a refusal that names a rule and ends with (see rig-parts guide <RULE>).
Depth-driven head turns
The released 2.x package gives a rig a per-part depth sheet for every part that turns, so a painted head reads as having volume when its yaw_dial and pitch_dial move — the effect the head-turn demo shows. The feature page, written for a person deciding and trying, is docs/DEPTH.md; the two routes it describes are:
- See-through's own sheets. Enable
config.depthand declare the sheets' polarity (near) and positive world-unit scale (zScale). See-through's sheets usenear: "black"; a fallback sheet declares its own polarity and scale. A filename hint alone does not enable depth input, and a missing declared sheet is an error.assembleregisters the sheets with the parts. - Per-part maps from a depth model you run. Two explicit stages sit between
assembleandrig:depth-preparewrites one inference image per part on neutral grey with a source-hashed manifest, anddepth-applyturns the model's floating-point maps (or signed normals for the face) into sheets at the medians and reliefs you declare, writing a relocated assembled directory anddepth-report.json. Neither stage carries a model, weights or downloads. In side-by-side review this route read better than a single map of the whole painting.
Either way, declare config.turn.roles: at least one surface becomes a depth-sampled Core grid (or an authored weighted mesh keeps its skinning and takes per-vertex depth offsets); unit features move together at sampled or declared depths; rear parts follow the rear carrier. turn.body.roles adds an independent body yaw. The rig stage writes padded sheets and depth_sheets.json, and turn and tilt animations driven by yaw_dial / pitch_dial (body_yaw_dial for the body).
The config contract documents the grid, pivot, rear counter-motion and refusals; the per-part map contract documents the recipe, the map format and the DEPTH_* refusals. All turn-bound sheets in a group must share a polarity and scale. Surface grids default to 13 × 16 cells and are limited to 2,400 triangles per slot and 4,000 across surfaces. These are producer limits; the much denser standalone head-turn demo is a separate implementation. An upright head is an input requirement: the rig stage warns by name (RIG_TURN_HEAD_ROLL) when the eye line it reads is rolled.
Install
npm i -D @rig-c/parts
rig-parts --help
The published package declares Bun 1.4.0 or later; @rig-c/core comes with it as a dependency. Which Spine terms apply depends on what plays the output: see Licensing.
Inputs and outputs
| In | Out |
|---|---|
One character painting (painting.png) | check/build/skeleton.json, skeleton.atlas, skeleton.png — Spine 4.3 data and one packed page |
Two See-through layer sets (full, head), as the ComfyUI wrapper form or a .psd | parts/*.png, parts.json, the recomposite and its error map |
A character config (config.json) | rig/rig.json, rig/motion.json in rig-c's spec |
Optional body-18 keypoints for propose --keypoints | check/: both gate files, the idle's frames, contact.png, check.json; with --loop, the idle as APNG and GIF |
Limits
From the 2.0.3 README, authoring contract and depth feature page:
- Legacy turns use one ordering depth per layer. A layer that crosses another can look right in the still and wrong in motion. The opt-in depth-sheet producer samples a surface per pixel instead; it does not turn the layer stack into unrestricted 3D geometry or supply unseen artwork. An authored weighted mesh becomes a depth-sampled surface only when
turn.rolesdeclares it one. - A single drawing has a turn range. The default rated band is ±15° yaw and ±12° pitch. Going beyond it requires a declared alternate face drawing; depth samples alone do not draw the hidden side.
- Depth is estimated elsewhere.
depth-prepareanddepth-applycarry no model; the author runs the depth estimation and declares each part's median and relief. The report measures the sheet it wrote, not the shape's quality. - No expression or lip-sync, and no jiggle. The mouth is one layer; nothing here proposes, keys or judges a soft region.
- Occluded pixels are See-through's synthesis, not the artist's.
- No success rate is claimed — ten characters measured stage by stage is an existence proof, not a rate.
- No WebP:
loopwrites GIF and APNG. - The proposer reads tags, not pictures, and reads the torso by screen y unless it is given keypoints; it does not estimate a pose itself.
Go deeper
- README: What it takes in and What it gives out
- README: The loop, for an agent, the full command sequence
- README: What it does not do
- docs/AUTHORING.md: every config field, what to read after each stage, every refusal
- docs/DEPTH.md: depth-driven rigging for a person — what you get, the two stages, how to pick a painting and judge the result
- docs/PAINTING.md: what makes a painting riggable
- docs/STABILITY.md · NOTICE.md · CHANGELOG.md · npm
- Character 1's own files: its folder in rig-c/examples