code wiki / (root) / nx_nxa_morf.nx

nx_nxa_morf.nx

buildroot/runtime/nx_nxa_morf.nx

33849 B782 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind tooltopic nxa
docsdependenciesstructsconstsfunctions

about

nx_nxa_morf.nx -- WRITE THE FACE AND MORF SECTIONS: the addressable face region and the expression morph basis, both DERIVED FROM THE ASSET'S OWN GEOMETRY and carried inside it. THE MEASURED GAP THIS CLOSES. nx_asset_floor_gate scores the shipped character 5/7 and prints face geometry (FACE) -- we PAINT the face from ratios instead: ABSENT -- gap to the floor blend shapes / morph targets (MORF) -- no expressions without these: ABSENT -- gap to the floor Those two report lines ARE the spec: the gate asks whether a section with that tag is present. But the same gate carries the law that makes a bare tag worthless: PRESENCE OF A SECTION IS NOT PRESENCE OF THE CAPABILITY. So this organ never writes an empty section. FACE carries the real vertex membership of the head region and MORF carries a per-vertex displacement for every channel, with an evaluation verb that proves the deltas actually move geometry. WHY THE DELTAS ARE DERIVED AND NOT IMPORTED. Full-population measurement of every authored source the estate can reach: 4 of 4 Fab FBX donors: 0 BlendShape, 0 BlendShapeChannel deformers 3 of 3 glTF donors: 0 targets, 0 targetNames, 0 weights seed-san.vrm: DOES carry targetNames (VRoid authors expression morphs) The VRM morphs are indexed against the VRM's OWN topology. This character is our procedural nishi being with a different vertex count and a different order, so copying those deltas onto it would be FABRICATION wearing a measurement's clothes. The honest source for OUR mesh is the estate's OWN parametric basis: nx_faceanat already derives a face from the anthropometric canons and exposes faceanat_morph_width / _length / _jaw / _eyes / _lips / _nose / _cheek. Those SEVEN channels are the target set here -- taken from our own canon work, not invented names, and not another project's vertex deltas. 2026-08-23 RUNG 2 -- THE CHANNEL SET IS NOW DATA. The first version hardcoded SEVEN channels from nx_faceanat's canon morphs. Seven against a best-of-breed MetaHuman LOD0 (669 blendshapes AND joints) is roughly 95x, the largest single gap on the board. The channel table now lives in knowledge/facs_au.conf and is ADOPTED from Apple ARKit's published ARFaceAnchor.BlendShapeLocation vocabulary -- MEASURED from a hash-pinned mirror, not quoted from memory. Adding an action is a data edit; this organ's logic never names a channel. NO PICKED NUMBERS. The head band is nx_headcrop's measured band (it OWNS that number; this organ cites it). Every sub-band boundary is a facial canon nx_faceanat already encodes: the RULE OF THIRDS (hairline-brow-subnasale-chin, equal) and the RULE OF FIFTHS (face width is five eye-widths, the nose occupying the central fifth). Every anchor is a centroid MEASURED from the asset. The stature axis is DERIVED as the largest extent, never assumed. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_nxa.nx nx_morf_eval_core.nx nx_nxa_morf_admit.nx nx_nxa_texc_lib.nx nx_nxa_morf.nx

imports: nx_syscalls.nxnx_nxa.nxnx_morf_eval_core.nxnx_nxa_morf_admit.nxnx_nxa_texc_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main mf_usage nt_err sys_write nt_slen sys_exit nt_tageq mf_derive sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nt_err ↻ nt_rd64 nxa_magic mf_sec nt_tageq ↻ nt_rd64 ↻ mf_rdv nt_rd64 ↻ mf_load_au sys_mmap ↻

structs

none

consts

46const MF_OK: i64 = 0
47const MF_E_IO: i64 = 1
48const MF_E_USAGE: i64 = 2
49const MF_E_BAD: i64 = 3
50const MF_E_NOSEC: i64 = 4
56const MF_I64_MAX: i64 = 9223372036854775807
57const MF_UNIT: i64 = 1000
58const MF_W: i64 = 8
59const MF_VSTRIDE: i64 = 3
60const MF_DSTRIDE: i64 = 3
61const MF_FACE_HDR: i64 = 4
62const MF_MORF_HDR: i64 = 4
63const MF_CHANREC: i64 = 2
64const MF_AXES: i64 = 3
70const MF_HEAD_LO_PERMIL: i64 = 870
71const MF_HEAD_HI_PERMIL: i64 = 1000
72const MF_THIRDS: i64 = 3
73const MF_FIFTHS: i64 = 5
74const MF_FIFTH_CENTRAL: i64 = 2
77const MF_AUCONF: *u8 = "knowledge/facs_au.conf"
78const MF_AUREC: i64 = 8
79const MF_A_TAG: i64 = 0
80const MF_A_VLO: i64 = 1
81const MF_A_VHI: i64 = 2
82const MF_A_HLO: i64 = 3
83const MF_A_HHI: i64 = 4
84const MF_A_SIDE: i64 = 5
85const MF_A_AXIS: i64 = 6
86const MF_A_SIGN: i64 = 7
90const MF_AUCAP: i64 = 1024
91const MF_AXIS_LAT: i64 = 0
92const MF_AXIS_DEP: i64 = 1
93const MF_AXIS_STAT: i64 = 2
94const MF_SIDE_BOTH: i64 = 0
95const MF_SIDE_L: i64 = 1
96const MF_ASCII_NL: i64 = 10
97const MF_ASCII_PIPE: i64 = 124
98const MF_ASCII_MINUS: i64 = 45
99const MF_ASCII_A: i64 = 97
100const MF_ASCII_U: i64 = 117

functions

103func mf_field(b: *u8, s: i64, e: i64, k: i64, out: *i64) -> i64
121func mf_int_at(b: *u8, s: i64, e: i64) -> i64
136func mf_tag_at(b: *u8, s: i64) -> i64
called by 1: mf_load_au
141func mf_load_au(rec: *i64) -> i64
183func mf_load_frontprobe(fp: *i64) -> i64
219func mf_in_au(rec: *i64, a: i64, vnorm: i64, hnorm: i64, sidebit: i64) -> i64
called by 1: mf_derive
233func mf_falloff(rec: *i64, a: i64, vnorm: i64, hnorm: i64) -> i64
called by 1: mf_derive
257func mf_rdv(b: *u8, vo: i64, i: i64, a: i64) -> i64
called by 1: mf_derive calls 1: nt_rd64
261func mf_usage() -> i64
called by 1: main calls 1: nt_err
272func mf_spec(s: *u8, chan: *i64, w: *i64) -> i64
312func mf_sec(b: *u8, ns: i64, t: *u8) -> i64
321func mf_sec_idx(b: *u8, ns: i64, t: *u8) -> i64
334func mf_derive(inp: *u8, outp: *u8) -> i64
689func mf_eval(inp: *u8, chan: i64, wpermil: i64, outp: *u8) -> i64
756func main(argc: i64, argv: *i64) -> i64