John wants to attach better hands/feet/faces to Mixamo-rigged TRELLIS characters and asked whether it can be automated. It can, but not the way the standard tutorial workflow says. Measured on his actual file (chubs-trelli-30k-sol-rigged.fbx): 240,615 verts, 33 bones, and only EIGHT finger bones across both hands — Mixamo's reduced skeleton, which is exactly why the hands look crude. Armature scale 0.01 against mesh scale 100.0, the classic cm/m mismatch. Three things in the usual advice are wrong for these meshes specifically: · "Bridge Edge Loops" needs matching vertex counts on both boundary loops. A TRELLIS cut edge is arbitrary unstructured soup, so bridging to a clean hand needs manual retopo — that step is where the evening goes. · "Ctrl+P > With Automatic Weights" on the joined mesh re-weights the WHOLE character, destroying the skinning Mixamo just produced. · "Ctrl+J the two armatures" collides every mixamorig bone name; Blender suffixes the newcomer .001 and the weights silently point at bones that no longer exist. That is the same failure that left a harvested garment frozen in bind pose earlier today. So graft never cuts. It MASKS the body geometry near the target bone (vertex group + inverted MASK modifier — reversible, and no boundary loop required), aligns the part with a single matrix that scales about its own bbox centre onto the bone, transfers weights from the body with the same data_transfer `fit` uses, and parents to the EXISTING armature. Two bugs found while testing, both mine: · scaling the part's root objects compounded with the donor's own armature/empty transforms and flung the part far enough to blow out the scene bbox (×111 instead of ×11). Now one matrix applied to the meshes themselves, after detaching them from the donor hierarchy world-position-safe. · after bpy.data.objects.remove(), even reading o.name on a dropped object raises ReferenceError: StructRNA has been removed. Names are now resolved before removal. Also: a "part" file is often a whole donor character — character_kit/rigged/hand1.glb holds a prop, a full body AND a widget — so --mesh=<substr> picks the mesh and the op PRINTS what the file contained and what it chose, rather than silently grafting a torso. Runs on ultra per John's steer; this laptop's Blender is crash-prone (it segfaulted on me earlier in this session). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| depot | ||
| tools | ||
| web | ||
| .gitignore | ||
| blender_ops.py | ||
| README.md | ||
| server.py | ||
| STATE_AND_PLAN.md | ||
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'sweb/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
/rigendpoint (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)
- flux (
flux_local, Klein) — product-shot prompt template: garment laid flat, white bg - cutout (
bg_remove_local) — the biggest quality lever before 3D - 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.
- → rigid 3D (
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.