Go to file
type-two 8119e2de4c Phase 4: donor harvest — real cloth that bends, plus three assemble bugs it exposed
harvest op: split a garment off an already-rigged clothed character by material. Blender's
mesh.separate(type='MATERIAL') carries the vertex groups onto the separated piece, so the
garment lands ALREADY skinned to the donor's skeleton — no fit, no weight transfer, and it
deforms correctly at the elbow because it was authored to. Unused groups are purged after.

Triaged all 43 clothed donors on ultra (headless Blender, run where the files are rather than
moving 3 GB). Measured what the LoRA bench could only guess at: only 11/43 (25%) are separable.
The rest bake skin and cloth onto one fused atlas and cannot be split at all. The best targets
are the Ready Player Me avatars (Wolf3D_Outfit_Top/Bottom/Footwear — a clean 3-way split) and
the Mixamo characters (Topmat/Bottommat/Shoesmat); most of the man_*/woman_* set is fused.
Triage also over-reported at first: the skin regex missed 'mouth', so mouth materials showed up
as garments. Widened.

Proving it end to end exposed three real bugs in `assemble`, none of which erred — they all
failed silently, which is why they had survived:
· Bone names are NOT uniform across the fleet, contrary to the "one skeleton" contract in the
  README. character_kit and NPCFACTORY use 'mixamorig:Hips'; Ready Player Me donors use bare
  'Hips'; Blender suffixes '.001' on any import collision. Vertex groups therefore pointed at
  bones that did not exist and the garment sat frozen in bind pose while the body animated.
  Now matched on the bare name, so a garment harvested off one rig drives another.
· Donors are not authored at a common scale. character_kit rigs are ~0.06 m tall, a Ready
  Player Me donor ~1.5 m, so the harvested top arrived 27.41x oversized and swallowed the
  scene. Rescaled by a shared hips->head bone span, the same trick character_kit's
  assemble.fit_part uses.
· Material-less bone-widget meshes (a 42-vert 'Icosphere' in character_kit rigs) rode along and
  wrecked the scene bbox, which drives both the HUD height and the viewer's auto-framing — one
  stray widget framed the camera on the widget and rendered the character as a speck.
  NPCFACTORY's render_plates.py had already worked around the same thing.

Verified: a garment harvested from a Ready Player Me donor, assembled onto character_kit's
hum_character, deforming correctly mid-stride through a Running clip. Honest caveat unchanged —
the garment inherits its donor's proportions, so it reads loose on a slimmer body and there is
no cloth sim to save it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 19:07:32 +10:00
tools Phase 2: reskin engine — dress the nude TRELLIS bodies without fitting anything 2026-07-24 16:22:38 +10:00
web Salvage the SD lane: patch MODELBEAST, add the SD backend, fix the assets filter at source 2026-07-24 18:14:21 +10:00
.gitignore Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
blender_ops.py Phase 4: donor harvest — real cloth that bends, plus three assemble bugs it exposed 2026-07-24 19:07:32 +10:00
README.md WARDROBEGOD v1 — wardrobe generator bench (bodies, fits, garment gen pipeline) 2026-07-20 20:53:43 +10:00
server.py Salvage the SD lane: patch MODELBEAST, add the SD backend, fix the assets filter at source 2026-07-24 18:14:21 +10:00
STATE_AND_PLAN.md Record build status for phases 0-3 + recon corrections found while building 2026-07-24 16:23:39 +10:00

WARDROBEGOD — one skeleton, infinite fits

The wardrobe generator bench: load bodies (FBX/GLB/OBJ), build a clothes library, generate new garments on the farm, fit them, assemble dressed NPCs. Sibling of NPCFACTORY (the dress-up/clip bench) and MeshGod imagelab — this one owns clothing.

python3 server.py                 → http://localhost:8150
WG_HOST=0.0.0.0 python3 server.py → expose on the tailnet
MB_TOKEN=mbt_… python3 server.py  → enables the generator tab (MODELBEAST bearer token)

No build step: stdlib server + three.js from CDN. Heavy lifting = local headless Blender (blender_ops.py, tested on 5.1.2; override path with WG_BLENDER).

What it does

  • Library panes: bodies (scans library/bodies/ + ~/Documents/anatomy + thriftgod's web/assets/models), garments, generated images, finished outfits. Upload via file inputs.
  • Stage: orbit viewer; FBX auto-converts to GLB (cached in .glbcache/); HUD reads tris / height / rig state (bones + clips); first clip auto-plays.
  • Body ops: scale-to-height (bases arrive 1.0m tall — normalize to ~1.72m); decimate-keep-weights (the SAFE local path for rigged meshes — never farm /finish).
  • Rigid attach (tier 1): hats/bags/shoes → pick a bone, slide offsets, preview live. Bake permanently via the fleet /rig endpoint (m1ultra :8011) when happy.
  • Deforming FIT (tier 2): weight-transfers the rigged body's skinning onto a garment mesh (Blender data_transfer, nearest-face interpolated, optional inflate-mm of air), parents it to the armature. FIT → wardrobe item = garment+skeleton GLB (reusable); fit → dressed glb = body+garment in one.
  • Assemble: body + ticked fitted garments → one dressed GLB in out/ — drop straight into thriftgod / djsim / procity, or publish to 3GOD.

Generating NEW clothing (the pipeline, $0 on MODELBEAST)

  1. flux (flux_local, Klein) — product-shot prompt template: garment laid flat, white bg
  2. cutout (bg_remove_local) — the biggest quality lever before 3D
  3. then ONE of:
    • → rigid 3D (trellis_mac, ~5 min): hats, shoes, bags, glasses — bone-parent these. NOT for floppy cloth: reconstruction eats thin geometry (fleet traps ledger).
    • → hanging texture: flat garment PNG for rack planes (djsim fittings.js garment({image})) and the paper-doll wardrobe. Flat clothes love this route.
    • deforming wearables: model/retopo against the base body (or socket-cut a clothed torso, character_kit_modular style), then FIT. Never raw-gen these.

House rules

  • Bases (anatomical models) stay in the library. Only dressed outfits ship into games.
  • FIT requires a rigged body. Unrigged base → rig first (MIRPAMO on ultra, or Mixamo).
  • One skeleton (mixamorig) across the fleet: any garment fitted on one body fits every body on that skeleton, and every clip in the bank drives it.