Mesh Avatar Studio Guide
Guides › Rig JSON Fields Reference

Rig JSON Fields Reference

Every avatar is driven by one rig.json — here is what its fields actually mean.

The rig.json file is the skeleton of every Mesh Avatar Studio avatar: it tells the engine where the head, eyes, mouth, hair and body are in your illustration and how far each may move. The editor edits this file when you drag dots; agents draft it from zoomed grids; the layer builder consumes it. This reference explains the coordinate system and every field group.

The coordinate system (read this first)

Only buns, strands, accessories, hand, view.gazeCenter and view.irisTravel are optional — omit what the illustration does not have. Never copy the sample avatar's coordinates into a new image.

head — the face-turn engine

FieldMeaning
cx, cy, rx, ryInfluence ellipse: centre near the face centre, slightly above the eyes; radii must include hair and head accessories, avoiding shoulders where possible
shiftX / shiftYMax face-turn displacement; start around 3–4% / 2–3% of image size
pivotX, pivotYRoll pivot — the centre of the neck, above the collarbone
maxRollRoll magnitude at a ±30° pose in radians; start near 0.15
weightBand / turnBandY ranges fading head influence and face-turn displacement below the chin

body — breathing and sway

Roll pivot near the bottom of the image (maxRoll around 0.035 for a ±10° pose), a chest ellipse covering the visible upper torso inside the arms, one ellipse per visible shoulder, and three bands: breathBand (breathing fades from upper chest down), rollBand (body roll fading to the anchored lower torso), plus the head bands above.

face — small influence ellipses

One ellipse each for nose, mouth, both eyes (eyeA = image-left), both ears (placed even when hidden under hair), a brow ellipse with a fade band, and a jaw ellipse above the chin. These decide how localized mesh deformation is around each feature.

eyes — the polygons that make blinking work

FieldMeaning
openingPolygon tracing the eye white + iris inside the lashes, 14–20 points starting at the outer corner — the quality of blinking lives here
roiPolygon surrounding the full lashes and lower lid by about 10–20 px, avoiding hair
x0, x1, top, botGenerated by the builder (24 sampled edge points) — omit all four in drafts or supply all four; partial groups are errors

Index 0 is the image-left eye. Changing eye geometry always requires a layer rebuild — old sampled curves cannot reconstruct new pixels.

mouth — a line plus an edit area

The closed mouth is described as a line: centre, angle, half-length and a bow curvature (px at the middle). A separate rotated area ellipse slightly beyond the lip corners is the edit region for drawn open-mouth sprites — tall enough for open mouths without reaching the chin.

strands — swaying hair physics

Each lock is a root-to-tip polyline (nodes, starting with four points entirely on hair), an influence width (sigma ≈ half the visible lock), a spring multiplier (k, start 1) and a max displacement (max, 7–12 px). Bangs: 3–5 locks; side hair: two per side.

Optional groups

mesh — deformation resolution

Cell sizes control mesh density: baseCell (~14), a fine rectangle around face and hair with a finer cell (~7), and dedicated cells for hand (~9), tassels (~6), eye white (~4), lash (~3) and sprite (~4) layers. Reduce fine cells only when detail needs it. view holds viewport margins and the optional gazeCenter / irisTravel for pointer-following eyes (raise to ~15% of eye width for large eyes).

How this file is actually edited

In practice you almost never hand-edit: the editor's draggable dots write these fields, and coding agents draft them from zoomed coordinate grids following the official agent guide. Hand-editing matters when you script batches or debug a specific number. The complete field table, including every band and experimental group, lives in the official rig fields documentation.