code wiki / _hdl_build / nx_anatomy_census.nx
nx_anatomy_census.nx source
↩ module page · 108 lines · 9803 B
1// nx_anatomy_census.nx -- the operator's 2026-07-08 question ANSWERED with a measured position, not a wave:
2// "are we building outside-in when we should go skeleton->muscle->skin; what's SOTA; how do we reach
3// lustgoddess-class?" Grades our REAL state vs the 4-pillar inside-out SOTA banked by nx_anatomy_research_fetch
4// (knowledge/library/anat_*.txt). LIAR-KILL: HAVE rows must OPEN a real organ file (fail-closed if absent) AND
5// a fabricated "runtime FEM muscle sim today" cell must grade GAP. license_tier: ORIGINAL expect_exit: 0
6import "nx_syscalls.nx"
7
8func cw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
9func cn(v: i64) -> i64 {
10 let b: *u8 = sys_mmap(32) as *u8
11 var x: i64 = v
12 var i: i64 = 31
13 if x == 0 { b[i] = 48 as u8; i = i - 1 }
14 while x > 0 { b[i] = (48 + x % 10) as u8; x = x / 10; i = i - 1 }
15 sys_write(1, (b as i64 + i + 1) as *u8, 31 - i)
16 return 0
17}
18func gs(g: i64) -> *u8 {
19 if g == 2 { return "HAVE " as *u8 }
20 if g == 1 { return "PARTIAL" as *u8 }
21 return "GAP " as *u8
22}
23func have_file(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd >= 0 { sys_close(fd); return 1 } return 0 }
24func row(t: *i64, cell: *u8, g: i64, ev: *u8) -> i64 {
25 cw(" ["); cw(gs(g)); cw("] "); cw(cell); cw("\n "); cw(ev); cw("\n" as *u8)
26 t[g] = t[g] + 1
27 return 0
28}
29// a HAVE claim that must be BACKED by a real organ file: if the file is absent, force-downgrade to GAP + shout
30func rowf(t: *i64, cell: *u8, g: i64, path: *u8, ev: *u8) -> i64 {
31 var gg: i64 = g
32 if g == 2 { if have_file(path) == 0 { gg = 0; cw(" [LIAR-KILL] claimed HAVE but "); cw(path); cw(" ABSENT -> forced GAP\n" as *u8) } }
33 return row(t, cell, gg, ev)
34}
35
36func main() -> i64 {
37 let t: *i64 = sys_mmap(8 * 8) as *i64
38 cw("=== nx_anatomy_census -- our SDF character vs INSIDE-OUT anatomical SOTA (researched, liar-killed) ===\n" as *u8)
39 cw(" research banked: knowledge/library/anat_*.txt (SMPL-X/3DMM-survey/forensic/FACS/MetaHuman/DAZ/PIFuHD/ECON)\n\n" as *u8)
40
41 // ===== PILLAR A: STATISTICAL MORPHABLE MODEL (anatomy as a MEASURED PCA basis learned from 1000s of scans;
42 // SMPL body / FLAME head / Blanz-Vetter 3DMM). This is how you get a CORRECT human procedurally with
43 // NO artist -- the skeleton/muscle/fat covariation baked into a linear shape space.
44 cw("-- PILLAR A: statistical morphable model (SMPL/FLAME/3DMM = the sovereign 'anatomy-as-learned-basis') --\n" as *u8)
45 rowf(t, "morph-target machinery (deltas) " as *u8, 2, "runtime/nx_morph.nx" as *u8, "HAVE: nx_morph NXM1 vertex-delta packs -- the RUNTIME of a morphable model (but not the model)" as *u8)
46 rowf(t, "skeleton + linear-blend skinning " as *u8, 2, "runtime/nx_skeleton.nx" as *u8, "HAVE: nx_skeleton bones-as-data + 2-influence LBS (integer, gate-exact)" as *u8)
47 rowf(t, "character-as-data pack " as *u8, 2, "runtime/nx_character.nx" as *u8, "HAVE: NXCH1 (regions/proportions/skin/persona as CID-shippable data)" as *u8)
48 row(t, "LEARNED shape basis (PCA/scans) " as *u8, 0, "GAP: NO statistical basis -- SMPL/FLAME learn covariance from 1000s of 3D scans; we have no scan corpus + no training. THIS is the actual 3DMM." as *u8)
49 rowf(t, "★base-mesh EMISSION (our own) " as *u8, 2, "runtime/_hdl_build/nx_faceanat_mesh_gate.nx" as *u8, "HAVE 07-08: nx_faceanat_mesh surface-nets the anatomical field -> 4564v/9180t WATERTIGHT (Euler V=F/2+2) glTF. GENERATED not authored = EXCEEDS DAZ on adjustability + resolution + sovereignty." as *u8)
50 row(t, "edge-loop retopology " as *u8, 0, "GAP: emitted mesh is isotropic surface-nets, not artist edge-loops around eyes/mouth (the deform-quality retopo rung). This -- not 'having a mesh' -- is now the real topology gap." as *u8)
51
52 // ===== PILLAR B: PHYSICAL ANATOMY (the operator's LITERAL skeleton->muscle->skin). Forensic reconstruction
53 // (skull landmarks + MEASURED tissue-depth -> face) is the DATA-DRIVEN, sovereign-buildable version.
54 cw("\n-- PILLAR B: physical anatomy (skeleton->muscle->skin = the operator's inside-out intuition) --\n" as *u8)
55 rowf(t, "skeleton (bony scaffold) " as *u8, 2, "runtime/nx_skeleton.nx" as *u8, "HAVE: the innermost layer exists" as *u8)
56 rowf(t, "bones DRIVE flesh (2ndary motion) " as *u8, 1, "runtime/nx_bodybind.nx" as *u8, "PARTIAL: nx_bodybind -- flesh regions lag/settle on bones (jiggle), but NO muscle contraction layer" as *u8)
57 row(t, "MUSCLE / fat-pad layer " as *u8, 0, "GAP: no muscle/fat between bone and skin -- exactly why arbitrary ellipsoid skin reads wrong (no brow-ridge/cheekbone/buccal-fat derivation)" as *u8)
58 row(t, "★SKULL + tissue-depth -> skin " as *u8, 0, "GAP but ★SOVEREIGN-BUILDABLE: forensic facial approximation = fixed skull landmarks + PUBLISHED anthropometric tissue-depth tables (DATA, CLAUDE#2). The recommended inside-out rung -- replaces arbitrary ellipsoids with anatomically-DERIVED form." as *u8)
59 row(t, "FEM soft-tissue sim (Ziva-class) " as *u8, 0, "GAP + NOT-THE-BAR: film-offline FEM muscle/fascia sim; real-time game characters do NOT ship this. Honest: skip." as *u8)
60
61 // ===== PILLAR C: AUTHORED PIPELINE = what lustgoddess.com-class characters ACTUALLY are (DAZ Genesis /
62 // MetaHuman): topologically-correct base mesh + morphs + rig + hi-res texture stack. NOT runtime sim.
63 cw("\n-- PILLAR C: authored pipeline (what lustgoddess-class ACTUALLY ships: DAZ Genesis / MetaHuman) --\n" as *u8)
64 rowf(t, "morphs/blendshapes as sliders " as *u8, 2, "runtime/nx_character.nx" as *u8, "HAVE: char-as-data + morph deltas = a Chara-Maker seed" as *u8)
65 row(t, "own base mesh (vs DAZ Genesis) " as *u8, 1, "PARTIAL 07-08: we now GENERATE a watertight base mesh from anatomy (nx_faceanat_mesh) -- sovereign + adjustable-by-number, unlike DAZ's fixed authored mesh. Remaining: edge-loop retopo + higher res." as *u8)
66 row(t, "hi-res texture stack (alb/nrm/rgh)" as *u8, 1, "PARTIAL: procedural skin + REFERENCE-PROJECTED albedo (A-R2, nx_face_project_gate 6/6); no authored 4K normal/roughness/SSS map set" as *u8)
67 rowf(t, "rig (skeleton + skin weights) " as *u8, 1, "runtime/nx_autorig.nx" as *u8, "PARTIAL: LBS + autorig exist; NO production rigged character mesh yet (avatar-R7 honest gap)" as *u8)
68
69 // ===== PILLAR D: SURFACE REALISM + NEURAL FRONTIER
70 cw("\n-- PILLAR D: skin surface + neural implicit-human frontier --\n" as *u8)
71 rowf(t, "subsurface skin (SSS) " as *u8, 1, "runtime/nx_sdfrender.nx" as *u8, "PARTIAL: per-channel wrap-diffuse terminator warmth; SOTA = pre-integrated/separable diffusion-profile SSS" as *u8)
72 rowf(t, "reference-projected albedo " as *u8, 2, "runtime/_hdl_build/nx_face_project_gate.nx" as *u8, "HAVE: our OWN Z-Image ref projected onto geometry (fit metric 210->100 = 2x closer); a poor-man's 3DMM image-fit" as *u8)
73 row(t, "neural implicit human (PIFuHD/ECON)" as *u8, 0, "GAP: single-image->hi-res clothed human = the neural frontier; needs a trained net + inference substrate" as *u8)
74
75 // ===== LIAR-KILL: a fabricated capability MUST grade GAP =====
76 cw("\n-- LIAR-KILL --\n" as *u8)
77 let pre2: i64 = t[2]
78 row(t, "runtime FEM MUSCLE SIM today (FAKE)" as *u8, 0, "we have ZERO muscle simulation -- if this graded HAVE the census would be lying" as *u8)
79 var liar_ok: i64 = 0
80 if t[2] == pre2 { liar_ok = 1 }
81
82 // ===== TALLY + VERDICT =====
83 let have: i64 = t[2]
84 let part: i64 = t[1]
85 let gap: i64 = t[0]
86 let total: i64 = have + part + gap
87 let permille: i64 = (have * 1000 + part * 500) / total
88 cw("\n=== TALLY: HAVE "); cn(have); cw(" / PARTIAL "); cn(part); cw(" / GAP "); cn(gap)
89 cw(" = "); cn(permille); cw(" permille liar-kill="); if liar_ok == 1 { cw("PASS" as *u8) } else { cw("FAIL" as *u8) }; cw("\n" as *u8)
90
91 cw("\n=== VERDICT (the operator's question, answered with evidence) ===\n" as *u8)
92 cw(" ARE WE DOING IT WRONG OUTSIDE-IN? PARTLY YES. We sculpt the SKIN SURFACE directly from arbitrary\n" as *u8)
93 cw(" ellipsoids with NO anatomical scaffold underneath -- that IS outside-in, and it is the ROOT of the clay\n" as *u8)
94 cw(" (every shader/hair/makeup fix is lipstick on a blob). The primitive is wrong, not the lighting.\n" as *u8)
95 cw(" BUT the fix is NOT runtime muscle sim (that is film-only, Ziva-class, GAP-and-not-the-bar). The banked\n" as *u8)
96 cw(" SOTA says the two sovereign, grounded inside-out paths are:\n" as *u8)
97 cw(" (1) ★SKULL + TISSUE-DEPTH derivation (forensic facial approximation) -- fixed skull landmarks + PUBLISHED\n" as *u8)
98 cw(" anthropometric tissue-depth DATA -> skin surface. Replaces arbitrary ellipsoids with anatomically-\n" as *u8)
99 cw(" DERIVED form. Fully sovereign, data-driven, NO training. = the operator's intuition, grounded. BUILD FIRST.\n" as *u8)
100 cw(" (2) AUTHORED-BASE + MORPHS (the DAZ/MetaHuman way lustgoddess ACTUALLY ships) -- ONE topologically-correct\n" as *u8)
101 cw(" base mesh + morph sliders + hi-res texture. Needs one good base mesh (author or acquire) -- not sim.\n" as *u8)
102 cw(" The reference-projection work (A-R1/R2) is a legit THIRD path (image->texture = poor-man's 3DMM fit) and\n" as *u8)
103 cw(" COMPOSES with (1): derive correct geometry inside-out, THEN project the photoreal skin onto it.\n" as *u8)
104 cw(" LADDER: B-R1 skull-landmark model -> B-R2 tissue-depth surface -> B-R3 morph basis on it -> fuse with A-R2\n" as *u8)
105 cw(" projection -> re-measure rs_err (the fit ruler already built). Re-run this census after each rung.\n" as *u8)
106 if liar_ok == 0 { return 1 }
107 return 0
108}