code wiki / (root) / nx_faceanat.nx

nx_faceanat.nx

buildroot/runtime/nx_faceanat.nx

10639 B154 linesdepth 3pulls 4 transitivereach 14 importersview sourcekind librarytopic faceanat
docsdependenciesstructsconstsfunctions

about

nx_faceanat.nx -- ★INSIDE-OUT face (operator 2026-07-08: "get the skeleton then muscles then skin, not outside-in"; nx_anatomy_census verdict: build the SKULL+TISSUE-DEPTH rung FIRST). Instead of placing ellipsoids by eyeball, DERIVE the face: (1) POSITIONS from the anthropometric FACIAL CANONS -- rule of THIRDS (hairline->brow->subnasale->chin, equal) + rule of FIFTHS (face width = 5 eye-widths; eyes are fifths 2 & 4; nose = 1 fifth; mouth ~1.5 eye-widths). (2) Z-RELIEF from FORENSIC SOFT-TISSUE-DEPTH tables (Rhine/De Greef-class, adult female, mm): the skin sits proud of the bony skull by a MEASURED amount per landmark -- brow ridge proud, nasal root shallow, cheekbone proud, temple recessed. = anatomically DERIVED form, not sculpted. Fills the SAME nx_sdfrender arena as sdf_face (parts/mats/ops/blend) so it renders + PROJECTS + is measured by the identical pipeline (the shared eye-line@178 / mouth@-390 frame keeps the A-R2 projection constants valid). license_tier: ORIGINAL (data-driven per CLAUDE #2/#11: every number is a canon ratio or a tissue-depth value)

dependencies 2 imports · 12 importers

nx_syscalls.nx nx_sdfrender.nx nx_faceanat.nx nx_faceanat_gate.nx nx_faceanat_hires_gate.nx nx_faceanat_mesh_gate.nx nx_faceanat_morph_gate.nx nx_faceanat_stereo_gate.nx nx_faceanat_texbake_gate.nx nx_faceprofile_gate.nx nx_gsplat_aniso_gate.nx nx_gsplat_face_gate.nx nx_gsplat_photofit_gate.nx

diagram shows first 10 each side; +0 more imports, +2 more importers in the complete lists below.

imports: nx_syscalls.nxnx_sdfrender.nx

imported by: nx_faceanat_gate.nxnx_faceanat_hires_gate.nxnx_faceanat_mesh_gate.nxnx_faceanat_morph_gate.nxnx_faceanat_stereo_gate.nxnx_faceanat_texbake_gate.nxnx_faceprofile_gate.nxnx_gsplat_aniso_gate.nxnx_gsplat_face_gate.nxnx_gsplat_photofit_gate.nxnx_gsplat_showcase.nxnx_persongen.nx

structs

none

consts

18const MMU: i64 = 35

functions

25func fa_tissue_z(base_z: i64, depth_mm10: i64) -> i64 { return base_z - depth_mm10 * MMU / 100 } // proud toward -z (camera); mm*10 in
called by 1: faceanat_build
27func faceanat_build(base: i64) -> i64
103func faceanat_scale(base: i64, pct: i64) -> i64
called by 1: main
117func fa_scale(base: i64, idx: i64, field: i64, pct: i64) -> i64
124func faceanat_morph_width(base: i64, pct: i64) -> i64
132func faceanat_morph_length(base: i64, pct: i64) -> i64
140func faceanat_morph_jaw(base: i64, pct: i64) -> i64 { fa_scale(base,2,3,pct); fa_scale(base,3,3,pct); return 0 }
142func faceanat_morph_eyes(base: i64, pct: i64) -> i64
called by 2: build_idpersongen_build calls 1: fa_scale
150func faceanat_morph_lips(base: i64, pct: i64) -> i64 { fa_scale(base,10,4,pct); fa_scale(base,11,4,pct); return 0 }
called by 2: build_idpersongen_build calls 1: fa_scale
152func faceanat_morph_nose(base: i64, pct: i64) -> i64 { fa_scale(base,4,4,pct); fa_scale(base,5,4,pct); return 0 }
called by 1: persongen_build calls 1: fa_scale
154func faceanat_morph_cheek(base: i64, pct: i64) -> i64 { fa_scale(base,6,5,pct); fa_scale(base,7,5,pct); return 0 }
called by 2: build_idpersongen_build calls 1: fa_scale