wardrobegod/tools
type-two cfca6708ab Phase 2: reskin engine — dress the nude TRELLIS bodies without fitting anything
Every anatomy body is an independent TRELLIS reconstruction: no shared topology, no vertex
correspondence, its own UV atlas. That kills garment portability — a fitted mesh can't move
between bodies. Reskin sidesteps the whole problem by repainting the atlas the body already
has, so it works on unstructured meshes and needs no rig.

Chain (/api/reskin), all local except one farm call:
  render_plates.py  -> bind-pose front/back ortho plates, EEVEE, 1024, transparent
  mflux_image_edit  -> "put <garment> from image 2 onto the person in image 1", per plate
  align_plate.py    -> re-fit the edited figure to the original bbox. The edit model redraws
                       at its own scale/offset, and the projection bake assumes the original
                       framing, so skipping this makes the body sample background.
  bake_skin.py      -> Cycles DIFFUSE projection onto the mesh's real UVs, front/back split
                       on normal.Y
Costume swapping in the browser is just a material.map change, so pre-baked outfits toggle
instantly with no re-bake; the bare map is retained so it's reversible.

Fixed a real defect in the inherited baker: planar front/back projection has no idea a head
is round, so side-facing skull polygons sampled whatever front-plate pixel sat at their x/z
and painted a ghost second face down the side of the head (clearly visible on phrtt2). Since
this tier repaints CLOTHES, the bake now keeps the body's own texture above a neck-height
cutoff (default 0.87 of body height, -1 to disable), sampling it through the mesh's real UVs.

Verified end-to-end on phrtt2 (1 mesh / 1 UVMap / 1 material / 4,364 tris — the reskin class):
farm try-on produced a convincing corduroy jacket holding the exact T-pose, and the bake put
it on the model. Known ceiling, unchanged and by design: the silhouette does not move, so this
sells tight and printed garments and reads wrong for a heavy coat.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 16:22:38 +10:00
..
align_plate.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
archetype_batch.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_doll_base.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_doll_garments.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_doll_r2fix.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe90.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe91.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe92.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe93.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe94.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe95.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe96.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe97.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe98.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe99.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
art_wardrobe9199.tsv Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
bake_skin.py Phase 2: reskin engine — dress the nude TRELLIS bodies without fitting anything 2026-07-24 16:22:38 +10:00
build_wardrobe_decade.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
build_wardrobe_manifest.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
dekey.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
doll_composite.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
doll_stage.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
doll.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
flux_local.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
gen_wardrobe.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
render_plates.py Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00