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

agent (cont.)

+0:23
  • exec_commandsed -n '1,260p' ~/context/lowmarch.md (+1 more)

    command

    sed -n '1,260p' ~/context/lowmarch.md
    
    cat docs/vroid.md

    result, 4 lines

    Script completed
    Wall time 0.1 seconds
    Output:
    {"chunk_id":"dd627b","wall_time_seconds":0.0000053,"exit_code":0,"original_token_count":4270,"output":"# lowmarch (handoff, 2026-10-30)\n\nTab: personal/lowmarch. Repo: ~/Projects/lowmarch (local git, no remote; 32 commits, 2026-10-08 to 10-13; tree clean).\nThe deepest context is the old severian-dev session 16fadb50 (10-07 to 10-13). Read `docs/portrait-guide.md` first\n(31 numbered lessons, each with what the owner asked and what changed).\n**Since 11-08, start at `docs/handbook.md` instead:** it marks each rule earned or guessed, and has the first-session kit (`tools/session/`, `review/frame/`). `docs/map.md` and\n`docs/todos-2026-11-08.md` hold the housekeeping.\n\n## What it is\n\nThe character art pipeline for Lowmarch, a tactics game. The battle scenes aim at Unicorn Overlord's style, and\nFE8 (GBA) portraits are kept as a second renderer. Characters are built by code, not modelled by hand:\n- VRoid models as bases: the CC0 bodies, plus the 26 AvatarSample faces and their hair (`docs/vroid.md`);\n- bodies reshaped by MakeHuman references;\n- costumes, plate armour and hair kits generated and fitted in code;\n- everything drawn by our own numpy rasterizer (`tools/vrm.py`). Deps: numpy and PIL only.\n\n**Blender is not in the pipeline.** One spike used a portable Blender 4.5 to export Blender Studio base meshes\n(`docs/quaternius.md`). Blender 5.2.3 at ~/.local/opt is unused by lowmarch so far.\n\n**The pixel renderer is abandoned (owner, 2026-10-30).** The armory's painted renderer (`review/vroid-02/index.html`)\nis the target. `tools/vroid_portrait.py` stays because the build uses its Portrait class, but nothing new is ported\nto its pixel path.\n\n**Every camera is orthographic:**\n- the pixel and painted renderers project with a scale and no depth divide (`tools/vroid_portrait.py:730-734`);\n- every review page uses three.js `OrthographicCamera` (`review/out/*/site/index.html`).\n\nData lives outside the repo, in `~/.local/share/lowmarch/`: vroid, makehuman, quaternius, anthro, refs and\nblender-base-meshes. The FE8 refs are study only: never trace or ship them (`docs/study.md`).\n\n## How far it got\n\n- **10-07:** the FE8 portrait study, which set the house style. The 96x80 portrait goes through `tools/pix.py` and\n  `vroid_portrait.py`.\n- **10-08:** the following were built:\n  - Aldric (frozen at viewer v9, now retired as a study) and Elaine;\n  - a Saber benchmark (study only, never for the game);\n  - the costume, outline-plate and hair kits, and common enemies;\n  - a two-character sword bind, and a painted renderer next to the pixel one;\n  - browser review pages that show the 3D model and both renders.\n- **10-09:** a base spike tried MakeHuman, Quaternius and Blender Studio meshes. VRoid bodies shaped by MakeHuman\n  won. VRoid Studio on the Windows side is driven from WSL (`tools/winvroid`).\n- **Armory v1 to v12.1 (10-09 to 10-13):** 14 T-posed bodies (`arm_m_*`, `arm_f_*`):\n  - proportions are held by code (`docs/proportions.md`), and bodies are read against NHANES and ANSUR\n    (`docs/anthro.md`);\n  - the heroic man and sexy woman lines, real hands and breast spring bones;\n  - v9 and v10: heads from VRoid sample faces, blended by look;\n  - v11: VRoid hair with spring physics;\n  - v12: collision spheres fitted to each body's skin;\n  - v12.1: a fix to the face-blend order.\n- **The owner's last verdicts:** bodies \"look perfect\" (10-12). Faces were \"too sharp\" at some angles. That fault was\n  our ratio fitter, so v10 keeps faces as VRoid built them (lesson 30).\n\n## How to run\n\nThese commands come from the tools' docstrings; none was re-run this session.\n- `python3 tools/vroid_portrait.py MODEL.vrm --yaw 35 --png out.png --scale 6` renders one portrait.\n- `LOWMARCH_SITE=armory python3 review/vroid-02/build.py` builds the armory page. Output goes to\n  `review/out/armory/site/`. The models are base64 GLBs, `{\"glb\": ...}` in `<name>.glb.json`.\n- Without `LOWMARCH_SITE`, the same command builds the cast viewer (vroid-02): Aldric, Elaine, Saber, the mobs and\n  the duel. Other sites: `mh-workshop`, `base-spike`.\n- `python3 tools/cage.py [NAME...]` builds armory bodies, and `python3 tools/heads.py BASE SAMPLE` builds one head.\n- `python3 tools/regress.py NAME [TAG]` diffs a build's geometry against the last published version.\n- `python3 tools/winvroid/winvroid.py bases|samples` drives VRoid Studio on Windows. It takes over the PC, so it needs\n  the owner's go.\n\n## Open threads\n\n- **VRoid driver blocked:** `tools/winvroid`'s rebuilt V.dll is refused by Windows application control. The owner\n  must allow it before the driver works (`docs/vroid.md`, face session).\n- **Faces:**\n  - all 26 samples are young. A mature or sultry face needs VRoid's editor (the \"option 2\" session, done with the\n    owner away from the PC).\n  - The first try, `faces/face_sexy.vrm`, read cute and was set aside. Next time, start from preset 3 or 5.\n- **Not started:**\n  - the neck, which waits on the head work;\n  - a second armour pass (Aldric is retired);\n  - Unicorn Overlord-style battle animation, map sprites and fabric textures.\n- **Sortie** (severian-dev/sortie, tab of 10-28) borrows lowmarch VRoid bodies for its pilots. See memory\n  project_sortie_mech_game.\n\n## Research: the \"flat lattice\" Blender extension (2026-10-30)\n\n**Short answer:**\n- **It exists, twice:** \"Flattice\" (flat + lattice) is the name of two unrelated add-ons. Both build a lattice aimed\n  at the camera, and a shape key on it squashes the mesh along the view axis. That is a per-object longer lens: the\n  near parts of the face (nose, cheeks) stop looming. The rumor is almost certainly DillonGoo's, which is made for\n  faces and went on sale this week.\n- **Not worth trying for lowmarch:** our cameras are orthographic, so there is no lens distortion to remove.\n- **Where it could help:** sortie's perspective close-ups. There the trick is a few lines of shader or numpy, not a\n  Blender add-on.\n\n### The two Flattices\n\n| | Flattice: Stylized Flattener | Flattice |\n|---|---|---|\n| Author | Dillon Goo (DillonGoo Studios, who make Goo Engine) [1][2] | Merlin Perry [5] |\n| Where | Superhive [1], Gumroad [3], linked from the studio's add-ons page [4] | Blender Extensions platform [5], GitHub (README and licence only, no source) [6] |\n| Price | $2 [1][3] | free [5] |\n| Version | not stated [1] | 1.0.8, 2026-08-14 (first release 1.0.6, 2026-07-30) [7] |\n| Blender | 3.6 to 5.1 in the text, 3.6 to 5.2 in the table; Goo Engine 3.6 to 4.4 [1] | 4.2 and newer [5] |\n| Licence | GPL [1] | GPL-3.0-or-later [5] |\n| Packaging | legacy add-on zip (`goo_flattice_generator.zip`), Install from Disk, N panel \"Goo Rigging Tools\" [2] | extension, 19.6 KB, one 790-line `__init__.py`; read, not run (zip sha256 eafab40c...ed1458) |\n| Traction | Superhive: 100+ sales, published \"3 days ago\" (so about 10-27) [1]; Gumroad: 2 ratings, 5.0 [3] | 595 downloads, no reviews [5] |\n\n**DillonGoo's (the face one):**\n- **Inputs:** a parent bone, any number of meshes, and the 3D cursor set at the chin [2].\n- **What it builds:**\n  - a vertex group weighted from the cursor down (with a Falloff setting), so the face flattens and the body below\n    doesn't;\n  - an empty that follows the active camera 1:1, and a lattice parent that tracks that empty;\n  - a low-resolution lattice with a shape key that flattens it to a plane [2].\n- **The switch:** a \"Flattice\" property on a bone, 0 to 1. It can be animated and library-overridden [1][2].\n- **The author's reason:** it \"disconnects the focal length of the face from the focal length of the camera\" [1][3].\n- **FAQ:** the flattening \"mimics a higher focal length\". The tool was built years ago, and \"Geometry Nodes can\n  totally do it now\" [8].\n\n**Merlin Perry's (object level):**\n- **Create Flattice** fits a 2x2xN lattice to the selected objects' bounds and adds a Damped Track to the camera.\n- A `Flatten` shape key sets every point's local z to 0. A driver ties it to a `flatten` property on the camera,\n  from -10 to 10: 1 is flat, 0 is the model as built, negatives exaggerate depth [5][6].\n- **No falloff:** whole objects flatten. On a VRoid model only the Face mesh would flatten, so it would come apart\n  from the body at the neck.\n- **Possibly headless:** besides `bpy.ops.flattice.create`, the build path uses only the data API and context\n  (selected objects, `scene.camera`). Calling it from `blender -b` should work. Not tested.\n\n### What it is and isn't, against the known approaches\n\n- **Is:** the focal-length cheat. It only does anything under a perspective camera, which it moves toward an\n  orthographic read.\n- **Isn't:**\n  - per-view shape correction (the anime nose and mouth cheat);\n  - squash and stretch of eyes or mouth;\n  - normal editing. Recomputed normals follow the squashed geometry, so shading flattens a little, but only as a\n    side effect.\n- **Lattice Magic, Camera Lattice** (Blender Studio, free extension 1.0.1, Blender 4.2+, GPL):\n  - a lattice in a camera's view that you sculpt shot by shot, with one shape key per frame;\n  - \"like Liquify but on vertices\" [9][10].\n  - For fixing individual shots, not a standing rig.\n- **View-angle shape keys, CamKeys** (beyonddev on Booth, ¥2,999, v3.4.5):\n  - drives shape keys from the camera's angle and distance; you sculpt the corrections yourself;\n  - also has a \"Forced Perspective\" per-object focal length, which is the same idea as Flattice [11].\n  - Of the add-ons found, this is the one aimed at the nose and mouth cheat.\n- **Face normals:**\n  - Easy Custom Normals (Fondant, Superhive, $10, or $20 with the Anime Face Proxy; GPL; Blender 4.3 and 4.4)\n    derives face normals from a rigged curve proxy through Geometry Nodes [12]. Older coverage called the proxy\n    \"next up\" [13]; the store page now sells it.\n  - Blender's own Data Transfer modifier copies custom normals from a proxy mesh [14].\n- **SDF face shadow maps:**\n  - a baked texture that the shader thresholds against the light's direction, giving a clean, controlled face\n    shadow [15].\n  - This is shader-side, mostly Unity and Unreal; a standalone baker exists on Booth [16]. It isn't a Blender\n    deformation.\n- **Grease Pencil Line Art:** lines from geometry [17]. Not relevant here: lowmarch draws its own outlines.\n\n### Fit for lowmarch\n\n- **Under orthographic cameras, flattening along the view axis changes no silhouette.** Lowmarch already renders the\n  look Flattice is chasing. The owner's \"too sharp at some angles\" came from our fitter, not from perspective\n  (lesson 30).\n- **It would matter if:**\n  - Lowmarch's Unicorn Overlord-style battle scenes move to a perspective camera, or\n  - sortie's pilots appear in its perspective three.js cameras (`src/game/game.ts:168`, `src/view/cameras.ts:36`).\n- **In those cases the add-on itself doesn't carry over.** The effect is a scale of camera-space depth about the\n  head's center, weighted from the chin up. That is a few lines in a vertex shader, or in numpy before projection.\n- **If faces still read wrong at some angles, two ideas fit lowmarch better:**\n  - view-angle correctives, keyed by yaw in code, since every render knows its yaw;\n  - face normals taken from a fitted ellipsoid before shading.\n\n### Trial, run 2026-10-30 (DillonGoo's add-on, bought by the owner)\n\n**Purchases:** the owner bought Flattice and DillonGoo's \"Yin and Yang twin anime rigs\". The files are in Windows\nDownloads (`[redacted: Windows home]\\Downloads`):\n- `Flattice-Goo-fixed.zip`;\n- `_Yin_*` and `_Yang_*` zips in three builds each: EV (EEVEE) 4.3+, GE (Goo Engine) 4.3+, and GE Legacy 4.0+.\n\n**Where things are:** scripts and results are in `~/.local/share/lowmarch/trials/flattice-2026-10-30/`. Nothing was\ninstalled. The add-on was imported from a scratch copy and registered for each run only.\n\n**The add-on's code** (legacy add-on, `bl_info` credits Cody Winchester and Crabnuts, about 300 lines):\n- **What it builds:**\n  - a 4x2x4 lattice, a fixed 1 m cube centred on the parent bone's head;\n  - a Flatten shape key that collapses the lattice's local Y;\n  - an empty that tracks the camera with a Damped Track. A Camera_Reference empty follows `scene.camera` through\n    context-property drivers.\n- **The falloff:** a `MOD-Flattice` vertex group, weight 1 above the 3D cursor's Z, fading to 0 over `falloff`\n  metres below it.\n- **The switch:** a \"Flattice\" property, 0 to 1, on the parent or properties bone. It drives the Flatten key.\n- **Bugs found by reading:**\n  - with no rig set it crashes: it checks `target_rig == \"\"` on a pointer;\n  - \"no meshes selected\" reports an error but doesn't stop;\n  - re-running resets the bone property, because `hasattr` can't see custom properties;\n  - the panel's chin-height setting is unused; the cursor's Z is what counts.\n\n**Headless works.** Set `scene.Flattice_Props` (target rig, parent bone, falloff), select the meshes, put the cursor\nat the chin, then call `bpy.ops.setup.addflattice()`. On a VRoid armory body (`arm_f_sexy`):\n- the parent bone was `J_Bip_C_Head`;\n- the cursor sat at the face mesh's lowest point plus 1 cm;\n- the body mesh had to go in too, because VRoid's skull is in it. The falloff kept the neck and body out, as the\n  renders show.\n\n**How the views were made:**\n- Cycles on the CPU, with one grey cel material: Workbench and EEVEE abort headless here, as there is no libEGL.\n- 512 px, framing 0.42 m of the head plane.\n- Lenses: 24, 35 and 85 mm, against an orthographic view, at yaw 0, 35 and 60.\n- \"Shape\" is the silhouette overlap with the orthographic view after matching size and position.\n\n**Results (Yin rig, its own Flattice; clean masks of only the flattened meshes):**\n\n| Lens | Shape at flatten 0, yaw 0 / 35 / 60 | Shape at flatten 1, yaw 0 / 35 / 60 |\n|---|---|---|\n| 24 mm | 0.91 / 0.90 / 0.89 | 0.93 / 0.90 / 0.91 |\n| 35 mm | 0.94 / 0.93 / 0.92 | 0.96 / 0.93 / 0.94 |\n| 85 mm | 0.97 / 0.96 / 0.95 | 0.98 / 0.97 / 0.98 |\n| orthographic | 1.00 | 0.99 to 1.00 (no change) |\n\n**What the numbers mean:**\n- Flattening moves perspective silhouettes a little toward the orthographic one. Its visible effect is inside the face:\n  at 24 and 35 mm the nose and mouth stop bulging (see the sheets).\n- **The pivot is the neck, not the camera axis.** The flatten plane faces the line from the parent bone's head to the\n  camera. At very close range that line tilts: 21 degrees with the camera 0.32 m from the face. The flattened head then\n  shrinks vertically, so raw overlap at 24 mm got worse (0.89 to 0.85) and only the size-matched score improved.\n- **Under orthographic cameras it changes nothing:** overlap is 0.99 or better. That confirms there is no gain for\n  lowmarch's current renderers.\n- **The VRoid numbers are not usable.** The armory model is T-posed, so its arms are in frame and in the mask. Read the\n  VRoid sheet visually only.\n\n**Shading is the catch, and the Yin rig shows the fix:**\n- Flattening the mesh flattens its normals. On Yin's head, the share of face normals pointing at the camera went from\n  19% to 47%, and normal-based cel shading washed out (my grey renders at flatten 1).\n- Yin's own materials don't shade from mesh normals. Skin, Scalera and Iris read a `vs_nrm` attribute, stored before the\n  Lattice by the GN group \"Head Vertex Skeleton Normals\":\n  - normals are blended toward directions from two locator empties, `Yin_Head_Pos` (factor 0.5) and `Yin_Neck_Pos`\n    (factor 0.95);\n  - the blend is weighted by the `NRM_Head` and `NRM_Neck` attributes, then blurred.\n  - So their designed shading survives the flatten.\n- That modifier is off in the viewport and on for renders.\n- **For lowmarch:** we already shade from stored vertex normals, so a depth squash in our renderer wouldn't touch\n  shading. The head-locator normal blend is worth copying anyway, for faces that read soft at every angle.\n\n**Result:** Flattice does what it says, scripts headless, and costs nothing to keep. Lowmarch gets nothing from it while\nits cameras are orthographic. If a perspective camera comes (Unicorn Overlord-style battles, sortie close-ups), the\nrecipe is a depth scale about the head with a chin falloff. Shade from normals stored before the squash.\n\n### Yin and Yang twin rigs (DillonGoo, bought 2026-10-30): review\n\nThe full review is in `~/.local/share/lowmarch/trials/yin-yang-review-2026-10-30/` (`REVIEW.md`), done by a worker on the\nEEVEE builds, opened headless with autoexec off.\n- **Use `contact_sheet_armory.png`.** Its lowmarch rows come from the armory page's own painted renderer, head and whole\n  body, shot headless from a patched scratch copy of the built page (`scripts/arm_shoot.py`, `scripts/compare_sheet.py`).\n- The first sheet (`contact_sheet.png`) wrongly used `tools/vroid_portrait.py`, the old pixel path. It crops to a bust\n  and mangles armory bodies.\n\n**Not a base.**\n- **Licence** (\"Editorial\" on Superhive; $40 to $70 tiers): personal or educational use only. No redistribution \"in\n  original or modified form\", and the Yin and Yang characters can't be used commercially\n  (https://superhivemarket.com/products/yin-yang-twins-anime-rig-pack, and the Gumroad listing\n  dillongoo.gumroad.com/l/yin-yang-anime-twins-rig-pack). A game build would redistribute them.\n- **Technically a poor fit:**\n"}{"chunk_id":"178eba","wall_time_seconds":0.00000449,"exit_code":0,"original_token_count":5403,"output":"# VRoid base models\n\n**Status (2026-11-09):** current. The files carry 57 expression shapes (2.14 exports) or 56 (older), not the 54 below. Licence terms were read by hand on 11-09: see \"Licence, read 2026-11-09\" below, which replaces the licence notes further down (led #1443).\n\n## Licence, read 2026-11-09\n\nRead by hand from pixiv's own pages on 2026-11-09 (headless browser, no login). Page copies and text dumps are in\n`~/citadel-render/workers/handoff/overnight-1109/lowmarch-prep/pages/`. This is a reading of the terms, not legal advice.\nThe English terms of use are a translation; pixiv says the Japanese original prevails.\n\nSources, with the date each page gives:\n- **[G]** VRoid Studio guidelines, edited 2023-12-21: <https://vroid.com/en/studio/guidelines>\n- **[T]** VRoid Studio terms of use, revised 2026-06-24 (articles renumbered then): <https://policies.pixiv.net/en.html#vroidstudio>\n- **[AZ]** \"VRoidPreset_A - Z\", the page the 2.14 samples point at, updated 2024-12-26: <https://vroid.pixiv.help/hc/en-us/articles/4402394424089>\n- **[SC]** \"Do VRoid Studio's sample models come with conditions of use?\", undated: <https://vroid.pixiv.help/hc/en-us/articles/4402614652569>\n- **[F]** FAQ \"Can I use the models created with VRoid Studio Stable Ver. for commercial purposes?\": <https://vroid.pixiv.help/hc/en-us/articles/4405813333657>\n- **[β1 to β4]** <https://vroid.pixiv.help/hc/en-us/articles/360012381793>, `.../360014900273`, `.../360014900113`, `.../360014900233`\n- **[SF]** Sakurada Fumiriya <https://vroid.pixiv.help/hc/en-us/articles/360014788554>; **[SS]** Sendagaya Shino <https://vroid.pixiv.help/hc/en-us/articles/360013482714>\n- **[H]** VRoid Hub terms <https://policies.pixiv.net/en.html#vroidhub>, and the official VRoid Project account's model licences\n  (read from `hub.vroid.com/api/character_models/<id>`, the same JSON the model page shows)\n\n### What we hold, and whose terms apply\n\n| Our folder | What it is | pixiv's terms |\n|---|---|---|\n| `avatarsample_d` to `_g` (OpenGameArt) | Not the 2.14 D to G. They are β Ver AvatarSample_1 to 4: Sendagaya Shibu, Vivi, Vita, Victoria Rubin (file titles match the Japanese β pages) | CC0 [β1 to β4]. The official Hub copy of β1 also allows everything, credit unnecessary [H] |\n| `sakurada_fumiriya`, `sendagaya_shino` | VRoid's mascots | CC0 [SF] [SS]. Official Hub copies allow everything, credit unnecessary [H] |\n| `hairsample_male`, `hairsample_female` | alpha-era hair samples | CC0 [SC] |\n| `base_male`, `base_female` (OpenGameArt) | alpha-era bases, Studio 0.14 exports | **Unclear.** [SC] lists \"Base models\" under CC0, as a picture of the 2021 bases. [G] says \"All content provided by pixiv, including the base models when creating a new avatar, is not CC0.\" Either way [T] Art. 13 licenses them for any purpose |\n| `samples_2_14/avatarsample_a` to `_z` | VRoidPreset A to Z, from Studio 2.14 | [AZ]: not CC0, any use, no credit, a list of prohibited acts (below) |\n| `lowmarch_bodies/base_masc`, `base_fem` | Studio 2.14 new-model bases | Provided Content under [T] Art. 13: any purpose, not CC0 [G] |\n| `faces/face_sexy.vrm`, our armory bodies | our own outputs | Ours, except the pixiv content inside them, which keeps its own terms [T] Art. 11 |\n\nThe armory bodies are built on `base_masc`/`base_fem` with A to Z faces and hair, so [T] and [AZ] are the terms that\nmatter for them.\n\n### 1. A character made in VRoid Studio from scratch\n\nAllowed: ship it in a game, sell the game, show it on a public page, post renders on a public blog, change it in code.\n- Rights: \"The copyright and other rights for textures and hair meshes you created from scratch on VRoid Studio or other\n  tools belong to you, the creator.\" The body and clothing meshes and presets are pixiv's, licensed \"so that you can use\n  it for as wide a range of purposes as possible.\" [G]\n- Licence: pixiv grants \"a non-exclusive, perpetual, worldwide, non-transferable, non-sublicensable license to use,\n  duplicate, archive, modify, and display Provided Content ... for (1) any purpose and (2) any use, except where\n  different license conditions are specified and displayed for individual items\" [T] Art. 13.\n- Games, sale, web pages, renders: \"You can use images and videos of models created with VRoid Studio and generate\n  profit from videos, books, ... games, applications, software, collections of materials, websites\" and \"You can sell\n  the model data exported from VRoid Studio.\" [G]\n- Changing it in code: \"You can edit and use the model data exported from VRoid Studio using software other than VRoid\n  Studio.\" [G]\n- Limits: items with their own clause keep it (\"When using items that display special licensing terms, please observe\n  those specific terms\" [G]); nothing may suggest pixiv backs it (\"refrain from creating any publication or video\n  production that leads people to believe it was created in collaboration with VRoid Studio or pixiv Inc.\" [G]); and\n  the character-creator rule in 3.\n\n### 2. The sample avatars\n\n- **β 1 to 4 (our old D to G), Sakurada Fumiriya, Sendagaya Shino:** all of the above, with no conditions. \"The CC\n  license* for this model is CC0. This model can be edited and used freely.\" [β1] [SF] [SS]\n- **A to Z (2.14):** game, sale, public page, blog renders and code changes are allowed. \"This model's .vroid and VRM\n  files can be used by anyone in any kind of activity, be it for-profit or not.\" Examples given: \"Edit its texture and\n  parameters, and create an original 3D character\" and \"Edit its texture and parameters, upload it to BOOTH for sale to\n  others.\" [AZ] Prohibited, among others [AZ]:\n  - \"Distributing a sample model or its VRM file to a third party by setting the 'Redistribution and alteration'\n    conditions of use to 'Copyright Disclaimer (CC0)'.\"\n  - \"Development of a character creation service using data contained in the sample model, or diversion of data\n    contained in the sample model to an existing character creation service.\"\n  - \"Redistributing the .vroid or VRM file of the sample model (or other data such as image data within the model) in\n    exchange for a fee.\"\n  - \"Acts that can lure people into thinking that the Company supports or recommends some product/event.\"\n  - pixiv may narrow the terms later: \"it's possible that the conditions of use may be limited if there are incidents\".\n- **Unclear:** whether a paid game that ships a sample's textures unedited (our faces keep each sample's iris,\n  highlight, brow and eyeline drawings as they are) counts as redistributing \"image data within the model\" for a fee.\n  Edited and sold is allowed; how much editing is enough isn't said.\n- **Metadata against the page:** for our use, pixiv's page wins. The licence fields in our 2.14 exports\n  (`Redistribution_Prohibited`, `OnlyAuthor`, commercial `Disallow`) were set at our export, not by pixiv: \"Users will\n  be licensed to set licenses freely for VRM data constituting Output Items, as long as they do not breach the license\n  conditions for Provided Content\" [T] Art. 12. They bind whoever receives our file, not us. pixiv's own terms for its\n  items apply to us: \"Where the Company has specified and displayed license conditions for individual items of Provided\n  Content, Users will use such Provided Content in accordance therewith\" [T] Art. 13. No page states a precedence rule\n  in so many words; this is a reading of those two articles. The OpenGameArt files carry pixiv's own metadata (a VRoid\n  Hub licence allowing everything, or CC0), which agrees with the pages.\n- If we ever hand out VRM files built on A to Z, their licence field must not be CC0 [AZ].\n\n### 3. A player-facing character creator\n\nConfirmed: it needs a separate licence from pixiv, and pixiv may refuse.\n- \"Users are not licensed to use Provided Content, or 3D models or Output Items containing Provided Content, to create\n  applications having functions that allow avatars, items, or other 3D models to be created by deforming meshes or\n  combining meshes or textures. When a User wishes to create an application containing such a function, they must\n  receive a separate license from the Company; provided, however, that this does not apply when the User is creating\n  the application for personal use.\" [T] Art. 13; also a prohibited act in [T] Art. 7.\n- \"Please contact us if you'd like an application creation license. It's possible that we may decline granting you a\n  license.\" [G] [F]\n- [AZ] prohibits a creator built on A to Z data outright and names no licence route.\n- So our own build tools are fine (personal use), and baked characters in a game are fine. A creator in the game, built\n  on anything from Studio 2.x or A to Z, needs pixiv's licence.\n- **Unclear:** whether CC0 parts alone (β 1 to 4, the mascots, the hair samples) would escape this. CC0 waives\n  copyright, but [T] is a contract we agreed to by using Studio, and our exports pass through it. Not settled by the\n  pages.\n\n### 4. Credit lines\n\nNone required.\n- A to Z: \"There is no need to credit the original creator when using this sample model.\" [AZ]\n- CC0 models: \"Copyright is waived, and there is no particular limit when using them.\" [β1]\n- Official VRoid Hub copies: `credit: unnecessary` [H].\n- Studio outputs: [G] and [T] ask for none (none found). [G] asks only that nothing implies pixiv's backing, and notes\n  \"VRoid is a trademark or registered trademark of pixiv Inc.\"\n\n### Superseded\n\nThe licence notes further down (the table's \"Licence in the file\", the yomox9 D to Z note, \"That page is behind a\nCloudflare check and wasn't read\") predate this read. Where they differ, this section holds.\n\nSince 2026-10-08 our portraits (and later battle sprites) are rendered from VRoid sample models\nthrough our own pipeline. VRoid supplies a professionally built anime head, hair, body, skeleton and\n54 expression shapes. Pose, archetype reshaping, hair swaps, colours, shading, outlines and the\nreduction to GBA pixels are ours.\n\n## Where they live\n\n`~/.local/share/lowmarch/vroid/<name>/*.vrm` (override with `LOWMARCH_VROID`). They are 11–17 MB\neach and stay out of the repo. Source: <https://opengameart.org/content/vroid-studio-cc0-models>.\n\n| Model | Licence in the file |\n|---|---|\n| Base_Male, Base_Female, HairSample_Male, HairSample_Female | CC0 |\n| AvatarSample D–G, Sakurada Fumiriya, Sendagaya Shino | VRoid Hub licence: everyone, commercial use allowed, modification allowed, redistribution allowed, credit unnecessary |\n\nThe last two are VRoid's mascot characters. Use their parts (hair), not their look. Our characters\nare built from the CC0 bodies.\n\n**AvatarSample A–Z (researched 2026-10-09):** exported by `tools/winvroid` into `samples_2_14/avatarsample_<x>/` (apart from the older D–G above, which are other characters).\nAll 26 were exported on 2026-10-10 (VRM 0.0, VRoid Studio 2.14, 15 to 22 MB each). They are clothed\nexports, so VRoid has deleted the body skin under their clothes: use their heads and hair, not their bodies.\n\n**VRoid's own bases, unclothed (2026-10-10):** `lowmarch_bodies/base_masc.vrm` and `base_fem.vrm`: a new\ncharacter from the Masc or Fem base at default settings, every outfit category set to none, exported as\nVRM 0.0 (`python3 tools/winvroid/winvroid.py bases`). They keep all their skin (10,934 body triangles;\nthe old `base_male/Base_Male.vrm` export has 7,340). The briefs and band are painted on the skin texture,\nnot geometry. `tools/mass.py` builds on `base_masc.vrm`.\n VRoid Studio 2.1.0 and later ship 26\nsample avatars. The VRoid Project account on VRoid Hub publishes A–C with VRoid Hub's licence:\n- everyone may use them;\n- corporate commercial use is allowed;\n- modification and redistribution are allowed;\n- no credit is needed.\n\nD–Z are on VRoid Hub only as exports by another user (yomox9, character 2175138617022572467). Their\nfiles carry the same terms in VRM 1.0 metadata (`commercialUsage: corporation`,\n`allowModificationRedistribution`, credit unnecessary), pointing at pixiv's \"AvatarSample A-Z\" help page.\nThat page is behind a Cloudflare check and wasn't read. Take them from VRoid Studio itself, or the\nofficial account where it has them.\n\nWhat the set offers:\n- about 9 male and 17 female faces, all young and slim, two of them adult men (T, V);\n- different eye drawings, hair and outfits.\n\n**VRoid Studio's guidelines** (vroid.com/en/studio/guidelines, read 2026-10-09):\n- **Allowed:** models made in VRoid Studio may be sold, edited in other software, and used in games.\n- **Restricted:** \"You cannot create an application that can generate or output 3D models, avatars,\n  or items consisting of deformed or combined meshes and textures that were created in VRoid Studio\"\n  without a separate licence from pixiv. Tools meant only for your own use are exempt.\n- **For us:** our build pipeline (the graft, the costume kit) is for our own use, and shipping baked\n  characters in the game is fine. A player-facing character creator built on VRoid parts would need\n  pixiv's licence.\n\n## Heads (`tools/heads.py`, 2026-10-13)\n\nThe armory's bodies all wore VRoid's base face. A head is now one of the 26 samples' faces on our base:\n- **One template:** every VRoid face mesh has the same skin, eye-white and mouth triangles and texture coordinates\n  (4,232 skin triangles in each), so a face moves vertex for vertex. The irises, highlights, brows and eyelines are\n  each sample's own geometry: that is where its eye drawing lives, and it comes along whole.\n- **Only the face is taken:** eyes, nose, mouth, cheeks and jaw, fading out up the forehead, toward the ears and toward\n  the seam with the body. VRoid's face mesh is the head's front; the back of the skull is in the body mesh, and the\n  seam between them runs from the neck to the crown. Taking a sample's whole front set its skull against the base's\n  back, and VRoid's hair base (the short cap) couldn't sit on both. The base's skull, ears, seam and cap stay.\n- **Also taken:** the sample's 57 expressions (the same names, in the same order, in every model), its skin weights\n  mapped by bone name, its eye bones (so the eyes turn about their own centres), and its eye, brow, eyeline and mouth\n  materials. The face skin keeps the base's texture, so the skin tone matches the body.\n- **Sculpted in the file:** the face controls of `tools/vroid_portrait.py` (lower-face length, jaw, chin, cheek, brow\n  ridge, nose, eye size and tilt, iris, mouth), with one rule for the face and the neck so the seam holds. The checks\n  then measure the face that is shown.\n- **Blends:** a face spec's `sample` may be several samples with weights; the face's shape is their weighted mean\n  (one template, so a blend stays coherent from every angle) and the first gives the eye drawing and expressions.\n- **Not fitted (2026-10-13):** `heads.fitted` can move the lower face's length, the cheeks and the eye size until a\n  face archetype's ratios pass (`docs/proportions.md`), but the armory doesn't use it. Those ratios were measured on\n  the study's paintings, mostly seen from the front; held to them, faces were stretched (lower faces up to 17%\n  longer, eyes 20% larger) and read too sharp from the side and too wide from the front. VRoid's faces all set the\n  eyes low (0.56 to 0.64 of the head down from the crown), the young look; the study's adults have them at 0.40 to\n  0.58. The armory's faces are VRoid's as built, chosen and blended by look, and the ratios are reported.\n- **Then the cage** (`tools/cage.py`, a spec's `face`) builds the body on the headed base and sizes the head to its\n  reference's, so head size stays held in metres.\n\nWhat the face rests in (a frown, half-closed eyes) and age lines are drawn when the figure is built, not in the file.\n\n## Tools\n\n- `tools/vrm.py`: VRM/glTF loader (meshes, materials, textures, morph targets, skins) and a numpy\n  z-buffer rasterizer with alpha testing.\n- `tools/vroid_portrait.py`: `Portrait(model, morphs, pose, shape, hair_from)` and `.render(yaw)`\n  give a 96×80 char grid; `image(char, palette=...)` gives a PNG; `smooth_view()` shows the 3D model.\n- `tools/outfit.py`: costume pieces generated in code and fitted to the posed body (`COSTUMES`).\n- `art/cast/cast.py`: one entry per character (base model, hair donor, shape controls, colours, costume).\n\n## Notes\n\n- VRoid models face −z; `FLIP` turns them toward the camera. Character's left is −x.\n- They stand in a T-pose. `BUST_POSE` lowers the arms through linear blend skinning.\n- Expression names end in `Fcl_EYE_Close`, `Fcl_MTH_A`, `Fcl_ALL_Joy` and so on; match the suffix\n  exactly (`_Close` also prefixes `_Close_L`).\n- The eyeline texture is a thick graded band over the iris. Only texels darker than `LID_CORE`\n  count as the lash line, or the eyes read as half shut at 1×.\n\n## Review tooling\n\n`python3 review/vroid-02/build.py aldric` builds the model viewer: `bust`/`battle` GLB models\n(`tools/export_glb.py`), pixel frames every 15°, and `camera.json` so the three.js orthographic\ncamera matches the pixel camera exactly. `tools/poses.py` holds poses (BUST, BATTLE_IDLE, `fist`),\n`tools/terrain.py` holds battle ground (`plains`).\n\n## Hair (`tools/heads.py`, 2026-10-13)\n\nA head spec's `hair` names a sample whose hairstyle goes on. Every VRoid head matches point for point (the face skin,\nand the 562 vertices of skull in the body mesh, by texture coordinates), so the style is warped from its sample's\nhead onto ours (a similarity plus the matched points' residuals spread by inverse distance) and held 1.5 mm off the\nskin. It keeps its hair base (HairBack), which replaces the base's; its hair bones (only those its mesh moves with:\nthe samples' skins list accessory ears too, and the weightless end bones that say where a lock's last bone points);\nits spring groups; and its head's collision sphere, warped onto our head. `tools/cage.py` scales the head's sphere\nand the hair's spring radius with the head. Hair colour is the character's.\n\n**Collision (`tools/collide.py`, 2026-10-13).** Spring bones collide only with spheres the model carries\n(`secondaryAnimation.colliderGroups`); every runtime that plays a VRM (UniVRM, three-vrm, the review page) runs\nthose and nothing else, so what the hair can't pass through is set here, not by the engine. The samples' body\nspheres were sized for VRoid's slim sample bodies, with none over the back or bust, and v11's hair sank up to\n6 cm into our bodies' upper backs, shoulders and napes. Now, on each finished body, `tools/cage.py` calls\n`collide.hair`:\n- **Spheres fitted to the skin:** medial balls (each touching the skin at a point, as large as fits inside), chosen\n  greedily until all the skin the hair can reach (within a lock's length below its joints; the shoulders and upper\n  arms whole once the hair reaches them) stands within 1 cm of one. Each rides the bone most of its skin is\n  weighted to, the breasts' spring bones included. They stand 2 cm out from the skin: a lock's bone runs down its\n  middle, and VRoid's locks stand a median 2.3 cm round it, so a bone held at the skin left the lock in it. That\n  comes to 30 to 60 spheres per body.\n- **The hair draped at rest:** each lock's bones, root to tip, keep their own way unless the body is in it. A bone\n  is turned until its whole length (not only its tail: the body bulges between two joints) is out of the spheres\n  and the mesh it carries stands off the skin, and what no turn can lift (points the head carries) is pushed off.\n  That is the bind pose, so the hair starts where it rests, not inside the body.\n- **The check:** `tools/hair_check.py` replays the page's spring bones (Still, Twist, Bounce; arms out or down) and\n  counts hair vertices inside the skin.\n\n## Designing faces in VRoid Studio (first session, 2026-10-13)\n\n- **The face editor** (Face tab) has 89 sliders: eye size, position and slant, eyelids, droopy and scornful eyes,\n  iris size, brows, nose, mouth and lips, teeth, ears, jaw, chin and cheeks, and masculine and feminine blends of\n  each feature. Its **Face Sets** are presets that set many sliders and textures at once (eye, lash and brow\n  drawings, lips, blush). Several read more adult than any of the 26 samples.\n- **The sliders are subtle:** a step of 0.2 to 0.3 barely shows at full-head zoom. Presets move the face far more.\n- **A face made there transplants like a sample:** export it (`winvroid.export_vrm`) to `faces/` under\n  `LOWMARCH_VROID`, and name it in a head spec (`cast._head(face=\"faces/....vrm\", makeup=True)`; `makeup` keeps its\n  lips, blush and eye shadow, which live on the face's skin texture).\n- **First result:** one face, the sexy woman's, from preset 11 (lashes, almond eyes, fuller lips) with a longer chin,\n  sunken cheeks, heavier lids and upturned corners. In the painted renderer its glossy eyes and blush read cuter,\n  not sultrier, so it was kept aside (`faces/face_sexy.vrm`). Next time: start from a narrower-eyed preset (3 or 5)\n  and change the iris to one with small highlights.\n- **The driver** (`tools/winvroid`): the parameter panel scrolls smoothly and is long (89 rows), so a row search\n  waits for it to settle and scrolls 140 ticks to the top. A notification toast took the foreground from VRoid\n  repeatedly and Windows refused to give it back; `front()` now falls back to a real click on VRoid's own title bar,\n  checked to be VRoid's window. **That change stopped the session:** it rebuilt the driver's helper DLL (V.dll), and\n  Windows' application control (\"An Application Control policy has blocked this file\") refuses to load the new,\n  unsigned build. The PC's owner has to allow it before the driver works again.\n"}