3ba86b2ea8
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>
4.6 KiB
4.6 KiB
Brief: Blender-only garment pipeline for ariki-game — request for review
You are being asked to review a technical plan and give advice: identify risks, suggest better techniques, and flag anything missing. Be concrete and critical. You have no file access — everything you need is in this brief.
Context
- Godot 4.7 game. All characters share one 65-bone skeleton ("Quaternius", UE-style bone names, T-pose rest). Runtime clothing system stacks garment GLBs onto the character's Skeleton3D by bone-name binding — this works and ships.
- Hero character "Lena": a Tripo photo-scan mesh (25.7k tris, baked albedo texture), rigged to the shared skeleton. She is the fit target. Her body mesh + full vertex-group weights are available in Blender.
- Existing tooling (headless Blender 5.1, Python): GLB/FBX import; KDTree nearest-vertex weight-copy from body→garment (proven on prior outfit sets); a skeleton-anchored alignment tool (scales/positions a garment onto the body by hip/head/arm frame); collapse-decimation with per-part tri budget (~1,500 tris/part); glTF export. Deterministic, scriptable, no GUI.
- We deliberately rejected Character Creator 5 for clothing: our characters are AccuRig "Humanoid" avatars, and CC5 provably refuses conform/Transfer-Skin-Weights on Humanoids (verified via its Python API and GUI this week). CC5's conform also only fits its own proxy bodies, so a Blender fit pass to the real mesh is needed regardless.
The garment to process
A Marvelous Designer FBX export ("thin, unwelded"): ONE mesh, 2.49M verts / 4.30M tris, human-scale (zmin 0.59m, zmax 1.65m), 12 materials that partition it into logical parts: cropped jacket (sleeved), shirt-dress bodice, pleated knee-length skirt, bow belt, second cloth layers. No textures (flat MD material colors), single UV map. Modeled in a slightly arms-down pose (not T-pose).
The plan (v1 scope: bodice + skirt + bow; jacket with sleeves deferred)
- Split the mesh by material into parts; group into Body-slot (bodice+bow) and Legs-slot (skirt).
- Per part: merge-by-distance weld (it's unwelded MD output), then collapse-decimate to ≤1,500 tris. Keep the UV map.
- Align the garment set onto Lena's body (uniform scale + translation; both are upright human-scale so a bbox/landmark alignment suffices).
- Fit pass: Shrinkwrap (nearest-surface, ~6-8mm offset) masked by a vertex group — full influence on the snug bodice, fading to zero influence a little below the hip so the skirt keeps its hanging silhouette and only the waistband conforms.
- Weight transfer: KDTree nearest-body-vertex copy from Lena's weighted body mesh to each garment part. Known weak point: the skirt — nearest-vertex copy gives hard left/right leg weights near the hem, causing tearing/stretching in walk cycles. Planned mitigation v1: below-crotch vertices get blended thigh weights or pelvis-dominant weights (accept reduced skirt motion); skirt bones + jiggle are a later upgrade, not v1.
- Export per-part GLBs bound to the shared skeleton; register in the game's outfit catalog; verify in the in-game clothing test bed (idle, walk, dance).
Constraints
- End result must be statically skinned (no runtime cloth sim; Godot, crowd-scale).
- Tri budget ~1,500/part. One material per part preferred; flat colors acceptable for now.
- Everything must run headless/scripted (agent-driven pipeline, repeatable for future garments).
- The body stays under the garment (no body-hide system yet) — clearance must prevent poke-through across the animation set.
Questions for you
- Weld+decimate 4.3M→1.5k is a ~3000× reduction on unwelded MD triangle soup. Better approach than collapse-decimate? (e.g., voxel remesh then decimate; shrinkwrap a low-poly proxy onto the high-poly; MD's own quad-remesh if we re-export?) What preserves pleats/silhouette best at 1.5k tris?
- Best practice for the skirt weights on a humanoid rig without extra bones — is there a standard "skirt weighting" recipe (e.g., project weights from a cylinder, distance-weighted thigh blend, pelvis-locked hem)?
- Any pitfalls with shrinkwrap-fitting a multi-layer outfit (bodice over body, bow over bodice) — how to keep layer separation at low poly counts?
- The garment is in a slightly arms-down pose while the target binds in T-pose; v1 avoids sleeves entirely. For v2 (jacket), what's the cleanest scripted approach to re-pose garment sleeves to T before fitting?
- UVs and baked detail: at 1.5k tris the pleats will flatten. Is baking the high-poly's normals/AO onto the low-poly worth it in this budget, and any workflow notes for MD unwelded sources (UV islands per panel)?
- Anything in this plan you would do differently overall?