A 3D model pipeline, pushed by Fable 5.2

agent (cont.)

+0:30
  • Bashcd ~/Projects/lowmarch-fable52 && grep -n "^[A-Za-z_]* *=\|^def \|^ \"[a-z_]*\": *dict\|^CAST\[" art/cast/cast.py | head -120; grep -n "saber\|arm_f_slender\|arm_f_" art/cast/cast.py | head -60

    command

    cd ~/Projects/lowmarch-fable52 && grep -n "^[A-Za-z_]* *=\|^def \|^    \"[a-z_]*\": *dict\|^CAST\[" art/cast/cast.py | head -120; grep -n "saber\|arm_f_slender\|arm_f_" art/cast/cast.py | head -60

    result, 74 lines

    7:MOB_COLORS = dict(A="#2a2420", B="#4a3a30", C="#6e5644", D="#92785e", E="#b89c7e",
    9:MOB_PAINT = dict(signature="#7b3026", doublet="#3a3330", heraldry="#d8cfc0", leather="#5a3e2a", boot="#3e2c22",
    16:HAIRS = {"brown": ("#2a1d14", "#4a3424", "#6e5038", "#94704e", "#c09a74"),
    23:EYES = {"brown": ("#2a1a12", "#5a3a1c", "#9a7040"), "blue": ("#1a2a4a", "#3a6ab0", "#8ac0ec"),
    26:SKINS = {"light": None, "fair": "#f4dccb", "tan": "#e3bf9c", "olive": "#d6b08a", "brown": "#b08060",
    38:POLEARMS = ("soldier", "soldier_f")                     # classes that hold their weapon in both hands
    41:def mob(model, label, costume, build, face, hair="brown", eyes="brown", skin="light", hair_from=None, hair_trim=None,
    81:MH_HEAD = "base_male/Base_Male.vrm"
    82:MH_YOUTH = dict(macro=dict(g=1.0, age=0.38, muscle=0.25, weight=0.45, height=0.45, proportions=0.5),
    84:MH_VETERAN = dict(macro=dict(g=1.0, age=0.78, muscle=0.60, weight=0.78, height=0.40, proportions=0.35),
    86:MH_BRUTE = dict(macro=dict(g=1.0, age=0.62, muscle=1.0, weight=0.85, height=0.72, proportions=0.6),
    89:MH_HEAD_F = "base_female/Base_Female.vrm"
    90:MH_F_YOUTH = dict(macro=dict(g=0.0, age=0.40, muscle=0.40, weight=0.45, height=0.45, proportions=0.5), head=MH_HEAD_F)
    91:MH_F_VETERAN = dict(macro=dict(g=0.0, age=0.76, muscle=0.55, weight=0.70, height=0.40, proportions=0.40), head=MH_HEAD_F)
    92:MH_F_STRONG = dict(macro=dict(g=0.0, age=0.55, muscle=0.85, weight=0.55, height=0.70, proportions=0.6),
    98:MH_ANIME_FACE = {"eyes/l-eye-scale": 1.0, "eyes/l-eye-height2": 0.8, "eyes/l-eye-trans": -0.3,
    103:MH_ANIME_DRAW = dict(face_round=0.75, iris_deg=62, lid_w=1.7, brow_w=1.3)
    104:QT_M = dict(file="Superhero_Male_FullBody.gltf", tex="T_Superhero_Male_Ligh.png")
    105:QT_F = dict(file="Superhero_Female_FullBody.gltf", tex="T_Superhero_Female_Light_BaseColor.png")
    110:MASS_MUSCULAR = dict(base="lowmarch_bodies/base_masc.vrm", muscle=1.0, weight=0.75, gain=2.6, torso_gain=0.5, targets={
    114:MASS_HEAVY = dict(base="lowmarch_bodies/base_masc.vrm", muscle=0.6, weight=1.0, gain=2.6, torso_gain=0.7, targets={
    119:def _anime(spec, **face):
    131:def _mhb(g, age, muscle, weight, height, proportions=0.5, targets=None):
    141:_HEAVY_SKIP = ("shoulder_hd", "hip_hd", "waist_hd")
    148:ARMORY_REFS = {     # name: (archetype (docs/proportions.md), MakeHuman spec, fit options)
    170:CAGE_BRUTE_FORMS = [
    183:def _muscle(k, trap=1.0, lats=1.0, delts=1.0):
    200:CAGE_HEAVY_FORMS = [
    206:CAGE_STRONG_FORMS = _muscle(0.65)
    207:CAGE_HEROIC_FORMS = _muscle(0.6, trap=0.6, lats=1.4, delts=1.3)
    210:CAGE_STRONG_F_FORMS = [
    221:CAGE_HEAVY_F_FORMS = [
    227:CHECK_RANGES = {"arm_m_strong": dict(shoulder_hd=(1.7, 2.35)), "arm_m_heroic": dict(shoulder_hd=(2.0, 2.4))}
    234:def _head(archetype, sculpt=None, hair=None, face=None, makeup=False, **mix):
    250:HEADS = {
    267:HAIR_COLOURS = {"arm_m_lean": "black", "arm_m_average": "brown", "arm_m_strong": "black", "arm_m_heroic": "auburn",
    271:EYE_COLOURS = {"arm_m_heroic": "blue", "arm_f_sexy": "green", "arm_f_slender": "blue", "arm_m_old": "grey",
    273:PORTRAIT = {    # at rest and age lines: name -> shape extras (tools/vroid_portrait.py)
    274:    "arm_m_strong": dict(rest={"Fcl_BRW_Angry": 0.4}),
    275:    "arm_m_heroic": dict(rest={"Fcl_BRW_Angry": 0.25}),
    276:    "arm_m_brute": dict(rest={"Fcl_EYE_Close": 0.28, "Fcl_BRW_Angry": 0.75}),
    278:    "arm_m_old": dict(age_lines=0.8, blush=0.0, fangs=1.0, rest={"Fcl_EYE_Angry": 0.4, "Fcl_EYE_Close": 0.25,
    280:    "arm_f_old": dict(age_lines=0.6, blush=0.3, rest={"Fcl_EYE_Close": 0.22, "Fcl_MTH_Down": 0.2}),
    281:    "arm_f_strong": dict(rest={"Fcl_BRW_Angry": 0.2}),
    283:ARMORY = {      # name: (label, sex, its reference, cage spec beyond base and ref)
    304:CAST = {
    305:    "aldric": dict(  # young lord
    319:    "elaine": dict(  # knight-princess, swordswoman (the user's brief: a blonde swordswoman like Saber)
    331:    "saber": dict(
    415:    "brannoc": dict(  # veteran knight
    421:    "gorm": dict(  # brute
    428:    "pip": dict(  # youth
    433:    "maren": dict(  # young woman, cleric
    438:    "sylve": dict(  # cold mage
    259:    "arm_f_slender": _head("young", hair="j", j=1),
    260:    "arm_f_average": _head("generic", hair="a", a=1),
    261:    "arm_f_strong": _head("adult", hair="s", u=1),
    262:    "arm_f_sexy": _head("adult", hair="u", q=1),        # (faces/face_sexy.vrm, made in VRoid's editor 2026-10-13 from
    264:    "arm_f_heavy": _head("generic", dict(cheek=0.4), hair="y", s=0.6, e=0.4),
    265:    "arm_f_old": _head("adult", hair="w", m=1),
    269:                "arm_f_slender": "blond", "arm_f_average": "brown", "arm_f_strong": "red", "arm_f_sexy": "black",
    270:                "arm_f_heavy": "auburn", "arm_f_old": "grey"}
    271:EYE_COLOURS = {"arm_m_heroic": "blue", "arm_f_sexy": "green", "arm_f_slender": "blue", "arm_m_old": "grey",
    272:               "arm_f_old": "grey", "arm_m_youth": "amber"}
    280:    "arm_f_old": dict(age_lines=0.6, blush=0.3, rest={"Fcl_EYE_Close": 0.22, "Fcl_MTH_Down": 0.2}),
    281:    "arm_f_strong": dict(rest={"Fcl_BRW_Angry": 0.2}),
    292:    "arm_f_slender": ("Woman, slender", "f", "ref_f_slender", dict(relax=4, bust_shape=dict(spread=0.008, drop=0.005, flat=0.25))),
    293:    "arm_f_average": ("Woman, average", "f", "ref_f_average", dict(relax=4, bust_shape=dict(spread=0.005, drop=0.008, flat=0.3))),
    294:    "arm_f_strong": ("Woman, strong", "f", "ref_f_strong", dict(relax=4, bust=0.1, forms=CAGE_STRONG_F_FORMS,
    296:    "arm_f_sexy": ("Woman, sexy", "f", "ref_f_sexy", dict(relax=4, bust=0.2, bust_shape=dict(scale=0.3, inflate=0.025, low=0.02, drop=0.025,
    298:    "arm_f_heavy": ("Woman, heavy", "f", "ref_f_heavy", dict(relax=4, bust=0.3, forms=CAGE_HEAVY_F_FORMS,
    301:    "arm_f_old": ("Woman, old", "f", "ref_f_old", dict(relax=4, bust_shape=dict(spread=0.006, drop=0.015, flat=0.4))),
    331:    "saber": dict(
    337:        costume="saber_study",
  • Bashcd ~/Projects/lowmarch-fable52 && sed -n 283,464p art/cast/cast.py; grep -n "^COSTUMES\|^def \|^ \"" tools/outfit.py | head -80

    command

    cd ~/Projects/lowmarch-fable52 && sed -n 283,464p art/cast/cast.py; grep -n "^COSTUMES\|^def \|^    \"" tools/outfit.py | head -80

    result, 256 lines

    ARMORY = {      # name: (label, sex, its reference, cage spec beyond base and ref)
        "arm_m_lean": ("Man, lean", "m", "ref_m_lean", dict(relax=4)),
        "arm_m_average": ("Man, average", "m", "ref_m_average", dict(relax=4)),
        "arm_m_strong": ("Man, strong", "m", "ref_m_strong", dict(relax=4, forms=CAGE_STRONG_FORMS)),
        "arm_m_heroic": ("Man, heroic", "m", "ref_m_heroic", dict(relax=4, forms=CAGE_HEROIC_FORMS)),
        "arm_m_heavy": ("Man, heavy", "m", "ref_m_heavy", dict(relax=4, forms=CAGE_HEAVY_FORMS)),
        "arm_m_brute": ("Man, brute", "m", "ref_m_brute", dict(wrap_sigma=(0.02, 0.035), relax=4, forms=CAGE_BRUTE_FORMS)),
        "arm_m_old": ("Man, old", "m", "ref_m_old", dict(relax=4)),
        "arm_m_youth": ("Man, youth", "m", "ref_m_youth", dict(relax=4)),
        "arm_f_slender": ("Woman, slender", "f", "ref_f_slender", dict(relax=4, bust_shape=dict(spread=0.008, drop=0.005, flat=0.25))),
        "arm_f_average": ("Woman, average", "f", "ref_f_average", dict(relax=4, bust_shape=dict(spread=0.005, drop=0.008, flat=0.3))),
        "arm_f_strong": ("Woman, strong", "f", "ref_f_strong", dict(relax=4, bust=0.1, forms=CAGE_STRONG_F_FORMS,
                                                                      bust_shape=dict(spread=0.006, drop=0.006, flat=0.35))),
        "arm_f_sexy": ("Woman, sexy", "f", "ref_f_sexy", dict(relax=4, bust=0.2, bust_shape=dict(scale=0.3, inflate=0.025, low=0.02, drop=0.025,
                                                                                                   spread=0.006, flat=0.4))),
        "arm_f_heavy": ("Woman, heavy", "f", "ref_f_heavy", dict(relax=4, bust=0.3, forms=CAGE_HEAVY_F_FORMS,
                                                                   bust_shape=dict(scale=0.2, inflate=0.025, low=0.025, splay=0.015,
                                                                                   drop=0.03, spread=0.006, flat=0.45, base=0.1))),
        "arm_f_old": ("Woman, old", "f", "ref_f_old", dict(relax=4, bust_shape=dict(spread=0.006, drop=0.015, flat=0.4))),
    }
    
    CAST = {
        "aldric": dict(  # young lord
            model="hairsample_male/HairSample_Male.vrm", hair="sakurada_fumiriya/Sakurada Fumiriya.vrm",
            # heroic proportions after the study's lord: about 7.4 heads (smaller head, longer legs), broad
            # shoulders and chest over a narrower waist, thicker neck and limbs
            shape=dict(eye=1.14, head=0.93, neck=1.14, chest=1.10, shoulders=1.28, arms=1.10, torso=1.06,
                       legs=1.06, leg_len=1.05, hands=1.06),
            colors=dict(A="#1d2a52", B="#2c4a8a", C="#3f74c0", D="#63a3e0", E="#a6d8f6",
                        r="#21183a", s="#3b6ab0", t="#86c0ec", K="#4a2030", L="#7a2e3c", M="#a8444e", P="#d8747a",
                        U="#161a38", V="#26305e", W="#3c4c8e", X="#6a7cc4"),
            costume="lord",
            # painted renderer: one signature cloth hue, neutral steel and brown leather (Unicorn Overlord
            # study: two or three hues at most; gold only for royalty and only as small accents)
            paint=dict(signature="#7d1e2c", doublet="#2a2d3d", heraldry="#dfe2e8", leather="#5f3e2b", boot="#4a3326",
                       glove="#5f3e2b", steel="#a6adbb", gold="#b08b3f", hair="#3c6db3")),
        "elaine": dict(  # knight-princess, swordswoman (the user's brief: a blonde swordswoman like Saber)
            # the sample's hair cards are all dropped (hair_trim < 0): her hair is built by tools/hair.py
            model="hairsample_female/HairSample_Female.vrm", hair=None, hair_trim=-1,
            shape=dict(head=0.95, leg_len=1.04, shoulder_w=0.008, rest={"Fcl_BRW_Angry": 0.35}),
            colors=dict(A="#6b4a1e", B="#a8782e", C="#d4a648", D="#ecd07a", E="#fbf0c0",
                        r="#12321e", s="#2e8a4e", t="#9edcae", K="#18224f", L="#24398a", M="#3556b8", P="#6f8fe0",
                        Q="#0f111b", R="#1b1e2c", S="#2a2e42", T="#41465e"),
            costume="knight_dress",
            paint=dict(signature="#2a4aa6", doublet="#1d2133", heraldry="#eef0f5", leather="#5a3d2b", boot="#4a3326",
                       glove="#5a3d2b", steel="#b7bfcc", gold="#c9a34a", hair="#e2bf62", grain=dict(signature=0.015))),
        # benchmark only, NOT FOR THE GAME (Saber is Type-Moon's): a fidelity test of the outline-plate kit on
        # Elaine's base. The game's characters are original designs.
        "saber": dict(
            model="hairsample_female/HairSample_Female.vrm", hair=None, hair_trim=0.12,
            shape=dict(head=0.95, leg_len=1.04, shoulder_w=0.008, rest={"Fcl_BRW_Angry": 0.35}),
            colors=dict(A="#6b4a1e", B="#a8782e", C="#d4a648", D="#ecd07a", E="#fbf0c0",
                        r="#12321e", s="#2e8a4e", t="#9edcae", K="#18224f", L="#24398a", M="#3556b8", P="#6f8fe0",
                        Q="#0f111b", R="#1b1e2c", S="#2a2e42", T="#41465e"),
            costume="saber_study",
            # colours sampled from the study (royal blue dress, violet front panel, warm light steel)
            paint=dict(signature="#2e5ba6", doublet="#1a1c26", heraldry="#f4f0e6", leather="#2a2326", boot="#3a3032",
                       glove="#221d20", steel="#eceef2", gold="#d9b46a", hair="#ebc985", motif="#3a44a2",
                       violet="#4440a0", ribbon="#5a58a8", grain=dict(signature=0.012, violet=0.012))),
        # ---- common enemies (tools/mobs.py): a class costume on a base, a build and a face (tools/gear.py) ----
        "mob_soldier": mob("base_male/Base_Male.vrm", "Soldier", "soldier", "average", "young", hair="brown", eyes="brown"),
        "mob_mh_youth": mob(None, "MH youth", "soldier", "average", "young", hair="brown", eyes="brown", mh=MH_YOUTH),
        "mob_mh_veteran": mob(None, "MH veteran", "soldier", "average", "veteran", hair="grey", eyes="grey", skin="tan",
                              mh=MH_VETERAN, beard="short"),
        "mob_mh_brute": mob(None, "MH brute", "soldier", "average", "brute", hair="red", eyes="blue", skin="fair",
                            mh=MH_BRUTE, beard=("full", 0.06), age_lines=0.4, iris=0.88, blush=0.3,
                            rest={"Fcl_EYE_Angry": 0.35}),
        "mob_mh_f_youth": mob(None, "MH woman, young", "soldier_f", "average", "young", hair="black", eyes="amber", skin="brown",
                              mh=MH_F_YOUTH),
        "mob_mh_f_veteran": mob(None, "MH woman, veteran", "soldier_f", "average", "stern", hair="grey", eyes="grey",
                                mh=MH_F_VETERAN, age_lines=0.5, iris=0.84, blush=0.0, mouth=1.05,
                                rest={"Fcl_EYE_Angry": 0.45, "Fcl_EYE_Close": 0.1, "Fcl_EYE_Joy": 0.18, "Fcl_BRW_Angry": 0.45,
                                      "Fcl_MTH_Down": 0.25}),
        "mob_mh_f_strong": mob(None, "MH woman, strong", "soldier_f", "average", "plain", hair="red", eyes="green", skin="fair",
                               mh=MH_F_STRONG),
        "spk_mh_vroid_m": mob(None, "Man: MakeHuman + VRoid head", "soldier", "average", "young", hair="brown", eyes="brown",
                              mh=MH_YOUTH, group="Round 1 · bases"),
        "spk_mh_anime_m": mob(None, "Man: MakeHuman, own head", "soldier", "average", "young", hair="brown", eyes="brown",
                              mh=_anime(MH_YOUTH), hair_style="crop", group="Round 1 · bases"),
        "spk_qt_m": mob(None, "Man: Quaternius", "soldier", "average", "young", hair="brown", eyes="brown",
                        qt=QT_M, hair_style="crop", group="Round 1 · bases"),
        "spk_mh_vroid_f": mob(None, "Woman: MakeHuman + VRoid head", "soldier_f", "average", "young", hair="black", eyes="amber",
                              skin="brown", mh=MH_F_YOUTH, group="Round 1 · bases"),
        "spk_mh_anime_f": mob(None, "Woman: MakeHuman, own head", "soldier_f", "average", "young", hair="black", eyes="amber",
                              skin="brown", mh=_anime(MH_F_YOUTH, **{"chin/chin-width": -0.7}), hair_style="crop", group="Round 1 · bases"),
        "spk_qt_f": mob(None, "Woman: Quaternius", "soldier_f", "average", "young", hair="black", eyes="amber",
                        skin="brown", qt=QT_F, hair_style="crop", group="Round 1 · bases"),
        "spk_mh_sample_a_f": mob(None, "Woman: MakeHuman + VRoid sample A head", "soldier_f", "average", "young", hair="black",
                                 eyes="amber", skin="brown", mh=dict(MH_F_YOUTH, head="samples_2_14/avatarsample_a/AvatarSample_A.vrm"), group="Round 2 · VRoid"),
        # bodies made in VRoid Studio by the Windows driver, exported without its clothes (they cut the skin they cover)
        "spk_vroid_broad": mob("lowmarch_bodies/vroid_broad_v2.vrm", "Man: VRoid Studio, broad", "soldier", "average", "young",
                               hair="brown", eyes="brown", group="Round 2 · VRoid"),
        "spk_vroid_stocky": mob("lowmarch_bodies/vroid_stocky_v2.vrm", "Man: VRoid Studio, stocky", "soldier", "average", "young",
                                hair="brown", eyes="brown", group="Round 2 · VRoid"),
        # VRoid's Base_Male with MakeHuman's muscle and weight carried across (tools/mass.py), beside it unchanged
        # and beside the MakeHuman brute whose mass they borrow
        "spk_vroid_plain": mob("base_male/Base_Male.vrm", "Man: VRoid Base_Male", "soldier", "average", "young",
                               hair="brown", eyes="brown", group="Round 2 · VRoid"),
        "spk_vroid_muscular": mob("base_male/Base_Male.vrm", "Man: VRoid + MakeHuman muscle", "soldier", "average", "young",
                                  hair="brown", eyes="brown", mass=MASS_MUSCULAR, group="Round 2 · VRoid"),
        "spk_vroid_heavy": mob("base_male/Base_Male.vrm", "Man: VRoid + MakeHuman weight", "soldier", "average", "young",
                               hair="brown", eyes="brown", mass=MASS_HEAVY, group="Round 2 · VRoid"),
        "spk_mh_brute": mob(None, "Man: MakeHuman brute + VRoid head", "soldier", "average", "brute", hair="red", eyes="blue",
                            skin="fair", mh=MH_BRUTE, beard=("full", 0.06), age_lines=0.4, iris=0.88, blush=0.3,
                            rest={"Fcl_EYE_Angry": 0.35}, group="Round 2 · VRoid"),
        "spk_mh_anime_teen": mob(None, "MakeHuman own head, 15", "soldier", "average", "young", hair="blond", eyes="blue",
                                 skin="fair", mh=_anime(dict(macro=dict(g=1.0, age=0.30, muscle=0.35, weight=0.4,
                                                                        height=0.4, proportions=0.5))),
                                 hair_style="crop", group="Round 1 · bases"),
        "spk_mh_anime_old": mob(None, "MakeHuman own head, 70", "soldier", "average", "young", hair="grey", eyes="grey",
                                skin="tan", mh=_anime(dict(macro=dict(g=1.0, age=0.85, muscle=0.5, weight=0.6,
                                                                      height=0.45, proportions=0.4))),
                                hair_style="crop", beard="short", group="Round 1 · bases"),
        "mob_fighter": mob("hairsample_male/HairSample_Male.vrm", "Fighter", "fighter", "athletic", "veteran", hair="black",
                           eyes="grey", skin="tan", hair_from="base_male/Base_Male.vrm", beard="short"),
        "mob_hoplite": mob("base_male/Base_Male.vrm", "Hoplite", "hoplite", "stocky", "stern", hair="red", eyes="blue",
                           skin="fair", beard="full", height=1.09, chest=1.16, arms=1.16),
        "mob_berserker": mob("base_male/Base_Male.vrm", "Berserker", "berserker", "huge", "brute", hair="red", eyes="blue",
                             beard=("full", 0.09)),
        "mob_housecarl": mob("hairsample_male/HairSample_Male.vrm", "Housecarl", "housecarl", "stocky", "brute", hair="blond",
                             eyes="grey", skin="fair", hair_from="base_male/Base_Male.vrm", beard=("full", 0.05)),
        "mob_hunter": mob("avatarsample_d/AvatarSample_D.vrm", "Hunter", "hunter", "slim", "soft", hair="auburn", eyes="green",
                          skin="olive", hair_from="base_female/Base_Female.vrm", paint=dict(signature="#4a5a38", linen="#cfc4a8")),
        # the same soldier's kit on other bodies: generic units vary in build, age and sex
        "mob_soldier_veteran": mob("hairsample_male/HairSample_Male.vrm", "Soldier (veteran)", "soldier", "stocky", "gaunt",
                                   hair="grey", eyes="grey", hair_from="base_male/Base_Male.vrm", beard="moustache"),
        "mob_soldier_f": mob("base_female/Base_Female.vrm", "Soldier (woman)", "soldier_f", "slim", "stern", hair="black",
                             eyes="amber", skin="brown"),
        "mob_witch": mob("hairsample_female/HairSample_Female.vrm", "Witch", "witch", "slim", "gaunt", hair="blue", eyes="amber",
                         skin="pale", hair_trim=0.12, height=1.03, paint=dict(signature="#3a2a4e", cloth="#2a2430")),
        "mob_thief": mob("avatarsample_e/AvatarSample_E.vrm", "Thief", "thief", "slim", "young", hair="brown", eyes="brown",
                         skin="tan", paint=dict(cloth="#2e2a30")),             # her own bob (borrowed hair left gaps)
        "brannoc": dict(  # veteran knight
            model="hairsample_male/HairSample_Male.vrm", hair=None,
            shape=dict(face_len=0.12, jaw=0.5, chin_w=0.6, chin_len=0.4, cheek=-0.4, brow_ridge=0.6, nose=0.6,
                       eye=0.92, neck=1.2, chest=1.06, rest={"Fcl_EYE_Close": 0.2, "Fcl_BRW_Angry": 0.35}),
            colors=dict(A="#2a1a16", B="#4a2e22", C="#6e4630", D="#956548", E="#c08f68",
                        r="#2a1a12", s="#5a3a1c", t="#9a7040", K="#2a3a2a", L="#3e5a3a", M="#5a7e50", P="#8aae78")),
        "gorm": dict(  # brute
            model="hairsample_male/HairSample_Male.vrm", hair="base_male/Base_Male.vrm",
            shape=dict(head=0.92, face_len=0.06, jaw=1.0, chin_w=1.0, chin_len=0.3, cheek=0.5, brow_ridge=1.0,
                       nose=0.4, nose_w=1.0, eye=0.95, mouth=1.15, neck=1.45, chest=1.18,
                       rest={"Fcl_EYE_Close": 0.18, "Fcl_BRW_Angry": 0.6}),
            colors=dict(A="#1c2a18", B="#2e4a22", C="#48702e", D="#6e9a3e", E="#a6c86a",
                        r="#2a1a12", s="#6a4a20", t="#b08a40", K="#3a2a1a", L="#5a4028", M="#7e5a38", P="#aa8458")),
        "pip": dict(  # youth
            model="hairsample_male/HairSample_Male.vrm", hair=None,
            shape=dict(head=1.05, face_len=-0.08, jaw=-0.3, chin_len=-0.3, eye=1.08, neck=0.85, chest=0.92),
            colors=dict(A="#5a3a18", B="#96682a", C="#c89a3a", D="#e8c45a", E="#f8ec9a",
                        r="#183a24", s="#2e7a3e", t="#7ac87a", K="#1a3a3a", L="#2a5a5a", M="#3e8080", P="#6ab0a8")),
        "maren": dict(  # young woman, cleric
            model="hairsample_female/HairSample_Female.vrm", hair="avatarsample_g/AvatarSample_G.vrm",
            shape=dict(),
            colors=dict(A="#4a1428", B="#8a2440", C="#c8445a", D="#e8788a", E="#f8b8c0",
                        r="#3a1428", s="#a83a5a", t="#e8889a", K="#6a6a8a", L="#9a9ab8", M="#c8c8e0", P="#f4f4fc")),
        "sylve": dict(  # cold mage
            model="hairsample_female/HairSample_Female.vrm", hair="sendagaya_shino/Sendagaya Shino.vrm",
            shape=dict(face_len=0.06, jaw=-0.3, chin_len=0.3, eye=0.95, eye_tilt=0.25, mouth=0.9,
                       rest={"Fcl_EYE_Close": 0.15}),
            colors=dict(A="#2e2a44", B="#5a5678", C="#8a86a8", D="#b8b6d0", E="#e8e6f4",
                        r="#1d2a3a", s="#3a6a8a", t="#8ac0d8", K="#2a1a3a", L="#44285a", M="#643a80", P="#9a6ab4")),
    }
    
    
    for _n, (_arch, _spec, _opts) in ARMORY_REFS.items():
        _sx = "m" if _spec["macro"]["g"] else "f"
        # fitted to the archetype (tools/fit.py) and to real people of the body's height and waist (tools/anthro.py); on
        # the fitted short necks only skin bound to the head is jaw
        _spec = dict(_spec, fit=dict(archetype=_arch, sex=_sx, anthro=True, **_opts), jaw_hw=0.9)
        CAST[_n] = dict(mob(None, _n, "underwear_f" if _sx == "f" else "underwear", "average", "young", hair="brown",
                            eyes="brown", mh=_spec, hands=1.0), archetype=_arch, sex=_sx)
    for _n, (_label, _sx, _ref, _spec) in ARMORY.items():
        # the pull falls short of the reference's thighs (most on the big ones) and VRoid's breasts are smaller than a
        # slim reference's (the slender woman's cup at the 2nd percentile of her build): each body's own mid-thigh and
        # cup are fitted to real people of its height and waist, as its reference's were (tools/cage.py swell, inflate)
        _arch, _, _opts = ARMORY_REFS[_ref]
        _fit = dict(archetype=_arch, sex=_sx, anthro=True, only=("thigh_p", "cup_p"), old=_n.endswith("_old"),
                    **({"figure": _opts["figure"]} if "figure" in _opts else {}))
        _spec = dict(_spec, base=_FEM if _sx == "f" else _MASC, ref=_ref, fit=_fit, face=HEADS[_n])
        CAST[_n] = dict(mob(_spec["base"], _label, "underwear_f" if _sx == "f" else "underwear", "average", "bare",
                            hair=HAIR_COLOURS.get(_n, "brown"), eyes=EYE_COLOURS.get(_n, "brown"), hands=1.0, cage=_spec, group="Men" if _sx == "m" else "Women", **PORTRAIT.get(_n, {})),
                        archetype=ARMORY_REFS[_ref][0], sex=_sx, ranges=CHECK_RANGES.get(_n, {}))
    32:def grid_mesh(P):
    33:    """P: (U, V, 3) grid of points -> (pos, tri)."""
    41:def piece(name, role, pos, tri, nrm=None, outward_from=None, axis=None):
    42:    """outward_from: a point (or, with axis, a line) the normals should face away from, so the
    59:def thick_grid(P, thickness, outward_from, axis=None):
    60:    """A grid sheet given real thickness: outer face, inner face, and the four edges closed, so
    90:def frame_axes(a, hint=(0, 1, 0)):
    99:def box(name, role, centre, axes, half):
    113:def tube(name, role, start, axis, length, r0, r1=None, seg=16, rows=2):
    127:def ball(name, role, centre, r, seg=14, rows=8, squash=(1, 1, 1)):
    140:def ribbon(name, role, curve, width=0.006, lift=0.002, normals=None, away=None, closed=False):
    141:    """A band along a 3D polyline, lifted off a surface. normals: the surface normal at each
    164:    """What a costume is built against: the body skin (welded, measurable) and the bones, all in
    230:def without(pc, bones, max_w=0.3):
    231:    """A piece's triangles away from some bones, as (pos, tri) for merge_surfaces: a bodice's torso
    239:def inherit(child, parent):
    240:    """Trim and hardware take the weights of the nearest vertex of the piece they sit on."""
    246:def near_normals(pc, pts):
    251:def wrap(fit, name, role, bones, offset, min_w=0.5, exclude=(), y_min=None, y_max=None, subdiv=0,
    253:    """A garment shrink-wrapped onto the body region that follows `bones`. cut: (normal, d), keep only
    304:def loop_trim(name, role, garment, pick, width=0.008, lift=0.0015):
    305:    """Trim along one of a garment's open edges: the loop that scores highest under `pick`."""
    313:def slice_line(pc, axis=0, value=0.0, keep=lambda p: True):
    314:    """Points where a plane (coordinate `axis` == value) cuts a piece, sorted top to bottom."""
    328:def collar(fit, name, role, height_back=0.044, height_front=0.028, gap_deg=50, clear=(0.009, 0.015),
    330:    """A standing collar fitted to the neck: radius from ray casts to the neck skin plus clearance
    355:def pauldron(fit, name, role, over, side="L", lames=((0, 62, 0.012, 0.016), (55, 78, 0.010, 0.013),
    357:    """Overlapping lames over the shoulder. Each lame's shape comes from ray casts out of the
    397:def drape(P0, collide, clearance, pinned, steps=90, iters=10, gravity=0.0025, bend=0.25, closed=False):
    398:    """A small position-based cloth solve on a (U, V, 3) grid: gravity, stretch and bend
    445:def cape(fit, name, role, under, length=1.0, phi=0.55, seg=44, rows=18, top_clear=0.003,
    447:    """A cape whose top edge lies on the tunic around the base of the neck, clasped at the
    474:def tails(fit, name, role, under, y_top, length=0.36, front_gap=60, seg=40, rows=12, clear=(0.012, 0.030)):
    475:    """Tunic tails from under the belt, open at the front, settled against the legs."""
    498:def belt(fit, name, role, over, y, height=0.034, offset=0.006, thickness=0.005, seg=56, tilt=0.0):
    499:    """A band around the waist cast onto `over`. tilt: metres higher on the character's right hip
    517:def sword(fit, hand="R", blade_len=0.80, blade_w=0.042, grip_len=0.15, hilt="gold", grip="leather"):
    518:    """A one-handed sword held in the fist. In the hand's frame the fingers run along +x (right
    552:def pipe(name, role, curve, r=0.0026, seg=6, closed=False):
    553:    """A thin tube along a polyline: the rolled edge of a plate, piping, a cord."""
    579:def limb_surface(fit, bones, side=None):
    580:    """The skin of one limb (bones matched by name), optionally only one side of the body, so ray
    589:def side_of(pc, side):
    590:    """A piece's triangles on one side of the body (the character's left is -x)."""
    595:def limb_lames(fit, name, role, over, top, bottom, lames, arc=(-180, 180), front=(0, 0, -1), thickness=0.0035,
    597:    """Bands of plate around a limb: each lame covers fractions (s0, s1) of the segment top->bottom
    626:def dome(name, role, centre, normal, up, r, depth, thickness=0.003, seg=20, rows=6, scallop=0.0):
    627:    """A shallow cap (couter, poleyn, shield boss): an ellipsoid section rising `depth` along
    643:def fan(name, role, centre, toward, axis, lateral, radius, sweep=80, ribs=4, cup=0.012, thickness=0.003,
    645:    """The winged plate on the outside of an elbow or knee: a fan from the joint toward `toward`,
    661:def joint_guard(fit, name, joint, child, toward, side, over, r=0.034, wing=0.062, depth=0.020):
    662:    """Couter or poleyn: a domed cap over the point of the joint plus a fan wing on its outer
    680:def panel(fit, name, role, under, collide, y_top, centre_deg, half_width, length, seg=14, rows=22,
    682:    """A hanging cloth panel (tabard front or back) pinned along a belt line: its top row follows
    716:def mantle(fit, name, role, over, seg=64, rows=16, gap_deg=12, clear=(0.010, 0.016)):
    717:    """A hooded scarf (the study's lord wears one in his signature colour): a ring at the base of
    780:def shield(fit, name, side="L", radius=0.20, boss=0.045):
    781:    """A round wooden shield, painted with the house's arms, strapped to the forearm's outer side:
    819:def closed_grid_mesh(P):
    820:    """(U, V, 3) grid whose U direction wraps around (a skirt) -> (pos, tri)."""
    829:def skirt(fit, name, role, under, collide, y_top, length, flare=0.26, seg=56, rows=20, folds=9, fold_depth=0.012,
    831:    """A full skirt: a closed ring at the waist cast onto `under`, belling out to the hem, settled
    858:def updo(fit, hair_role="hair", ribbon_role="signature"):
    859:    """A braided bun at the back of the head, a ribbon tied on it, and one cowlick strand rising
    900:def sabaton(fit, name, side, role="metal", pad=0.010, ridges=3, seg=26, rows=14):
    901:    """A steel shoe over the whole foot (hides the base model's toes), built as a shoe last from
    942:def knight_dress(fit):
    943:    """A blonde knight-princess: a long blue dress with a white petticoat edge, a fitted steel
    1034:def lord_tunic(fit):
    1035:    """The first lord costume, head to toe: tunic, tails, belt, trousers, boots, gloves, a standing collar,
    1110:def lord(fit):
    1111:    """The young lord after the Unicorn Overlord study (their lord: half-plate, hooded scarf, long
    1120:    """
    1267:COSTUMES = {"lord": lord, "lord_tunic": lord_tunic, "knight_dress": knight_dress,
  • Bashcd ~/Projects/lowmarch-fable52 && grep -n "^## \|^### " docs/portrait-guide.md | head -80; which ffmpeg blender; ls [redacted: private path]/ 2>/dev/null; ls [redacted: private path]/ [redacted: private path]/vroid | head -60; ls [redacted: private path] 2>/dev/null

    command

    cd ~/Projects/lowmarch-fable52 && grep -n "^## \|^### " docs/portrait-guide.md | head -80; which ffmpeg blender; ls [redacted: private path]/ 2>/dev/null; ls [redacted: private path]/ [redacted: private path]/vroid | head -60; ls [redacted: private path] 2>/dev/null

    result, 85 lines

    8:## Format
    15:## House style (from the FE8 study, 61 portraits)
    46:## Workflow
    60:## Lessons log
    62:### 01 · Rowan (young man), 2026-10-07
    74:### 02 · Head mannequin spike, 2026-10-07
    92:### 03 · Features by angle, 2026-10-07
    114:### 04 · VRoid base, 2026-10-08
    138:### 05 · First costume, 2026-10-08
    153:### 06 · Full figure and review tooling, 2026-10-08
    170:### 07 · High resolution and the armour refit, 2026-10-08
    194:### 08 · Live renderer and cloth, 2026-10-08
    209:### 09 · Painted renderer and battle animation, 2026-10-08
    236:### 10 · Painted renderer tuned to the study, and the costume kit, 2026-10-08
    295:### Milestone · Aldric v9 frozen, 2026-10-08
    316:### 11 · Elaine, and a two-character bind, 2026-10-08
    367:### 12 · Checking what the user sees, 2026-10-08
    417:### 13 · Outline plates, trim and steel that follows the form, 2026-10-08
    519:### 14 · A hair kit, 2026-10-08
    563:### 15 · Common enemies, 2026-10-08
    613:### 16 · MakeHuman bases (test), 2026-10-09
    646:### 17 · VRoid heads on MakeHuman bodies, 2026-10-09
    685:### 18 · The body workshop, after an outside critique, 2026-10-09
    732:### 19 · Sleeves and a polearm guard after the study's soldiers, 2026-10-09
    759:### 20 · Breeches, solid beards, a skirt that hangs, a measured grip and a studied idle, 2026-10-09
    797:### 21 · Base spike, 2026-10-09
    839:### 22 · VRoid Studio driven from WSL, and MakeHuman's mass on a VRoid body, 2026-10-09
    884:### 23 · The armory, and proportions held by code, 2026-10-09
    920:### 24 · Bodies fitted by code, and the faults behind the armory's shoulders, 2026-10-10
    979:### 25 · VRoid bodies shaped by MakeHuman, their own head kept, 2026-10-10
    1046:### 26 · Compare side by side, and heads held in metres, 2026-10-10
    1062:### 27 · Bodies against real people, 2026-10-10
    1101:### 28 · One line, the heroic man and the sexy woman, real hands, spring bones, 2026-10-12
    1147:### 29 · Heads: VRoid's sample faces on our bases, fitted by code, 2026-10-13
    1175:### 30 · Faces as VRoid built them, 2026-10-13
    1198:### 31 · Hair that rests on the body, 2026-10-13
    1227:### 32 · Faces shaded from a simple head shape, 2026-10-30
    1250:### 33 · Hand-placed shadows: under the nose, the chin's on the neck, 2026-10-30
    1265:### 34 · Shadow cards instead of tilted skin, 2026-10-30
    1298:### 35 · The chin's shadow cast in screen space, 2026-10-30
    1318:### 36 · A skin range, people and fantasy, 2026-10-30
    1336:### 37 · Shut eyes shut (from main's 4aa16f2), 2026-10-31
    1351:### 38 · One lash per character (a rule), 2026-10-31
    1380:### 39 · Expressions, after the Yin and Yang rigs (the pass before the benchmark), 2026-10-30
    1417:### 40 · Mouths on every face (the 14-body check), 2026-10-31
    /usr/bin/ffmpeg
    [redacted: private path]
    blender-5.2.3-linux-x64
    dl
    llvm-19.1.7
    llvm-dl
    [redacted: private path]/:
    anthro
    blender-base-meshes
    makehuman
    quaternius
    refs
    refs3d
    study
    tools
    trials
    vroid
    winvroid
    
    [redacted: private path]/vroid:
    avatarsample_d
    avatarsample_e
    avatarsample_f
    avatarsample_g
    base_female
    base_male
    dl
    faces
    hairsample_female
    hairsample_male
    lowmarch_bodies
    sakurada_fumiriya
    samples_2_14
    sendagaya_shino
    armory
    base-spike
    frozen
    mh-workshop
    versions
    vroid-02
  • Bashcd ~/Projects/lowmarch-fable52 && sed -n 209,236p docs/portrait-guide.md; sed -n 316,367p docs/portrait-guide.md; sed -n 1046,1062p docs/portrait-guide.md; sed -n 1227,1250p docs/portrait-guide.md; sed -n 1298,1318p docs/portrait-guide.md

    command

    cd ~/Projects/lowmarch-fable52 && sed -n 209,236p docs/portrait-guide.md; sed -n 316,367p docs/portrait-guide.md; sed -n 1046,1062p docs/portrait-guide.md; sed -n 1227,1250p docs/portrait-guide.md; sed -n 1298,1318p docs/portrait-guide.md

    result, 142 lines

    ### 09 · Painted renderer and battle animation, 2026-10-08
    
    Direction change (user): keep the pixel renderer, and add a renderer aiming at Unicorn Overlord's
    hand-painted look. Unicorn Overlord has no 3D models: Vanillaware paints 2D parts and puppets them.
    So its art is a design study only, and the look comes from our 3D through a painted shader.
    
    - **Painted renderer** (viewer, `PAINT_FS`/`PAINT_COMP`): palette ramps blended softly
      (smoothstep ±0.09 around each band), a key light from the upper left, cool shadows (rosy for
      skin), warm lights, a fresnel rim, metal as a sky/ground reflection plus a highlight streak, a hair
      sheen, object-space brush grain (per material: skin 0.02, hair 0.04, cloth 0.10, ground 0.16),
      coloured outlines (a 2.2 px outer silhouette, interior lines at depth breaks, each a darker
      shade of the colour it borders), and crease darkening from depth.
    - **One rigged character** (`export_glb.export_skinned`): the reference-pose mesh, VRoid skeleton
      with our bone scales, inverse binds, and per-vertex weights for every piece. Clips are
      authored in `tools/clips.py` as a few key poses, finished with `tools/rig.py` (two-bone leg IK,
      `aim` for the sword, `rotate_world`). Poses accept 4×4 adjustments (`poses.move`) for root motion.
    - **Garment weights come from the exact skin they grew from** (`fitting.blend_weights` through
      subdivision). Copying from the nearest skin let one boot take the other leg's bones, and the
      boots stretched into sheets when the legs split.
    - **Export a channel for every bone the clip moves away from the reference pose,** even if it
      then holds still: a held fist has no variation, but without a channel it reverts to the open
      reference hand.
    - three.js shader includes must start a line: `void main() {\n#include <...>`.
    - Cloth on an animated body: hide the skinned cape and read its pinned row with
      `getVertexPosition` each frame; colliders follow bones by name; the simulated copy is a plain mesh
      in world space.
    
    ### 10 · Painted renderer tuned to the study, and the costume kit, 2026-10-08
    ### 11 · Elaine, and a two-character bind, 2026-10-08
    
    The brief (user): a blonde swordswoman like Saber, next to Aldric in the same viewer, locked in a
    sword struggle.
    
    - **Base:** `HairSample_Female` (CC0). `Portrait(hair_trim=0.12)` drops any hair piece that
      reaches past 12 cm from the centreline, which removes the twin tails and their ties. That
      leaves the bangs and side locks.
    - **Costume** (`knight_dress`): `updo` is a bun, a two-strand braid wound round it, a ribbon
      and a flattened, tapering cowlick. With it come a bodice, tights, a breastplate, a closed
      `skirt` (with `drape(closed=True)` and `closed_grid_mesh`), spaulders, gauntlets, greaves and
      `sabaton`s.
      - **Female bases weight the chest to Bust bones.** Include "Bust" in a plate's bone list, or it
        comes out with two holes.
      - **Feet with toes:** a wrap shows the toes, a squashed ellipsoid reads as a triangular hoof
        (the user caught it), and a shell projected onto the convex hull creases. What worked is a
        parametric shoe last from the foot's measurements: rounded heel and toe, widest at the ball,
        rising to the ankle.
      - **`slice_line` cuts each shared edge twice.** Deduplicate before running a pipe along it, or
        the pipe's first tangent is zero.
    - **Proportion scales shear turned limbs.** Scaling the clavicle (`shoulders`) skews the arm
      once it rotates: Aldric's hanging upper arms are about 20% shorter and wider sideways (frozen
      as is). New characters use `shoulder_w`, which moves the arm joints out instead. The rig's
      `ortho` mode rotates through the parent's pure rotation. The duel's grip solve measures the
      real fist after each step (CCD-style), because the analytic arm IK alone undershoots on a
      sheared arm.
    - **The bind** (`tools/duel.py`):
      - **Setup:** one stage, a shared crossing point, and a placement per fighter (position and
        yaw). The player stands on the right, turned 62°.
      - **Grip:** `rig.grip` puts the fist on its target with the blade aimed through the crossing
        point. The blades meet within 1 mm; `review/vroid-02/duel_check.py` prints it.
      - **Stance:** a two-handed fighter's left fist sits 9.5 cm down the grip. A long dress gets a
        short stance.
      - **Motion:** the clip loops a push: the crossing point drifts toward whoever is giving ground.
    - **Viewer:** a character picker and a Duel view; the fighters stand on a stage group that the
      turn slider rotates. The second character's hair gets its own info-pass role id (11), so the
      pixel renderer inks each character's hair in that character's own darkest tone.
    - **Long skirts are posed, not simulated** (`SkirtRig`). A free cloth tube against moving leg
      colliders broke in every variant:
      - pushed out the nearest way, it slipped between the legs;
      - pushed out round the leg, the teleports added energy and the hem flew up;
      - with friction on every iteration, it drifted.
    
      Instead, each column hangs from its waist point at its rest shape and is pushed straight out
      along itself past any leg; rows below a contact hang from it. Segment lengths are kept and the
      pushes are smoothed round the skirt and over time.
    - **Clips can ease in from another clip** (`setClip(name, from)`), so cloth sees the legs move
      rather than jump.
    - **Cloth contacts have friction, applied once per step** (keeping 40% of the speed). Applied
      inside every constraint iteration, it compounded.
    
    ### 12 · Checking what the user sees, 2026-10-08
    ### 26 · Compare side by side, and heads held in metres, 2026-10-10
    
    **Compare** (the armory's default view, replacing its lineup): up to six bodies side by side at real heights,
    posed with arms up, out or down. Two things learned building it:
    - **The bind pose isn't the T-pose:** the exported skeleton's bind pose has the arms down, while the mesh is
      T-posed. Poses are turns from the bind pose about the body's front axis, with the direction read from where
      each hand points, and room is measured on the posed skin, never on the joints.
    - **The page framed figures too high** whenever the top bar was taller than the bottom one: the frame's centre
      used the bars' height difference with its sign flipped. A three-row bar hid raised hands.
    
    **Head sizes:** the user saw the tall woman's head as small, and it was. At 1.9 m and 8.3 heads her head
    was the slender woman's, and VRoid's own tallest adults stop at 7.9 heads. The brute was the opposite: 6 heads
    at 2.09 m is a 35 cm head. Heads tall alone can't catch either, since both passed their ranges. Each body now
    also keeps a head height in metres and a height in the cast's span, and the fitter solves heads tall and height
    together, moving a body only when a range demands it (`fit.head_goal`, `docs/proportions.md`).
    
    ### 27 · Bodies against real people, 2026-10-10
    ### 32 · Faces shaded from a simple head shape, 2026-10-30
    
    **What you asked:** you bought DillonGoo's Yin and Yang anime rigs (personal-use licence: study only, nothing of
    theirs ships). Take their lessons for our faces one step at a time, each shown in the armory at 0°, 35°, 60° and 90°.
    
    **What was built:** `face_normals` in `tools/vroid_portrait.py`, on by default (`face_normals=1.0` in NEUTRAL). The
    face, brows, lines, mouth and skull are shaded from normals that point away from a short vertical line inside the
    head (pulled halfway to its middle), not from the mesh; the neck fades back to its own normals over 3 cm under the
    chin; then 5 rounds of smoothing. It runs when a character is drawn, so the armory's painted renderer, the pixel
    path and the GLB all get it.
    
    **Lessons:**
    - **The blotches were the mesh, not the light.** A VRoid face's normals carry every small bump of the nose, cheek and
      jaw; a cel threshold turns each into a patch that jumps as the head turns. A simple shape behind the face gives one
      clean shadow edge at every angle.
    - **Place the shape for our faces and our light, not the source's.** At the rig's spot (13% of the head's depth in
      front of its middle) a VRoid face, flatter than Yin's, shaded half its front under the armory's key. At the middle
      the front stays lit and only the far jaw and the neck shade.
    - **Not everything wants it.** On hair the same trick flattened the strands into one plastic sheen in the painted
      renderer, so hair keeps its own normals (`hair_normals=0.0`).
    - **Check what a cache key covers before editing a file in it.** `tools/cage.py` keys bodies on this file's source,
      so every edit here rebuilds bodies (two in about two minutes); they came out byte-identical, as they should.
    
    ### 33 · Hand-placed shadows: under the nose, the chin's on the neck, 2026-10-30
    ### 35 · The chin's shadow cast in screen space, 2026-10-30
    
    **What you said:** at angles the chin card still looked wrong; we might need research.
    
    **What the research said:** anime pipelines either paint neck shadows into the texture (Genshin), edit normals and
    shadow thresholds (Guilty Gear Xrd), or cast them in screen space ("depth offset" shadows: Anime Shading Plus,
    Stylized NextGen). They avoid ordinary shadow maps on faces. A painted or card shadow is fixed to the neck, while a
    real chin shadow comes from the jaw's outline and changes as the head turns.
    
    **What was built:** the painted renderer draws its info pass (roles, ids, depth) first. For body skin, the colour
    pass walks from each pixel toward the key light across that [redacted: scan false positive] the face (jaw, chin) or hair stands in front of
    the ray, the pixel drops into the shade band. The chin card is off (`CHIN_CARD`); the nose card stays, since a face
    can't shadow itself this way.
    
    **Lessons:**
    - **A shadow's shape belongs to its caster.** Thrown from the jaw's own outline, the chin's shadow is right at
      every angle with no shape to design.
    - **Unbind what you are about to draw into.** The first version rendered one tile and then black: the info textures
      were still bound for sampling when the next frame drew into them (a WebGL feedback loop).
    
    ### 36 · A skin range, people and fantasy, 2026-10-30
  • Bashcd ~/Projects/lowmarch-fable52 && sed -n 38,80p art/cast/cast.py; cat tools/shots/arm_shoot.py; grep -n "URLSearchParams\|params.get\|qs.get\|location.search" review/vroid-02/index.html | head -40; grep -n "cdn\|unpkg\|jsdelivr\|importmap" review/vroid-02/index.html review/frame/index.html | head

    command

    cd ~/Projects/lowmarch-fable52 && sed -n 38,80p art/cast/cast.py; cat tools/shots/arm_shoot.py; grep -n "URLSearchParams\|params.get\|qs.get\|location.search" review/vroid-02/index.html | head -40; grep -n "cdn\|unpkg\|jsdelivr\|importmap" review/vroid-02/index.html review/frame/index.html | head

    result, 100 lines

    POLEARMS = ("soldier", "soldier_f")                     # classes that hold their weapon in both hands
    
    
    def mob(model, label, costume, build, face, hair="brown", eyes="brown", skin="light", hair_from=None, hair_trim=None,
            beard=None, paint=None, mh=None, hair_style=None, qt=None, mass=None, cage=None, group=None, **shape):
        """A common-enemy cast entry: a base body, a class costume (tools/mobs.py), a build and a face
        (tools/gear.py presets), hair, eye and skin colours, optional facial hair."""
        import gear
        h, e = HAIRS[hair], EYES[eyes]
        colors = dict(MOB_COLORS, A=h[0], B=h[1], C=h[2], D=h[3], E=h[4], r=e[0], s=e[1], t=e[2])
        pnt = dict(MOB_PAINT, hair=h[2])
        if SKINS[skin]:
            pnt["skin"] = SKINS[skin]
        pnt.update(paint or {})
        shape.setdefault("hands", 1.22)
        out = dict(model=model, hair=hair_from, label=label, costume=f"mob_{costume}", shape=gear.shape(build, face, **shape),
                   colors=colors, paint=pnt)
        if costume in POLEARMS:                      # both hands on the weapon (tools/clips.py polearm)
            out["stance"] = "polearm"
        if hair_trim is not None:
            out["hair_trim"] = hair_trim
        if beard:
            out["beard"] = beard
        if mh:                                       # a MakeHuman body (tools/makehuman.py): its own build; the face
            shape.setdefault("curl", 28.0)           # preset needs a VRoid head; relaxed hands, not paddles
            out.update(mh=mh, shape=gear.shape("average", face, **shape) if mh.get("head") else dict(shape))
        if group:                                    # a section of a long roster's character list (the viewer)
            out["group"] = group
        if mass:                                     # a VRoid model with MakeHuman's muscle and weight (tools/mass.py)
            out["mass"] = mass
        if cage:                                     # a VRoid model reshaped whole, its own head kept (tools/cage.py)
            out["cage"] = cage
        if qt:                                       # a Quaternius body (tools/quaternius.py, base spike): its own head
            shape.setdefault("curl", 28.0)
            out.update(qt=qt, shape=dict(shape))
        if hair_style:
            out["hair_style"] = hair_style
        return out
    
    
    # MakeHuman bodies (test, 2026-10-08/09): macro sliders 0..1 (g: 0 female 1 male; age 0.5 = 25 years,
    # 1 = 90; muscle, weight, height, proportions) and named targets -1..1. The head is a VRoid model's
    # (head=..., tools/makehuman.py graft()), so the face stays anime and the face presets (gear.FACES) work.
    """Shoot armory sheets from a patched copy of the built page with headless Chromium (as review/vroid-02/sheets.py).
    
      python3 arm_shoot.py SITE_DIR OUT_DIR NAME [NAME...]
    """
    import base64
    import os
    import re
    import socket
    import subprocess
    import sys
    import time
    
    site, out, names = sys.argv[1], sys.argv[2], sys.argv[3:]
    os.makedirs(out, exist_ok=True)
    s = socket.socket()
    s.bind(("127.0.0.1", 0))
    port = s.getsockname()[1]
    s.close()
    server = subprocess.Popen([sys.executable, "-m", "http.server", str(port), "--bind", "127.0.0.1", "--directory", site],
                              stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
    try:
        time.sleep(0.5)
        for name in names:
            t0 = time.time()
            r = subprocess.run([os.environ.get("CHROMIUM", "/snap/bin/chromium"), *os.environ.get("CHROMIUM_FLAGS", "").split(),
                                "--headless=new", "--use-angle=swiftshader", "--enable-unsafe-swiftshader",
                                "--ignore-gpu-blocklist", "--window-size=1280,900", "--virtual-time-budget=600000",
                                "--dump-dom", f"http://127.0.0.1:{port}/index.html?sheet={name}&rows={os.environ.get('ROWS', '0,1')}&scale=2{os.environ.get('EXTRA', '')}"],
                               capture_output=True, text=True, timeout=900)
            m = re.search(r'id="sheetOut"[^>]*>[redacted: data-URI prefix]([A-Za-z0-9+/=]+)<', r.stdout)
            if not m:
                err = re.search(r'id="sheetOut"[^>]*>([^<]*)<', r.stdout)
                print(name, "FAILED", err.group(1)[:300] if err else r.stderr[-800:])
                continue
            p = os.path.join(out, f"painted_{name}.png")
            open(p, "wb").write(base64.b64decode(m.group(1)))
            print(name, p, f"{time.time() - t0:.0f}s")
    finally:
        server.terminate()
    229:const params = new URLSearchParams(location.search);
    230:const SHEET = params.get("sheet");                    // a character's name, or "duel": render a check sheet
    274:    if (PAGE.skins.some(s => s.name === params.get("skin"))) state.skin = params.get("skin");    // ?skin=<tone>
    279:  if (["still", "bounce", "twist"].includes(params.get("motion"))) state.motion = params.get("motion");
    280:  state.compare = (params.get("compare") || "").split(",").filter(n => charDef(n)).slice(0, MAX_COMPARE);
    282:  if (["up", "out", "down"].includes(params.get("pose"))) state.pose = params.get("pose");
    1514:  if (params.get("mode") === "3d") state.mode = "3d";      // ?mode=3d: the plain 3D renderer (tells a geometry fault from a shading one)
    1519:  const keep = (params.get("rows") || "").split(",").filter(Boolean).map(Number);
    1520:  const scale = Math.max(1, Math.min(4, +(params.get("scale") || 1)));
    1729:  const v0 = params.get("view"), w0 = params.get("who"), m0 = params.get("mode");
    1733:  await setView(views.includes(v0) ? v0 : ARMORY_PAGE ? "compare" : NO_DUEL ? "lineup" : "duel", params.get("clip") || undefined);
    1734:  if (params.has("yaw")) setYaw(+params.get("yaw") || 0);      // ?yaw=180: open turned (the backs)
    review/frame/index.html:8:<script type="importmap">
    review/frame/index.html:9:{ "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js",
    review/frame/index.html:10:               "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/" } }
    review/vroid-02/index.html:218:<script type="importmap">
    review/vroid-02/index.html:219:{ "imports": { "three": "https://cdn.jsdelivr.net/npm/three@0.160.0/build/three.module.js",
    review/vroid-02/index.html:220:               "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.160.0/examples/jsm/" } }