alt="The same tāniko bodice and piupiu skirt on an animated character in the game's clothing test bed.">
<figcaption>
The same two garments after the downstream half, worn in-game in the Clothing Test Bed and
playing an animation. Note the piupiu clipping through the left thigh — that is the kind of
defect the downstream <code>fit</code> stage's clearance shell exists to prevent, and it is
why we review in the test bed rather than trusting the MD render.
</figcaption>
</figure>
<h2>How a garment actually gets made</h2>
<p>Six steps. Every one of them produces numbers that the next one is checked against.</p>
<h3>1 · Take the reference apart</h3>
<p>
Before drafting anything, the reference image is deconstructed into a worksheet: which body slot
each piece belongs to, where it's anchored, where its edges should sit in metres, and how much
ease (slack) it needs. Every downstream number traces back to a row of that worksheet. Skipping
this step is how early garments shipped <strong>4–14 cm off target</strong>.
</p>
<h3>2 · Draft from Lena's measurements, not a size chart</h3>
<p>
Lena is stylized. Her card reads roughly <spanclass="num">108 – 67 – 109 cm</span> with
<spanclass="num">72 cm</span> thighs on a <spanclass="num">178 cm</span> frame. Real-world
size charts produce clothes that simply do not fit her. The measurements are extracted straight
off the game mesh by a script that slices it at known heights
(<code>tools/tailor/measure_body.py</code>), so they describe the body the game actually renders.
</p>
<h3>3 · Build from blocks, not freehand</h3>
<p>
We have parametric <em>blocks</em> — a fitted top, an A-line skirt, a strand/fringe skirt — that
turn worksheet numbers into a runnable pattern. You give it the band height, hem height and ease;
it emits the panel outlines, the seam pairing and the arrangement rules with the known fixes
already baked in. Hand-typing point lists is how the early mistakes happened.
</p>
<h3>4 · Drape it on the body</h3>
<p>
The flat panels get arrangement points on the avatar (shoulders, waist, skirt front/back), then
the cloth simulates onto her. The sequence matters more than the settings:
</p>
<ul>
<li><strong>Stiffen the fabric for the whole settle, relax only at the end.</strong> Soft cloth
from frame zero rolls into a bunch at the waist.</li>
<li><strong>Apply waist elastic mid-settle, never from the start.</strong> Elastic applied before
the cloth has wrapped cinches the garment off one hip.</li>
<li><strong>Bottoms stay up by tension, not elastic</strong> — cut the waist smaller than the hips
and let the fabric stretch hold it.</li>
<li><strong>One garment per scene.</strong> A second garment, even frozen, grabs and inverts the
new one. Outfits are assembled at the very end from finished pieces.</li>
</ul>
<h3>5 · Judge the fit by numbers, not by eye</h3>
<divclass="callout">
<p>
This is the step that was missing at the start, and it matters most. Early drapes were accepted
because they <em>looked like clothing</em>. They were bunched around the middle.
</p>
</div>
<p>
Now every drape is measured. A script (<code>qc_placement.py</code>) reads the render, separates
background from skin from garment, calibrates pixels-to-metres off Lena's known 1.777 m height,
and reports where each garment band's top and bottom actually sit — against a target table pulled
from the reference photo. For the kapa haka outfit that table was: pari top at
<spanclass="num">1.31 m ±3 cm</span> (above the bust), pari hem and piupiu waist at
<spanclass="num">1.05 m ±3 cm</span>, piupiu hem at <spanclass="num">0.45 m ±4 cm</span>
(below the knee). We iterate until it's inside tolerance.
</p>
<p>
Every shipped garment also gets a screenshot committed to
<code>tools/tailor/screenshots/</code>, front <em>and</em> back. That's how the work gets reviewed
without anyone opening Marvelous Designer.
</p>
<h3>6 · Export four ways</h3>
<divclass="wrap">
<table>
<thead><tr><th>File</th><th>Why we keep it</th></tr></thead>
<tbody>
<tr><td><code>.zprj</code></td><td>The editable source of truth. Opens in MD normally. Regenerating a variant from this always beats re-authoring.</td></tr>
<tr><td><code>.fbx</code></td><td>What the downstream Blender pipeline consumes.</td></tr>
<tr><td><code>.obj</code></td><td>Plain-text backup, and the only reliable way to measure the mesh (see below).</td></tr>
<td>The garment drapes <strong>upside-down over her head</strong> and tangles</td>
<td>In MD's 2D pattern window, <strong>y+ is UP in 3D</strong>. Panels drafted y-down come out inverted. It looks exactly like a seam bug and isn't — seven iterations were lost to this once.</td>
</tr>
<tr>
<td>A strapless top <strong>slides down to the underbust</strong></td>
<td>Cloth falls to the narrowest catch. MD doesn't simulate <em>putting a garment on</em> — it materialises the cloth where you arranged it. Add straps; it fixes placement and coverage at once.</td>
</tr>
<tr>
<td>The garment <strong>slides off the shoulders</strong> or twists partly inside out</td>
<td>Seam pairing. Panels drafted as identical copies offset sideways are <em>not</em> mirrored, and need the opposite flip setting from mirrored ones.</td>
</tr>
<tr>
<td>Everything in the scene <strong>changes colour at once</strong></td>
<td>Fabric slot 0 is the shared default. Colouring it dyes every garment. Always add a new fabric.</td>
</tr>
<tr>
<td>A defect ships because <strong>nobody saw the back</strong></td>
<td>MD's snapshot camera has no rear view at all — bottom, front, ¾, sides, top, and that's it. Four separate defects shipped through this blind spot before we started using turntable renders for the back.</td>
</tr>
<tr>
<td>A busy texture <strong>hides folds and inside-out panels</strong></td>
<td>Judge shape with the texture off: cloth renders white on its front face and grey on its back, so a grey patch seen from outside is inside out and a white streak is a fold.</td>
</tr>
</tbody>
</table>
</div>
<divclass="callout">
<p>
<strong>The one diagnostic that unsticks everything:</strong> render the scene right after
arranging the panels but with <em>zero</em> simulation frames. That shows where the cloth
actually starts, before physics muddies the picture. Reach for it the moment a drape
misbehaves.
</p>
</div>
<h2>What doesn't work yet</h2>
<ul>
<li>
<strong>Trousers and shorts are unsolved.</strong> Two-panel construction with a crotch notch
twists every time — fabric can't thread between Lena's touching thighs, and every seam
configuration has been tried. The next idea is four panels arranged on the per-leg points, so
the cloth starts already wrapped around each thigh.
</li>
<li>
<strong>The placement measurement is honest but crude.</strong> It counts the body's baked-in
underwear and the floor shadow as garment. Fine for band positions; needs per-garment colour
masks when precision matters.
</li>
<li>
<strong>MD's AI Image Generator and EveryWear are GUI-only</strong> — they can't be scripted, so
<tr><td><code>tools/tailor/</code></td><td>The garment workshop: per-garment recipes, the parametric blocks, Lena's measurement card, QC scripts, generated textures, and every shipped <code>.zprj</code>/<code>.fbx</code>/<code>.obj</code></td></tr>
<tr><td><code>tools/tailor/screenshots/</code></td><td>The review renders — start here to see what exists</td></tr>
<tr><td><code>tools/md_bridge.py</code> + <code>tools/md_bridge/</code></td><td>The socket bridge into MD, and a dump of MD's real API surface (688 functions, introspected — the published docs are thin and several signatures in them are wrong)</td></tr>