Go to file
type-two c55d7c5b8d graft: add an articulating bind mode; body-bind works, part-bind mesh placement does NOT yet
Tested against John's real assets: chubs-trelli-30k-sol-rigged.fbx (Mixamo, 33 bones, only 8
finger bones across BOTH hands) and whitgrl/base/rigged_hand.glb (69 bones, 65 of them fingers).

That gap is the whole point: transferring weights from the body gives detailed hand GEOMETRY
still driven by 4 wrist bones, so the fingers cannot move. Hence two modes:

  --bind=body (default, WORKING): mask the body's old hand, weight-transfer the new geometry onto
    the existing rig. Verified end to end on chubs — correct scale (auto-corrected a x11 gap),
    correct anchor, 9203 verts masked, renders correctly.
  --bind=part (rig merge WORKING, mesh placement NOT): joins the part's own skeleton and parents
    its root under the target bone. Verified: body rig 33 -> 102 bones, parented under
    mixamorig:RightHand, and it refuses to join if the two rigs share bone names (safe here only
    because the hand uses _rootJoint/thumb_base.R_03, not mixamorig).
    KNOWN BROKEN: the hand MESH does not land on the wrist — it stays near the origin as a stray
    sliver while the bones land correctly. The asset is a Sketchfab export nesting mesh and rig
    several empties deep (RootNode > Sketchfab_model > *.fbx > ...); transforming the top-most
    ancestor did NOT fix it, so my diagnosis of that step is still wrong. Do not trust
    --bind=part until this is resolved.

Two real bugs found and fixed along the way, both from holding Blender references across
mutations — the same class as the earlier ReferenceError:
· bpy.ops.object.join() REALLOCATES arm.data.bones, so a held Bone pointer silently refers to a
  different entry afterwards. A graft aimed at mixamorig:RightHand ended up parented under
  mixamorig:RightHandIndex4. Names are captured up front now.
· a part file is often a whole donor character, so --mesh= selects and the op prints what the
  file held and what it chose rather than silently grafting a torso.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-25 00:15:40 +10:00
depot Schedule the depot archive, and add a prune that cannot 404 a shipping game 2026-07-24 22:51:35 +10:00
tools Registry writer: make the four non-file-drop consumers one-click, and keep 3GOD as a depot 2026-07-24 21:55:04 +10:00
web Export hub, unified wardrobe, warm thumbs, body-type heights 2026-07-24 21:00:46 +10:00
.gitignore Phase 5: the dressing room — thumbnails, a manifest, and the rig/LOD/dress bench on one page 2026-07-24 20:25:44 +10:00
blender_ops.py graft: add an articulating bind mode; body-bind works, part-bind mesh placement does NOT yet 2026-07-25 00:15:40 +10:00
README.md WARDROBEGOD v1 — wardrobe generator bench (bodies, fits, garment gen pipeline) 2026-07-20 20:53:43 +10:00
server.py Registry writer: make the four non-file-drop consumers one-click, and keep 3GOD as a depot 2026-07-24 21:55:04 +10:00
STATE_AND_PLAN.md Record the 3GOD absorption in STATE_AND_PLAN 2026-07-24 22:16:46 +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.