Sewn garments (sew and drape)
TailorKit 0.2.32 added a third way to make clothes, next to Body-fitted basics and Conform. It's the Marvelous Designer method done in plain Blender, as in Bad Normals' "You can now make clothes in Blender!" (2026-10-23, https://www.youtube.com/watch?v=6qNM8rdjcDA): flat pattern panels are sewn together and dropped onto the body with cloth physics.
Module: src/weftsmith/sew.py. Add-on: Outfit source → Sewn garments → Sew and Drape Garments.
Separate neck and head skin
In 1. Character, set Skin to a collection containing the separate skin
meshes, excluding the main body and clothing. Sewing uses their neutral Basis
geometry in the body's coordinate frame for collision. It measures exact neck
sections between the mapped neck and head joints and records the result in
neck_measurement. This prevents a shoulder-only body Neck region from sizing
an oversized collar. Without additional skin, the existing body/proxy route is
retained. Check the assembled neck and collar afterward; measurement completion
is separate from a fit pass.
Supplied neck skin must contain a closed, nonbranching section enclosing the mapped neck/head axis. Girth is measured from that connected loop's convex hull. Open, partial or offset-only skin is rejected; disconnected patches are never joined to invent a neck. Neck pieces split across separate objects require a topology adapter and are currently unsupported.
Python callers can supply additional_skin=[head_mesh] to sew.sew_garment or
sew.measure. Scene-based calls use the Skin collection by default. Sources,
their control values, materials and transforms remain untouched. This supports
the existing upright, region-labelled body and mapped-joint contract.
What happens
- Measure the body at its neutral shape (Basis key): waist, hip, chest and neck girths (convex hull of the trunk slice), landmark heights from the UE mannequin bones, arm radius along the bent arm, and the front-to-back depth under the shoulder.
- Cut each pattern's flat panels in centimetres from those measurements (
pattern_skirt,pattern_dress,pattern_sweatshirt). Seams name pairs of outline segments. Both sides of a seam get the same number of points, and the inside is a staggered grid triangulated by constrained Delaunay. Spacing comes from the triangle budget. - Place the panels around the body without stretching them:
- Trouser panels sit on the body above the crotch and on a per-leg
LevelWrapbelow it, blended over 8 cm. - Body panels go on a
LevelWrap, a stack of horizontal sections 2 cm apart. Each section is the trunk outline plus a 2 cm gap, widened wherever the garment is wider, so a skirt starts as an A-line cone. - Back panels sit 1.2 cm further out.
- Sleeves are rolled into tubes around the bent arm (wrist → elbow → shoulder), so their underarm seam starts closed.
- Front and back panels reach
over(half the shoulder depth plus the gap) above the shoulder line, so the shoulder seams close over the top. Without that, they pull the whole garment up by 10-20 cm. - Sew and drape in a temporary metre-scale scene. Sewing springs are loose edges between seam pairs. The cloth collides
with a copy of the body (plus a stand-in head on headless bodies). Elastic edges (
grip: waistbands, cuffs, hems) shrink by 8-12%. Fabrics: cotton, jersey, fleece, chiffon, pique. - Freeze: the seams are welded at their mean position, the sewing threads removed, the drape noise relaxed (2 smoothing
rounds), the cloth pushed 0.5 cm outside the skin and the faces turned outward. The flat pattern is kept as UV set
UVMap(namedPatternbefore 0.2.36; the game's re-import check wantsUVMap), so fabric textures run along the grain. - Clay and folds (the default path for anything shown in game, 2026-10-25). Give a garment
clay=N(sew_clayin a wardrobe entry) and the frozen drape is clay-smoothed (Taubin rounds, a hang pass, the spine bridge) into the clean shape the game ships. The sim's folds are not thrown away: the unsmoothed drape is frozen too, and how far it stood out of the clay shape at each vertex (cm along the normal) is stored as thetk_foldattribute.bake.bake_detailpaints it into the detail map: creases darken R/B, folds rise in the G relief. This is the dense-sim-to-light-mesh step of game character workflows (Foxcoder's Marvelous-to-Unreal video), done inside our tools.folds=Falseon the garment skips the attribute;fold_bake=Falseskips the bake. Lathe (rule-based shape, round 3c, 2026-10-25). A pattern can returnlathe=dict(...)andsew.lathereplaces the trunk's drape with a shape made by rules: the cloth radius round the trunk axis as a field over direction and height, kept to a few waves round each row and blurred down the rows. The cloth spans valleys (it may draw in onlyLATHE_TAPERcm per cm), never comes withinfit_gap(bodice) orgap(fromloose_belowdown, room for jeans) of the body's convex hull, and belowflare_belowit is an A-line (widensLATHE_FLAREcm per cm). The hem is levelled dead flat.follow(0-1) keeps that share of the drape's own extra room. The drape's detail still goes intotk_fold(it is carried along by the lathe's shift). The Sundress uses it: Alex found the clay-only dress lumpy with a wavy hem.options['lathe']=Falseturns it off. Theshapeoption on sweatshirt-cut tops is EXPERIMENTAL and off: lathe picks vertices by position, so the A-posed sleeves were pulled into the body. It must skip sleeve panels by name first. - Conform (on by default): weights, every body key, BodyUV and covered regions, as for any modelled garment.
The body's own data is never changed.
Garments (2026-10-24)
| Style | Slot | Panels | Budget |
|---|---|---|---|
| SewnSkirt (A-line skirt) | Bottom | front, back | 2000 |
| SewnDress (sundress) | FullBody | front, back, straps over the shoulders | 3500 |
| SewnLeggings (leggings) | Bottom | front and back per leg; crotch extension, centre front/back curves, inseams, outseams; rise at the natural waist, 8% negative ease, seat and knee ease, elastic waist and ankle cuffs on a Trim slot; laid snug (0.5 cm) on the skin after the drape | 2000 |
| SewnSweatshirt (loose sweatshirt) | Top | front, back, 2 sleeves; V neck, dropped shoulders, elastic cuffs and hem | 3500 |
| SewnPolo (polo shirt, 0.2.34) | Top | the sweatshirt cut closer: short open sleeves, shallow neck, straight hem, turned-down collar | 3200 |
| SewnScrubs (scrubs top, 0.2.34) | Top | boxy, deep V neck, short open sleeves, straight hem past the hips | 3000 |
| draft PyjamaShirt, SleepTee (0.2.39) | Top | loose sleepwear: pattern_pyjama_shirt (long open sleeves, collar, contrast cuffs and hem), pattern_sleep_tee (short sleeves, neck binding, contrast cuffs) |
3400 / 3000 |
bands={'neck'|'hem'|'cuff': cm} puts contrast bands on the Trim slot. Keep them at least ~1.3x the grid spacing (3 cm at
budget resolution) or they catch half a row of triangles and read as a sawtooth; along a slanted neckline they still do, so
round necks get a binding instead: collar=1.6, collar_lip=0.0 (a stand with no fall).
Short sleeves (sleeve_cm) are the top of the full sleeve: the tube starts that far up the bent arm and its open end hangs off
the upper arm. Collars (collar, cm) are not sewn in the sim: a 3 cm strip has too little mass to stand and crumpled down the
back, so add_collar builds a stand and a turned-down fall on the draped neckline after freezing (material 1, the trim).
The draft wardrobe can use any pattern: a draft.GARMENTS entry with sew='pattern_polo' (plus sew_fabric, sew_tris) is
sewn and draped instead of lofted, then goes through the same clearance over bottoms, Conform and bake as the drafted pieces.
LifeShare's polo and scrubs top are made this way.
options={'hood': True} adds a two-piece hood. It is experimental: hung down the back by default, or over the head with
hood_up. Both still drag the top upward in the drape, so it is off.
On the real Silhouette bodies (silhouette_v3_reach Manny and Quinn, 60 frames) all three garments drape as one piece with
seams under 2 cm before welding, Conform binds all 23 body keys, and tools/check_garments.py --budget lifeshare passes.
Run it
- Test (synthetic body, no assets):
python tests/sew_blender.py(SEW_ONLY=SewnSkirt,SEW_FRAMES=30,SEW_OUT=dir). Needs a Python withbpy==5.2.3. - Real-body review recipe: invoke
tools/review_sew.pyinside an owned official MCP job withBody_BASE_Quinn.fbx OUT [Styles] [frames] --conform --render-cyclesafter the argument delimiter. This is Blender code, not a standalone Python command. This writes<body>_sewn.blend, a JSON report and front, 3/4, side and back PNGs (Cycles on CPU, or tools/softrender.py without--render-cycles). - Contract check: open the
_sewn.blendand runtools/check_garments.py -- --budget lifeshare.
About 1-2 minutes per garment on a laptop CPU.
Adding a pattern
Write pattern_<name>(m, o) returning dict(panels, seams, z, slot, covers):
- Each panel is
dict(name, wrap='body'|'arm_l'|'arm_r'|'head', angle='front'|'back'|'left'|'right'|'up', outline=[(u, v), ...] counter-clockwise, hem=[segments], grip=[segments], gap=extra cm). - On the body, u is cm around the body (positive toward the character's left on the front) and v is the absolute height in cm. On a sleeve, v is measured from the cuff.
- A front panel's +u side and a back panel's -u side are the character's left. Seam orientation is picked by distance.
- Segment i runs from corner i to corner i+1. Keep the two sides of a seam within about 15% of each other's length, or the
build logs
WARNING seam lengths differ, and give anything that crosses the shoulder itsoverreach.
Then add it to GARMENTS with a fabric, a tint and a triangle budget.
Curved edges: ctrl={segment: (u, v)} on a panel bends that outline segment into a quadratic curve through the control
point (the loose sweatshirt's round crew neck uses it). The inner grid follows the curved outline.
Patterns from GarmentCode (2026-10-25)
weftsmith.garmentcode reads GarmentCode's pattern JSON (MIT; edges can be straight, quadratic, cubic or circular arcs) and
turns it into a pattern for this module: edges sampled into outline segments (stitched pairs get equal counts), stitches as
seams, torso and skirt panels rolled onto the body wrap at their own height, sleeve halves rolled along the bent arm (the
roll placement), and panel tops curled over the shoulder before the sim (fold_above). tools/garmentcode_fit.py measures
the body, runs GarmentCode in its own Python (tools/garmentcode_patterns.py, numpy < 2) and sews the designs named in
garmentcode.DESIGNS.
Status: the tee, V-neck tee, tank and long-sleeve tee sew cleanly on Quinn and Manny (the long sleeve hangs open like a bell: it needs a gripping cuff). The flared skirt, pencil skirt and dress still slide below the waist and are not ready.
Known limits
- Hood: see above.
- Leggings: the first in-game pose gate (LifeShare Art/ModelledWardrobe fit/fit_live.py, 2026-10-24) failed 0.2.33: the loose drape let skin
through in poses (thighs 91-94%, shins 82-86% covered), the hem 4 cm above the ankle flared out through boots and sneakers, and the
low band showed through top hems. 0.2.35: a pattern can ask for
snug(cm), and after the drape every vertex within 3 cm of the skin is laid at that offset (fading out to 6 cm, so the crotch keeps its sewn shape), after smoothing so the cloth does not sink into curved skin between vertices. The hem reaches the bottom of the Shins region and is cut to the full ankle girth (cut smaller it rode up over the ankle bones); the band is back at the natural waist. On Manny and Quinn: thighs 97.5-98.5%, shins 99.6% covered, cloth 0.4-0.74 cm off the skin everywhere. Paneltrimtakes{outline segment: width cm}for bands along edges (waistband 3 cm, cuffs 2 cm) or True for a whole panel. Gate #2 (0.2.35) still failed in poses: Conform's four smoothed influences let seated skin through and the band through top hems, and the hem at the bottom of the shins came out of the sneaker collar. 0.2.36: a snug garment takes every deform weight of the skin under it, unsmoothed (skin_weights, which Conform keeps), andtk_loose0 where it lies on the skin; the hem ends where the body-fitted leggings end (95% down the shin bone), since the shoes are built around those. In a cloud sit test (hips 80°, knees 90°) skin through the leggings fell from 34-62 to 9-35 vertices. Trousers are the same pattern with positive ease (stretch> 1) and nosnug. - Gate #3 (0.2.36, 2026-10-24) settled it: weights were not the cause (8 influences scored the same), and the sewn leggings
still failed 3-5x more poses than the body-fitted ones (seated skin 46-63 of 90 against 12-20; single slider extremes up
to 15 of 24 against 0). A separate cloth mesh 0.5 cm off the skin cannot follow skin as closely as a garment made from the
body's own vertices, which inherits every weight and morph delta exactly. Skin-tight wear (leggings, tights, base
layers) stays body-fitted (bodyfit). Sewing is for what bodyfit cannot make: cloth that hangs or stands away from the
body (skirts, dresses, loose tops, collars). SewnLeggings stays as the pattern for loose trousers (
stretch> 1). - The sim runs at budget resolution (about 2.5 cm), so folds are broad. That suits the cartoony look, but small pleats need a finer sim followed by a decimate.
- Drape is judged in the A-pose only. Run the pose review after Conform for walking and sitting.
Skirt gate (2026-10-24, fit_live with a Skirt style)
The draped SewnSkirt was clean at rest and never touched shoes, but its waistband stood proud of every top's hem (59-92
cases per top over all poses), and seated, stand-to-sit and sit-to-stand poses showed thigh skin through it (worst 1.6-4.6
cm). 0.2.37: snug_above lays a garment snug only above a height, fading back to the drape over SNUG_FADE cm. The skirt
is laid 0.5 cm on the skin from the waist to 2 cm under the tee hem (thigh joint - 5 cm), as the body-fitted bottoms the
tops are built around are, and flares only below (cloud: 0.5 cm median, 0.64 cm max over that yoke on both rigs). Its
waistband is on M_SewnSkirt_Trim. Seated poses are still open: exact skin weights did not help in a cloud sit test, and
the gate's own clearance pass made skirts worse, so do not run it on them.
Seated corrective (0.2.40, weftsmith.corrective)
Seated poses failed the skirt gate whatever the pattern did (exact skin weights, calf weights moved onto the thighs and a
shorter hem were all tried). corrective.bake_seated(body, garment, arm) (add-on: Sewn garments > Bake Seated Correctives)
seats both legs (thighs 85 degrees forward, knees 90), runs 20 frames of cloth on the skinned cloth over the seated body,
and stores where the cloth went as the shape key Seated, carried back to the rest pose through the garment's own weights
(exact for linear skinning: tested to 1e-5). The game drives Seated from hip flex, the smaller leg's angle between the
thigh and the pelvis's down axis: 0 standing, 1 at 85 degrees. On Quinn the skirt then hangs from the knees in a seat
instead of lying on the thighs with skin through it; on the test mannequin skirt skin-through in the seat fell from 87 to 13
vertices. The push method (no sim) and per-leg keys (sides=('l', 'r')) are there for one-legged poses. Run it after
Conform. Test: tests/corrective_blender.py.