Files
animation/plans/glm_hires_nude_sculpt_brief.md
jeremy 3ba86b2ea8 feat: clothing lane, character sources, and DCC bridges
Bulk import of the working lanes that were living untracked on the PC.

Content:
- characters/  Lena/male body lanes, bakes, texture work, run logs
- clothing/    garment pipeline, configs, gates, contract docs
- garments/    MD-authored garment sources (.zprj/.zpac)
- UAL-Lib/     Universal Animation Library 2 source (.blend/.fbx/.glb)
- tools/       blender_bridge, iclone_bridge, md_bridge, tailor, glm_agent
- docs/, plans/, dev/, .agents/plans/

Repo hygiene:
- .gitattributes: LFS now covers .blend, .zprj, .zpac, .obj, .npy and the
  Reallusion .iAvatar/.ccAvatar/.ccRestore containers. Without this the
  ~3.8 GB in this commit would land as raw blobs. .png/.jpg are left out
  on purpose — ~250 are already tracked raw and converting them would
  rewrite every one without shrinking history.
- .gitignore: exclude /accurig/ (~1 GB AccuRig program files, redistributable
  from Reallusion, nothing authored here) and /dev/null/ (git-lfs hook copies
  dropped by a `>/dev/null` redirect on Windows).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 15:55:43 -07:00

162 lines
12 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# TASK: Repair Lena's HIGH-DENSITY sculpt into a nude body (CD cup, round, with cleavage)
You are building a nude variant of the Lena character from her original high-density Tripo
sculpt. The finished model must read as a naked stylized woman with **round CD cup breasts and
clear cleavage**, **no nipples**, a **smooth featureless crotch** (doll-like), and **no trace of
the underwear** in geometry or texture. This has already been done successfully at game density
(32k verts); your job is the same repair at full sculpt density. Every measured fact you need is
below — trust these numbers, they were measured this week on these exact files.
## Source file — READ-ONLY
`characters/originals/female/lena_sculpt_glb_v01.glb`
(974,478 verts, 1,907,931 tris, ~55 MB; byte-identical alias of `female_lena_tripo.glb`).
**NEVER modify, resave, or re-export the original.** It is checksummed in
`characters/REGISTRY.md` and guarded. First action: copy it into your work directory and only
ever open the copy.
## Facts about the source (measured, verified)
- glTF is Y-up; **Blender's importer converts to Z-up**. After import: feet at z=0, height
**0.9792 units**; multiply by **1.8147** to get real metres on Lena's 1.777 m game body.
**Front = Y.** Single mesh object named `tripo_node_9701d6b7-…`, identity transform, one
material, three 4096² textures: `lena+glb_basecolor.jpg`, `lena+glb_normal.jpg`,
`lena+glb_rm.jpg`. One UV map. UNRIGGED (no armature) — keep it that way.
- **The underwear IS the skin.** Ray columns through chest and hips return exactly 2 surface
crossings (front wall + back wall) almost everywhere: there is NO body surface hidden under
the bra or briefs. **Deleting garment faces opens holes.** The repair verbs are FLATTEN,
SMOOTH, BRIDGE, WELD — never delete.
- The bra is a sports-bra shape whose hems are raised lips: the shell sits ~0.006 units
(1.1 cm real) proud at the hems, and at the neckline the edge is an overlapping flap (a ray
there returns 3 crossings). The briefs have the same raised waistband/leg-opening rims.
- **The mesh is NOT watertight: 40,769 open boundary edges**, concentrated exactly at the
garment hems — z≈0.637 (bra band, 6,220 edges), 0.685 (armholes, 4,726), 0.734 (neckline,
3,002), 0.588 (briefs waistband, 2,842), 0.490 (leg openings, 2,592). Expect UV-seam splits
everywhere too: `merge by distance` (~1e-5) before any topology reasoning, or seam splits
masquerade as boundaries.
- Body landmarks (source units | real m): acromion 0.784 | 1.423 · neckline notch 0.723 |
1.312 · **bust apex 0.688 | 1.248** · underbust 0.641 | 1.163 · waist (narrowest) 0.606 |
1.100 · briefs waistband 0.578 | 1.049 · hip/trochanter ≈0.49 | ≈0.89.
- Existing breast anatomy under the bra: apexes at x = ±0.0300.035 (±6 cm real), projection
including the bra shell 0.023 units (4.1 cm), bare flesh ≈0.017 (3.0 cm); base ≈0.070 units
(12.7 cm) diameter; the intermammary valley is BRIDGED by the bra (centre sits only 0.002
units behind the apex plane). Torso depth at apex level: 0.1565 units.
- The basecolor paints the bra/briefs matte beige, lighter and much less saturated than skin,
with painted seam/shadow lines at the hems and a stray orange seam artifact on the left strap.
## Target shape — exact acceptance numbers (all in source units, Z-up, after import)
SHAPE REFERENCE: Jeremy supplied a reference image (archived at
`characters/female/lena_nude/reference_breasts.jpg` — you cannot view it; these numbers ARE its
translation): near-hemispherical ROUND breasts whose apex projection is close to the base
radius (not a shallow dome), full upper AND lower pole, a defined inframammary fold, apexes
pointing slightly outward, and a NARROW cleavage where the mounds nearly touch medially.
1. **Breasts: round CD cup.** Apex projection off the repaired chest wall between **0.036 and
0.044 units** (6.58.0 cm real), targeting projection ≈ 0.91.0× the base RADIUS. Apex
height z = 0.688 ± 0.010; apexes at x = ±0.0330.038. Base diameter 0.0750.090 units.
ROUND profile: the y(z) profile through the apex approximately symmetric within 20% above
vs below the apex; if you shape a falloff curve, use a fattened mid-slope (e.g. gamma 0.75
on normalized height), never a thin cone.
2. **Cleavage.** NARROW: medial dead zone half-width ~0.007 units with a ~0.013 falloff — the
mounds nearly touch. At apex height the sternum line (x=0) must still sit at least
**0.015 units** behind the apex plane, a smooth U-valley, two clearly separate forms.
3. **No nipples**: the apex region must be smooth (no bump smaller than 0.01 units radius
protruding off the breast surface).
4. **Crotch**: match the MALE game body's crotch construction (Jeremy's directive — the male is
already the smooth doll-like build, and the female must match it). Donor:
`C:\Users\Jeremy\tinqs\ariki-game\assets\quaternius\derived-bodies\Ariki_Male_QuatBody_D_RigCandidate.glb`
(READ-ONLY). Method: extract the male's crotch patch (pubic triangle + perineum, the region
between the leg roots), align it to the female pelvis by landmarks — crotch saddle point
(lowest point of the torso between the legs) and hip half-width scale — then project the
female crotch-window verts onto the aligned donor surface (subdivide the donor patch 2
levels first so the target is smooth), blending at the window rim. Note the scale: the male
GLB is in METRES (~1.75 m tall) while this sculpt is 0.9792 units tall — scale donor by the
ratio of heights, then refine by hip width. No rim lips, no anatomical detail anywhere in
the window.
5. **No garment trace in geometry**: boundary-edge count in each hem z-band (0.4850.495,
0.5830.593, 0.6320.642, 0.6800.690, 0.7290.739) reduced to the background level of
plain-skin bands (measure a control band at mid-thigh z≈0.30 and match its order of
magnitude). No y(z) step greater than **0.002 units between adjacent 0.005-unit samples**
along the sternum column or the apex column, except across the breast contour itself.
6. **No garment trace in texture**: garment-keyed texels repainted to locally-matched skin.
Calibrate the colour key yourself: sample faces at briefs centre (z 0.500.56, |x|<0.05,
front) vs mid-thigh skin (z 0.280.34) on the basecolor, then pick thresholds that separate
them; after repaint, a face-level census over the old garment regions must classify ≥99% as
skin. Fill tone must come from NEARBY-ON-BODY skin (nearest skin vertices in 3D), never from
a global average — atlas-local fills produce wrong tones and visible island seams.
## Method notes (hard-won this week at game density — same traps apply)
- **NEVER use `python -c` or inline one-liner scripts with nested quotes** — your previous run
burned 600+ steps wedged on shell-quoting errors in exactly that pattern. ALWAYS write
scripts to FILES first: `printf '%s\n' "line1" "line2" > script.py` or a heredoc, then run
the file. One command writes the file, the next runs it.
- Work in Blender headless: `"/c/Program Files/Blender Foundation/Blender 5.1/blender.exe"
--background --python <script.py> -- <args>`. numpy IS available inside Blender's python.
System `python` has PIL but NO numpy. Each of your shell commands has a 15-minute timeout —
split heavy work into staged scripts and save intermediate `.blend`/`.glb` checkpoints in the
work dir so a timeout never loses progress. 974k verts is heavy: prefer numpy `foreach_get`/
`foreach_set` over per-vertex python loops wherever possible.
- **Donor mesh, if present (check before sculpting):** if `exchange/INBOX/cc_female_donor.fbx`
exists, it is a Character Creator base female exported with the DESIRED CD breast shape.
Prefer it over the pure procedural field: import it, auto-detect its breast apexes (front-most
points in its chest band) and chest wall, similarity-align it to this sculpt's landmarks
(apex z=0.688, apexes x=±0.033, chest-wall depth), then project the chest-region vertices
onto the donor's breast surface (BVH ray-cast along vertex normals, outward then inward,
reject hits whose normal opposes the ray), blending to the repaired chest wall at the root.
The acceptance gates below apply unchanged. If the file does not exist, use the procedural
field described next.
- Suggested pipeline (adapt as needed): copy source → merge-by-distance → weld/close hem rims
(weld small gaps rather than filling holes with new faces; new faces need invented UVs) →
flatten hem lips into the surrounding skin (narrow smoothing band along each hem; the garment
interior IS the anatomy — do NOT smooth the whole briefs region or you erase her hips/butt)
→ chest: smooth the bra shell down to a chest wall, then sculpt the two mounds (procedural
displacement field along vertex normals is proven: elliptical root, radial falloff with zero
slope at the root; for ROUND use a profile like (1u²)^1.4 with mild vertical asymmetry) →
repaint basecolor garment regions (3D-nearest-skin fill + reinject high-frequency grain
sampled from real skin so the patch isn't a smooth decal) → also neutralise the garment in
`lena+glb_normal.jpg` and `lena+glb_rm.jpg` over the same masks (flat normal 128,128,255;
rm matched to skin) → export.
- The UV atlas may mirror or pack islands unintuitively — never assume atlas-adjacent means
body-adjacent. When sampling textures from raw glTF UV data remember glTF v runs top-down
while Blender image rows run bottom-up (flip v); UVs already imported through bpy are
pre-flipped.
- Verify NUMERICALLY after every stage (you cannot look at renders): ray-crossing census,
boundary-edge counts per z-band, y(z)/y(x) cross-section profiles, texture colour census.
Print the numbers; compare against the gates above.
- ALSO render review images for the human (front/back/side/¾, textured AND untextured clay,
plus chest and hip closeups) into `characters/female/lena_nude/hires_work/review/`. Clay
renders are how humans catch what numbers miss.
## Output & NAMING LAW (follow exactly — this is a hard requirement)
Naming follows `characters/REGISTRY.md` (read it). For this artifact:
- Final model: `characters/female/lena_nude/lena_nude_sculpt_glb_v01.glb`
— grammar `<character>_<stage>_<format>_v<NN>`: character `lena_nude` (registered), stage
`sculpt` (unrigged full-res), format `glb`, first version `v01`. All lowercase snake_case,
`[a-z0-9_]` only. No dates, no status words, no hyphens in the name.
- **PACK all three textures inside the GLB** (self-contained) — loose texture names would
collide with the game-density `lena_nude_basecolor.png` already in that folder.
- **NEVER create any file named `Ariki_*`** — PascalCase ship names belong to the game repo
only; the rename happens once, at release (registry rule 8).
- Never touch `characters/originals/**` except to COPY from it. Never modify
`lena_nude_quatskin_glb_v01.glb` or `lena_nude_basecolor.png` (the shipped game-density
variant lives beside your output).
- When the model passes the gates, append ONE row to the "Derived artifacts" table in
`characters/REGISTRY.md`: name, character `lena_nude`, parent `lena_sculpt_glb_v01.glb`,
stage `sculpt`, tool (your script path), date, status `wip`, ship name blank ("—"), notes
with the sha256 (`sha256sum`) plus final vert/tri counts and the apex-projection number you
achieved. Do not git-commit anything.
- Work dir for everything intermediate: `characters/female/lena_nude/hires_work/` (create it).
Keep your stage scripts there too — they are the record of how the model was made.
## Definition of done
Emit `DONE:` only when: (a) the output GLB exists at the exact path above with textures packed,
(b) every numeric gate in "Target shape" prints PASS from your verification script, (c) review
renders exist, (d) the registry row is appended. If blocked, emit `DONE:` with the precise
blocker and the numbers you got vs the gates.