A 3D model pipeline, pushed by GPT-6-Astra

agent (cont.)

+0:33
  • exec_commandsed -n '491,975p' docs/portrait-guide.md

    command

    sed -n '491,975p' docs/portrait-guide.md

    result, 4 lines

    Script completed
    Wall time 0.0 seconds
    Output:
    {"chunk_id":"fa5d1e","wall_time_seconds":0.000004551,"exit_code":0,"original_token_count":8454,"output":"    facets read as one pale tone; and the stiff overskirt opens in a deep lunge.\n- **Layered skirts must share weights** (the user spotted the Saber study's underskirt showing\n  through at the back):\n  - **Simulation:** the underskirt was the only simulated layer, and the viewer pushes cloth a few\n    centimetres clear of the leg colliders, through the static overskirt.\n  - **Static layers didn't fix it on their own:** copying weights from the nearest body point\n    gives a layer near the thighs leg weights and one further out (nearer the buttocks) hip\n    weights, so the layers cross whenever the legs move.\n  - **What works:** the overskirt and front panel copy their weights from the underskirt beneath\n    them (`inherit`). The layer check covers declared cloth pairs (`covered_by`) and now reads\n    clean as built and through the idle; a few points still cross in the attack's lunge.\n  - **Speed:** each ray is now tested against its nearest 48 triangles only (70 s down to 4 s).\n- **Regressions:** the user caught one. The underskirt fix kept the overskirt 1.6 cm outside the\n  underskirt at every height. At the waist, the underskirt's top had been smoothed outward (smoothing\n  a boundary row drags it toward the flaring rows below), and the band was held up to 8.4 cm off the\n  body.\n  - **The fix:** the rule now fades in below the hips, and the hidden top of the underskirt is\n    rebuilt as a smooth ring between the body and the cone. Each column takes its angle from its top\n    point, because columns that crossed over each other while settling made an inward-facing fold.\n  - **The guard:** every build saves each piece's geometry (`review/out/vroid-02/geom/`), and\n    `snapshot.py vNN` keeps it, with the sheets, as the published baseline.\n    - `tools/regress.py` reports which pieces moved since then, how far and at what height. For this\n      fix it listed only the waistband, the top tassets that ride on it, and the underskirt's top;\n      234 other pieces were unchanged.\n    - It also writes the sheet next to the baseline's, with changed areas outlined.\n  - **Rule:** a fix aimed at one part that moves another part is a candidate regression, so read\n    the report before publishing.\n\n### 14 · A hair kit, 2026-10-08\n\nHair was the approach's weakest part: we borrowed VRoid sample hair cards (86 small cards on\nElaine's base), which can't be restyled. `tools/hair.py` builds hair as code.\n- **`HeadChart`:** u is degrees round the head, and v is degrees down from the crown. It is a field\n  of rays cast from the skull's centre onto the head skin (`Fit.head_surface()`: face plus scalp,\n  all weighted to the Head bone), smoothed into a shell.\n  - **Leave the ears out.** Cast onto the ears, every lock passing the sides was pushed out past\n    them, and the hair became a bowl.\n- **`lock`:** a path of (u, v, lift) points (or 3D points) smoothed into a curve and swept with a\n  flat, lens-shaped section.\n  - **Orientation:** the flat side lies along the head (it faces away from the skull's centre or a\n    given point).\n  - **Profile:** the width tapers to a point from part-way along, and the root can start narrow.\n  - **Roots** sit slightly inside the cap (low lift), so locks grow out from under it. Started on\n    top of the cap at full width, their ends made a jagged ridge across the crown.\n- **`cap`:** the base volume, a shell from the crown down to a hairline given as v(u).\n- **Shading:** every hair piece has UVs (round, along) and shares one strand texture (`STRANDS`, fine\n  light and dark lines). The painted renderer's hair shading uses it for highlights along each lock.\n- **Styling lessons from Elaine** (rebuilt to match her sample-hair look):\n  - The silhouette is set by the lower edge. Locks at the sides of the back that ended at ear height\n    made a horizontal rim, the \"bowl cut\" again; sweeping them back toward the nape as they fall\n    slopes the edge.\n  - Bangs read as separate pointed locks when they are narrow (2.2-2.8 cm) with long tapers.\n- **The sheets have a Head row:** six angles, close up, in the reference pose.\n- **Bangs from a study, not a formula.** The user found seven evenly spaced matching points jarring.\n  Unicorn Overlord's character art shows:\n  - a few clumps (three to five) of clearly different widths and lengths;\n  - clumps that fan from a part, usually off-centre, sweeping across the forehead (or a blunt-cut\n    curtain);\n  - clumps widest past their middle, growing out of the hair mass, with uneven tips;\n  - a thin strand or two between them.\n\n  `lock(profile=...)` takes a width profile (`hair.clump`). Elaine's bangs: a side part over her\n  left eye, a wide sweep to her right with a second clump behind it, a narrower fall from the part,\n  one swinging left, and two thin strands.\n- **Hairlines:**\n  - **The nape** sits about level with the bottom of the earlobe (the user marked it). A cap ending\n    at mid-ear left her looking shaved at the back.\n  - **In front of the ear** the hairline comes down over the temple and tucks under the ear's top.\n    The base's temple skin is untextured (hair normally covers it), so any gap shows a white\n    triangle.\n  - **At the crown** the cap must start at the pole itself; a one-degree gap showed as a dot.\n\n### 15 · Common enemies, 2026-10-08\n\nThe brief (user): mob models of common enemies, in the style of Unicorn Overlord's generic units:\nstill detailed, even if generic, in various body sizes and face structures.\n\n- **The class study** (a reference agent, 77 images, study only, kept outside the repo):\n  - Unicorn Overlord varies its generics almost entirely by palette. Each class has one body and\n    one face per gender, and four colour slots: base cloth, hair, armour material and trim. Named\n    side characters reuse the class bodies with their own heads.\n  - The enemy army wears crimson cloth (median #7B3026).\n  - Hands, gauntlets and boots are 1.3-1.5x realistic, and weapons are big.\n  - Each class has one dominant mass (a shield, pauldron, skirt, cape or hat), and outfits show 4-6\n    layers at the waist and shoulder. Headgear is the main way to tell classes apart.\n  - Men's faces are mostly hidden under brims and helms.\n  - Our version keeps the class costume but varies bodies and faces on purpose (the user asked for\n    that).\n- **Gear kit** (`tools/gear.py`):\n  - **Helmets** are outline plates on the head chart (`hair.HeadChart` gained metric/L): a kettle\n    hat with a brim, a nasal helm with a riveted band, a close helm with an eye slit and breaths. A\n    coif or hood sits under them.\n  - **Torso layers:** quilted coats (channels as domed panels between seams), mail and scales as\n    tiling patterns (`outline_plate(pattern=...)`), a coat of plates, breastplates with a plackart\n    and a central ridge, puffed sleeves, knife-pleated skirts (a triangle wave in the flare),\n    flared cuffs.\n  - **Shields:** heater, kite, tower and wooden round shields. `flat_piece` now ear-clips concave\n    outlines.\n  - **Weapons:** spear, halberd, axes, dagger, staff, bow and quiver. Casters get a robe and a\n    witch's hat.\n- **Builds and faces** are presets of the shape controls (`gear.BUILDS`, `gear.FACES`).\n  - **`height`** is a new control: the whole figure scales from the hips and is lifted so the soles\n    stay on the ground.\n  - **Face values** must be large (2-3x what the cast used) for the sculpt to read at game scale.\n  - **Colours:** `cast.mob()` combines a base, class, build, face, hair, eye and skin colour (the\n    painted renderer has a skin-tone multiplier) and facial hair (`hair.beard`: full, short, goatee,\n    moustache, with hanging locks).\n- **Hair under helmets:** the VRoid samples' long fringes poke out under a brim. Generic men use the\n  male base's cropped hair (`hair_from`). The petite base wears her own bob; a hood over a bob either\n  bulged or let it through, so the thief has no hood.\n- **Viewer:**\n  - **Lineup** stands every `mob_` cast entry in a row, turning in place.\n  - **The lineup sheet** has rows of faces with helmets off and on (rows can set their own tile\n    size).\n  - **Sheets** are published as JPEG (about a fifth of the size); the PNGs stay for diffs.\n- **Still to do:**\n  - Heavy builds (huge, stocky) push the arms into the body in the shared idle and attack clips (the\n    checks flag 9 of 10 keyframes); clips need to spread the arms by build.\n  - The berserker still reads tall rather than massive.\n  - The other classes in the study: Knight (mounted), Cleric, Priestess, Shaman, Wizard, Sellsword,\n    Warrior and Gladiator.\n\n### 16 · MakeHuman bases (test), 2026-10-09\n\n**Why the VRoid bases limit us** (the user asked why the enemies all looked alike):\n- The eight samples are one face mesh and two body meshes.\n- VRoid's body sliders are baked in on export, so the files carry expression morphs only.\n- The eyes, brows and mouth are anime drawings in textures, so moving the skull under them changes\n  little.\n- Bone scaling inflates limbs like tubes; it can't add muscle, fat or a hunch.\n\n**The test:** MakeHuman's CC0 base mesh and targets (`docs/makehuman.md`), converted by\n`tools/makehuman.py` into a VRM-shaped file so the whole pipeline runs unchanged.\n- **Macro targets** (gender, age, muscle, weight, height, proportions) blend as MakeHuman blends them:\n  each slider has anchors, and the weight of a combined target is the product of its sliders'\n  weights. Named targets take -1..1 for an incr/decr pair; an `l-` name applies to both sides.\n- **The rig:** joints are the default rig's head positions, taken from the morphed joint helpers.\n  The weights are mapped onto VRoid's J_Bip names, which suits the rig, the clips and the costume kit.\n- **The rest pose:** arms are rotated to horizontal, the forearms straightened, the palms twisted\n  down (thumb forward) and the fingers aligned with the hand; legs are straight. It is then turned to\n  face -z, in metres, with every bone's rest rotation identity.\n- **The parts:** the face mask (head skin in front of a plane 3 cm behind the eyes) is split from the\n  body, as VRoid's is. The eyes are stylised by us: the eyeball as the white, an iris cap with a\n  painted greyscale iris and a highlight disc, a tapered lid line along the lash helper's root,\n  smoothed brow strips, and a lip line.\n\n**Result** (three bodies in the soldier kit, in the lineup beside the VRoid soldier):\n- **Bodies:** a big win. The youth, the stocky veteran and the brute are clearly different people;\n  the brute is broad and massive where the VRoid \"huge\" build was only tall.\n- **Faces:** the bone structure and age now read (jaw, cheekbones, nose, eye bags).\n- **Still rough:** the stylised eyes are small, and the faces read pale and flat without painted\n  detail. The lip line breaks into dashes. Hair is a plain crop.\n- **Also:** the kettle hat sits lower on these heads, over the eyes (as Unicorn Overlord's fighters\n  wear it).\n\n### 17 · VRoid heads on MakeHuman bodies, 2026-10-09\n\n**Why:** the user found the MakeHuman faces realistic, not anime, and the arms odd. No free base has\nboth anime faces and real body variety under a licence we can ship (MB-Lab's anime bases are AGPL;\nCharMorph's and Quaternius's are realistic or simple). So the head comes from VRoid and the body from\nMakeHuman (`spec[\"head\"]`, `makehuman.graft()`).\n\n**The graft:**\n- **Scale and place:** the VRoid head is scaled so crown-to-chin matches the MakeHuman head\n  (`head_scale` on top), pivots on the body's head bone, and is lowered until the chins meet. VRoid's\n  head bone sits lower in its head, so pivot alone left a long neck. The eye bones move to VRoid's.\n- **The neck:** VRoid doesn't stitch head to neck. The body's neck tube runs up inside the head and\n  the face's lower edge tucks against it. We do the same: MakeHuman's neck takes VRoid's neck section\n  above the point where the neck enters the head, and eases from its own shape below. A thick neck and\n  VRoid's slim one meet halfway: the head's outer shell (face skin, hair, never the mouth inside it)\n  widens near the neck to match, fading out upward. Stitching rings with a band failed: VRoid's\n  head/neck seam slopes, so a level cut tore the ring.\n- **What goes:** MakeHuman's own face and jaw, which is anything in front of the neck above its chin.\n  If any of it stays, it pokes through the VRoid face as white shards around the mouth.\n- **One body buffer:** the pipeline reads every body-skin primitive as indices into the first one's\n  vertices, as VRoid's share a buffer. VRoid's skull skin therefore joins the MakeHuman body buffer.\n  As a separate primitive, its indices were read against the wrong vertices and drew long triangles\n  across the collar, and the shirt cut from them crumpled.\n\n**Arms:** the weird arms were the soldier's puffed sleeve, sized for VRoid's thin arm and mostly buried\nin MakeHuman's realistic one. Only its fold ripples poked through, and they read as muscle. `gear.puff`\nnow sizes the puff from the arm's measured thickness as well as its length. On MakeHuman bodies,\nsleeves and trousers span the hollows between muscles (`fitting.limb_hull`: each limb segment's\ncloth goes out to its convex hull, fading near the joints). Both leave VRoid bodies as they were.\n\n**Also fixed:** the face-length preset slid every skin vertex below the eyes, including the neck and\nbody, after the clothes were fitted. It now moves the body only as far as its head weight. On the\ngaunt VRoid veteran, the neck had been dropping 1.9 cm out from under the collar.\n\n**Lessons:**\n- When skin shows through cloth, find out whether it's the geometry or the renderer (`?mode=3d` on a\n  sheet), then whether the garment has holes (its boundary loops), before tuning offsets.\n- Asymmetric damage on a symmetric body means bad data, not bad tuning.\n\n### 18 · The body workshop, after an outside critique, 2026-10-09\n\nThe user still found the MakeHuman arms odd, the neck join wonky in places, and the older faces young.\nA second model (Fable) critiqued the renders against the Unicorn Overlord study. The six MakeHuman\nsoldiers (three men, three women) now have their own page (`LOWMARCH_SITE=mh-workshop` for\n`build.py` and `sheets.py`; its roster and notes are in `build.WORKSHOPS`).\n\n**Arms:**\n- **The puff was the \"muscle\".** Sized for VRoid's thin arm, it was buried in MakeHuman's realistic\n  one, and only its fold ripples poked through the sleeve. The `cap` puff (on MakeHuman bodies):\n  - a shoulder cap, widest at the top and fuller at the back, wider than the arm by at least a third;\n  - five folds converging on a leather band above the elbow, the band traced round the sleeve itself;\n  - the shirt sleeve tucked inside it.\n- **Arms sank into broad sides.** `shape[\"arm_out\"]` holds them out; `build.arm_room()` picks the\n  smallest angle that clears the body in the reference pose and the idle.\n- **Hands were splayed paddles.** `shape[\"curl\"]` relaxes the fingers wherever a pose leaves them alone.\n- **Cloth followed every muscle.** `fitting.limb_hull` pushes sleeves, trousers and boots (toes included)\n  out to each segment's convex hull.\n\n**Neck:**\n- **The ring under the chin** was our own throat cut open, plus MakeHuman's chin left inside VRoid's.\n  Now the throat stays, MakeHuman's chin goes, and the throat is drawn back onto VRoid's neck line.\n- **The head's lower edge** widens only at the back and sides, and takes the neck's normals where it\n  overlaps, so the two shade alike.\n- **The shirt** has a straight, sloped neckline (`wrap(cut=...)` plus a hem on the same plane). The coif\n  covers the nape.\n- **Removing VRoid's face strip under the jaw** (`strip_reach`) was a wrong turn: the hole let the head\n  chart sink inside the jaw, and beards went with it.\n\n**Faces (age, the study's way):**\n- `strip_blush`: VRoid's cheek and eye-corner blush off.\n- `face_lines`: a few strokes drawn into a copy of the face texture. They are laid out in 3D from the\n  face's landmarks, dropped onto the face from the front, and mapped to texture space.\n- `iris`: smaller irises.\n- Expression shapes: VRoid's angry eye (a straight heavy lid), a little of the smile eye (it raises the\n  lower lid), and the mouth turned down.\n- **Hair and beards now follow the face presets' reshaping.** A widened jaw used to cover the beard\n  built on it.\n- **The moustache** is placed from the mouth on MakeHuman units. A long face put the old fixed angle on\n  the chin.\n\n**Also:** a \"Neck and collar\" row on every check sheet; `?mode=3d` on a sheet (geometry or shading?); a\ncollar crumple that turned out to be our bug: the pipeline reads all body skin as one vertex buffer.\n\n**Still open** (critique): trousers like tights; breastplate a bib on wide chests; a stiff idle; no\npuffs on big men (a sleeve per build); beards as a solid shape.\n\n### 19 · Sleeves and a polearm guard after the study's soldiers, 2026-10-09\n\nSide by side with the Unicorn Overlord soldiers (`~/.local/share/lowmarch/study/uo_soldier_arms*.png`,\nstudy only), the user saw that their arms show no muscle at all, and four differences in how ours\nwere built:\n- **Their whole sleeve is loose,** fullest round the elbow. Ours puffed at the shoulder and went tight,\n  and that bump read as a bicep. `gear.loose_sleeves` now lets the shirt's own sleeves out: little at\n  the shoulder, most round the elbow and above the gauntlet, less on the side toward the body, a little\n  more behind, with six soft folds that turn down the arm and deepen toward the cuff. No puff, no band.\n- **Their gauntlets reach almost to the elbow** and flare; the sleeve bags into them. `cuffs(length=0.70)`,\n  and `gear.tuck_sleeves` pulls the sleeve inside the cuff's inner face (binned by angle and distance\n  along the forearm). The shirt is subdivided once so the folds have vertices to sit on.\n- **No band on the upper arm.** Theirs have none.\n- **Both hands on the weapon.** `clips.polearm` (cast entries get `stance=\"polearm\"` for classes in\n  `cast.POLEARMS`): a low guard, left foot forward, the shaft across the body with the head forward and\n  up. The right fist is placed from the right shoulder in arm lengths (fixed offsets from the hips fit\n  one build and put the brute's hand in his hip). The left fist holds the shaft where a set reach from\n  the left shoulder meets it, so every build keeps bent elbows instead of a fixed hand spacing that a\n  short arm can't span. Both arms grip with `duel.clear_grip`, trying elbow directions until they clear\n  the body. The attack draws back and thrusts on a lunge, both hands on throughout.\n- **Lean from the hips.** Bending the spine for the thrust pushed the breastplate's hem through the belt;\n  most of the lean is now a hip tilt.\n- The halberd's rear hand moved to 0.5 m from the butt (it was 0.8: a long tail behind the soldier).\n\nGarment-through-plate flags dropped from up to 30 mm in workshop v1 to 8 mm at most (the brute's\nreference pose aside).\n\n### 20 · Breeches, solid beards, a skirt that hangs, a measured grip and a studied idle, 2026-10-09\n\n**Outfits (the rest of the critique):**\n- **Breeches** (`gear.breeches`): the trousers let out like the sleeves (`_let_out` and `_tuck`, now shared\n  by arms and legs through `_limb_frame`), fullest above the boot top and bagging into it, less on the inner\n  thigh; the boot tops stand off the shin (`flare_boots`). The women wear tights and boots to above the knee\n  (`mobs.soldier_f`), as the study draws them.\n- **Breastplate** `arm=64`: the armhole scoop starts later, so the plate reaches the armpits.\n- **Solid beards**: `outline_plate(thickness=f(u, v, s, t))` fills a beard down to the face; the fall under\n  the chin is one spade-shaped mass (three locks read as a ruff, a wide block as a bib).\n- **The scale skirt** (`skirt_cone(clear=...)`) hangs from the waist over what it covers: the tightest\n  outline that starts at the waist and clears the trousers below (an upper concave hull down each line).\n  Sized from the waist alone, the seat came through the back; stepping straight out to the seat, it\n  stood off like a shelf (a TorsoChart fills the rows above what it measured with the nearest row's\n  radius, so the trousers' hips read as present right up at the waist: those rows are ignored). In the\n  guard it follows the thighs (`share=0.15`), and `slim_under` draws the\n  trousers in where it hides them: a stiff skirt and a striding thigh otherwise always meet somewhere.\n- The layer check's \"up to N mm\" now measures only the points it counts (it included rim hits it had\n  thrown out, so a 4 mm problem read 17).\n\n**The grip.** A weapon's shaft went through a fixed point near the wrist, tuned on one VRoid hand. On the\nsoldiers' scaled hands and MakeHuman's own, it was 3.5 to 8 cm off: the shaft ran over the knuckles and the\nfingers closed under it. `rig.grip_points` measures the hole: each finger's joints and fingertip in the\nfist pose fitted with a circle across the palm; the weapon (`gear._hand_frame`, through `fit.grip`) and the\nclips (`clips.fists`) both use it.\n\n**The idle, after a study.** One clean animated idle from the study (a mercenary), tracked patch by patch\n(`~/.local/share/lowmarch/study/uo_idle*`, study only):\n- a loop of about 2 s; the feet planted, the knees nearly still;\n- the hips sink about 2% of the figure's height and the chest about twice that, forward as they sink, and\n  the upper body rocks back as it rises (the back shoulder dips as the front one rises);\n- uneven timing: a slow rise (about 0.7 s), a short hold, a quicker sink (about 0.4 s), a longer settle;\n- the arms ride on the torso; the weapon's tip dips as the body sinks, so it swings the most.\n`clips.polearm` now samples that loop every 0.1 s (`GUARD_TOP`, `GUARD_LOW`, `IDLE_SINK`, eased between\npoints), the shaft a beat behind, the head kept level, and grips both hands afresh at every sample so they\nstay on the shaft in between. The check sheets have an \"Idle loop\" row (one side, six moments).\nA battle clip with soldiers in formation was too small and dithered to measure.\n\n### 21 · Base spike, 2026-10-09\n\n**Why:** the user saw that the base decides how many kinds of character we can make, and asked what else\nthere is besides VRoid and MakeHuman. The candidates were researched (licence first), then the plausible\nones were put in the same soldier kit on their own page (`LOWMARCH_SITE=base-spike`; the `spk_` cast\nentries). Each was judged on a checklist:\n1. a licence we can ship;\n2. body variety without bone-scaling;\n3. faces that can read as Unicorn Overlord, vary with age and structure, and have no seam;\n4. pipeline fit (rig, kit, clips);\n5. the overall read against MakeHuman with a VRoid head.\n\n**Results:**\n- **MakeHuman + VRoid head** (the baseline):\n  - still the only anime read;\n  - the youth's ring under the chin is still there;\n  - face variety stops at VRoid's two heads plus presets.\n- **MakeHuman's own head pushed toward anime** (`cast._anime`: MakeHuman's face targets for bigger, lower\n  eyes, a small nose and mouth and a narrower chin; `face_round`, rounded face normals; heavier lines):\n  - no seam;\n  - real structure and age (a 15- and a 70-year-old);\n  - still a pale mask with small eyes. MakeHuman's eye targets scale a realistic opening, and an anime eye\n    is a drawn shape bigger than the opening. `face_round` 0.75 flattened the face too far.\n  - MakeHuman has 34 CC0 expression units (`targets/expression/units`) that the converter doesn't use yet.\n- **Quaternius Universal Base Characters** (CC0; `tools/quaternius.py`, `docs/quaternius.md`):\n  - **Bodies:** the free pack has only the two \"superhero\" bodies, each fixed.\n  - **Faces:** a painted Western face with no face shapes, about 7.8 heads tall.\n  - **Fit:** it converts in one step onto our rig (`makehuman.straighten`, `settle` and `write`, now shared).\n  - **Arms:** the man's wide lats put an arm 2.1 cm into the body through the guard idle.\n  - **Plates:** the breastplate copies the sculpted abs and back muscles.\n  - **Animations:** its CC0 animation libraries share the skeleton and could serve any base.\n- **Blender Studio base meshes** (CC0): unrigged sculpting bases with no shape keys. The stylized pair are\n  5.5-6-head caricatures, the wrong direction for a \"stylize\" target.\n- **Anny:** MakeHuman's mesh and targets as a PyTorch library; our converter already reads the same targets.\n\n**Measuring proportions:** crown to chin by the pipeline's own landmark (the face mask's lowest midline\npoint). A front-profile search for the chin was unreliable: it found chests and collars.\n\n**Verdict:** keep MakeHuman for bodies. The next head experiment would warp VRoid's face mask (drawn eyes,\nbrows, mouth and expression shapes) by landmarks onto MakeHuman's skull, keeping MakeHuman's structure and\nage with VRoid's drawing and no neck seam.\n\n### 22 · VRoid Studio driven from WSL, and MakeHuman's mass on a VRoid body, 2026-10-09\n\n**The driver** (`tools/winvroid`, after mcp-vroid's Linux driver, MIT):\n- **How it works:** VRoid Studio runs on Windows, and WSL drives it through `powershell.exe`:\n  - `V.cs` is compiled once and does capture, input and window queries;\n  - `ocr.ps1` uses Windows' own OCR.\n- **Capture:** `PrintWindow` returns a blank client for Unity's DirectX window, so the screen is captured\n  instead, and VRoid must be uncovered.\n- **Pointer:** Unity reads raw mouse input. A cursor moved by `SetCursorPos` never hovers, so scroll wheels\n  did nothing; absolute `SendInput` moves fixed it.\n- **Safety:** input is refused unless the foreground window belongs to VRoid's process.\n- **Quirks found:**\n  - The first click on a sample downloads it; a second opens it.\n  - The export dialog writes VRoid's default licence fields into our copy.\n  - A new character won't export until Title and Creator are filled.\n  - OCR reads \"Title\" as \"Titte\".\n  - VRoid's \"height\" slider is stored as `figureSlender*`, and extrapolates hard: -1.5 made an 81 cm figure.\n- **Export without clothes:** VRoid Studio 2.14 deletes the body skin its own clothes cover (Base_Male, an\n  older export, has its full skin). Our costume is shaped from the skin, so a clothed export lost its\n  chest, shoulders and upper arms. The driver now removes tops, bottoms and shoes first\n  (`winvroid.outfit_none`: each Outfit category's first tile is \"none\").\n- **The `.vroid` project:** a ZIP whose `v1model/data.bin` is protobuf. Each slider is a pair of shape keys\n  with float weights, and keys at 0 are left out. It is readable; writing projects directly is possible\n  but untried.\n\n**What VRoid lacks for heavy and muscular bodies:** mass. Its body keys change length, width and scale only,\nand it has none for regional volume. Its clothing must follow every body key, which is probably why there\nare few.\n\n**Mass carried across** (`tools/mass.py`):\n- **Method:** MakeHuman's muscle and weight are mapped region by region onto a VRoid model's body:\n  - limbs by distance along the bone and angle round it;\n  - the torso by height between the hip and shoulder joints and angle round the vertical;\n  - the neck fading below the head.\n- **Blending:** regions blend by skin weights; hands, feet and head are left alone. The outward part is\n  scaled by VRoid's thickness against MakeHuman's.\n- **The output:** a copy of the VRM with only the body mesh's positions and normals replaced. VRoid's\n  clothes share that mesh's vertices and move with it.\n- **Scale:**\n  - MakeHuman's macros alone are mild: maximum weight adds about 3 cm at the waist.\n  - The regional muscle and fat targets do the work, at gain 2.6. At 1.4, the loose sleeves hid it.\n- **Open:**\n  - The guard puts an arm into wide bodies, as it did with Quaternius.\n  - The figures keep Base_Male's height and face.\n\n### 23 · The armory, and proportions held by code, 2026-10-09\n\n**Why:** iterating on whole costumed, animated soldiers took minutes per try and hid the bodies. The user\nasked for an armory instead: bodies, heads and hair as separate parts, T-posed and bare, to assemble into\narchetypes later. Faces should be original in Unicorn Overlord's style; copies of its characters are only\nstudy-only benchmarks.\n\n**The armory page** (`LOWMARCH_SITE=armory`; the cast's `arm_` entries):\n- **Pose:** built in the T-pose (the portrait's pose is `{}`), so the reference pose shown everywhere is\n  the T-pose.\n- **Skipped:** clips (every one holds the pose) and the arm and garment checks.\n- **Costume:** plain shorts, plus a band for women (`mobs.underwear`), which keep all the skin\n  (`fit.keep_skin = (\"J_Bip\",)`).\n- **Sheet rows:** T-pose round, head, joins (`ARMORY_ROWS`).\n- **Speed:** the whole page rebuilds in about 15 s.\n- **The list:** characters with a `group` show in one dropdown with sections.\n\n**Proportions** (`docs/proportions.md`, `tools/proportions.py`):\n- **Source:** 16 figures and 8 faces from the study, landmarks placed by eye on ruled crops, raw data in\n  the study folder.\n- **Targets:** per archetype (young, adult, heavy, generic). The face unit (chin to eye line) is the base\n  measure, since hair hides the skull's top.\n- **Measured on our model files:** heads tall, eye line, eye opening, face width, crotch height,\n  shoulder, hip and waist widths, arm, hand and foot length, and thighs crossing the midline (tearing).\n  The armory build lists each body's ratios that miss its archetype in the checks panel.\n- **Findings:**\n  - Generic units are about 6 heads with short legs; heroes run 6.5 to 9.5.\n  - Our bodies are too tall in heads and narrow for the heavy and generic builds.\n  - VRoid's bodies are narrow with short arms, though their faces pass.\n  - MakeHuman's own heads set the eyes too high in the head (the \"realistic\" read).\n  - The massed VRoid bodies' thighs cross by about 4 cm: the tearing.\n\n**VRoid sample export:** `python3 tools/winvroid/winvroid.py samples` exports pixiv's 26 samples into\n`vroid/samples_2_14/` (resumable; it stops when VRoid loses the foreground). That keeps them apart from\nthe older D–G, which are other characters and back the hunter and the thief.\n\n### 24 · Bodies fitted by code, and the faults behind the armory's shoulders, 2026-10-10\n\n**Why:** in the first armory nearly every body had wrong shoulders and too much distance from the neck to\nthe chest, some had chest holes, head sizes didn't match, and the VRoid bodies with MakeHuman's mass were\ntorn. Each fault is now held by a measurement and a fix in code.\n\n**Shoulders and neck:**\n- **What was wrong:** MakeHuman's neck is long. The chin sat 0.52 to 0.58 head heights above the shoulder\n  joints, where VRoid's bodies sit at 0.30 to 0.36. The trapezius ran in a long ramp from the jaw to arms\n  set low.\n- **What wasn't:** the collarbones. MakeHuman's already slope 6 to 10 degrees down and out, like VRoid's.\n  Lifting them in the straightening (`clavicle_lift`, kept) flattens the ramp but shrugs the shoulders.\n- **The fix:** the neck is fitted with MakeHuman's own controls (`neck-scale-vert`, then\n  `measure-neck-height`).\n- **New measures** (`proportions.py`): `neck_hd`, `clav_deg`, `drop_hd`, taken from the joints. The skin's\n  top above a thick arm is the arm.\n\n**The fitter** (`tools/fit.py`, see `docs/proportions.md`): each ratio moves the MakeHuman control behind\nit, the head is sized in closed form, and the figure is scaled back to its design height.\n\n**What a short neck broke in the head graft**, all fixed:\n- **The jaw cut:** it took any skin in front of the neck above MakeHuman's chin. Two consequences:\n  - It took the trapezius' top on a short neck. Only skin bound to the head (`jaw_hw`, 0.9) goes now.\n  - It took the throat's top, half head and half neck, and opened a gap under VRoid's chin. The same\n    threshold fixes this.\n- **The neck's radius:** it's now measured from the neck bone's skin only. Mid-neck had moved down into\n  the trapezius' flare, so the radius read too thick.\n- **The throat stitch:** it switched to VRoid's section on a hard 60-degree edge, which left a box on the\n  throat. It now eases in with the angle.\n- **Fixed distances:** the graft's distances (the chin search, the neck ring, the taper) now scale with\n  `body_scale`. A 1.2 times bigger body put the chin outside the search window, and the head came out the\n  wrong size.\n\n**The inspection underwear:**\n- **Notches at the waistband:** they came from skin triangles crossing the hem line, which were dropped,\n  leaving gaps as deep as a triangle (3 cm on MakeHuman's hips). The shorts now take triangles past the\n  hems and clamp everything onto the hem planes (`wrap(..., clamp=True)`). They also push back out what a\n  hem pulls into the skin (`refloor=True`). Both are off by default, so finished costumes don't drift.\n- **Holes:** they came from skin weighted to bones outside the list. The shorts take every bone but the\n  arms'.\n- **Skin coming through:** the skin well inside the shorts is hidden (`fit.drop_skin`). It must leave\n  the arms alone: the costume is fitted with the arms hanging beside the hips, and the first try hid the\n  forearms.\n\n**Mass on VRoid bodies** (`tools/mass.py`):\n- **Rebased:** onto VRoid's own bases, exported unclothed in the PC session (`base_masc.vrm`,\n  `base_fem.vrm`).\n- **Seams:** VRoid 2's exports split vertices along texture seams, so the move is made on welded\n  vertices.\n- **Thighs:** each leg's skin eases toward a 3 mm gap at the midline instead of crossing it (was 4 cm).\n- **Limbs carry thickness only:** the segment's own joint motion is taken out. MakeHuman's muscular macro\n  widens the shoulders, and copying that shift slid the forearm skin past the hands.\n- **The torso** takes its own share of the gain (`torso_gain`). At the limbs' 2.6 the lats ballooned.\n\n**The PC session:**\n- **Exported:** all 26 VRoid samples (A to Z, `vroid/samples_2_14/`, about 95 s each) and both bases,\n"}