code wiki / (root) / nx_skullskin.nx

nx_skullskin.nx

buildroot/runtime/nx_skullskin.nx

13462 B227 linesdepth 5pulls 11 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_skullskin.nx -- FROM THE GENERATED SKULL TO A SKIN THAT SITS ON IT, RENDERED (aesthetictwin AT46, 2026-09-18). Composes nx_skullsdf (the skull as a fused shell, run as a child or supplied as a mesh) -> nx_tissuefield_lib (landmarks located on the skull, the forensic tissue-depth field, controllable fat compartments, the offset skin, the eye, nose and vermilion patches) -> nx_trimesh (the rasteriser) -> nx_png. Emits the skin as NXMSH2 (for nx_facemark) and five renders: skin close, skin three-quarter, skull close, skull|skin side by side, and a cutaway (the subject's left half of the skin removed so the skull shows under it). Every derived number is printed on the receipt with its inputs. nx_skullskin <sex 0-1000> <seed> <out.nxmesh> [key=value ...] keys: skull=<in.nxmesh> (else ./nx_skullsdf.elf is run from the estate root with cell=2000 um) conf=<path> (default knowledge/tissue_depth.conf) png=<prefix> (default the out path without .nxmesh) malar=<mm10> nasolabial=<mm10> jowl=<mm10> (compartment magnitudes; the conf rows are the defaults) tilt=<deg10> (canthal tilt of the fissure almond; 0 = the canon) robust=<0-1000> cell=<um> skin=<r,g,b> seed is RESERVED for the identity layer (the skull generator takes sex and robust; announced, never silently ignored) exit: 0 built | 2 usage | 3 conf unreadable | 4 skull unavailable | 5 landmarks refused | 6 mesh write refused license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_tissuefield_lib.nx nx_skullskin.nx

imports: nx_syscalls.nxnx_tissuefield_lib.nx

imported by: nobody (leaf or entry point)

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

main sys_now_ms 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_clock_gettime_mono skn_puts tfl_puts sys_write ↻ tfl_atoi skn_arg tfl_slen tfl_tab_new sys_mmap ↻ tfl_conf_load sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close tfl_split tfl_has tfl_slen ↻ tfl_streq tfl_row

structs

none

consts

20const SKN_EXIT_USAGE: i64 = 2
21const SKN_EXIT_CONF: i64 = 3
22const SKN_EXIT_SKULL: i64 = 4
23const SKN_EXIT_LOCATE: i64 = 5
24const SKN_EXIT_WRITE: i64 = 6
25const SKN_ARGC_MIN: i64 = 4
26const SKN_W: i64 = 512 // the frame nx_sdfrender renders the results boards at (W 512, H 384)
27const SKN_H: i64 = 384
28const SKN_YAW_THREEQUARTER: i64 = 2145 // thirty degrees in rad*4096, the results lane's three-quarter view
29const SKN_ROBUST_DEFAULT: i64 = 500
30const SKN_CELL_UM_DEFAULT: i64 = 2000 // 2 mm cells: nx_skullsdf's measured resolution floor (G 160..319 all yield cell 2)
31const SKN_EQ: i64 = 61
32const SKN_COMMA: i64 = 44
33const SKN_PATHB: i64 = 512
34const SKN_KEY_CAP: i64 = 64
35const SKN_I64: i64 = 8

functions

39func skn_puts(s: *u8) -> i64 { return tfl_puts(s) }
called by 1: main calls 1: tfl_puts
40func skn_kv(k: *u8, v: i64) -> i64 { return tfl_kv(k, v) }
called by 1: main calls 1: tfl_kv
41func skn_ms() -> i64 { return sys_now_ms() - SKN_T0 }
called by 1: main calls 1: sys_now_ms
43func skn_arg(argc: i64, argv: *i64, from: i64, key: *u8) -> *u8
called by 2: skn_argnmain calls 1: tfl_slen
56func skn_argn(argc: i64, argv: *i64, from: i64, key: *u8, dflt: i64) -> i64
called by 1: main calls 2: skn_argtfl_atoi
62func skn_rgb(s: *u8) -> i64
called by 1: main calls 3: tfl_slensys_mmaptfl_atoi
83func skn_render_to(fb: *i64, prefix: *u8, suffix: *u8, w: i64, h: i64) -> i64
called by 1: main calls 2: sys_mmaptfl_cat
91func skn_scene(which: i64, M: *i64, S: *i64, T: *i64, tilt10: i64, skin_col: i64, eyes_out: *i64, nose_out: *i64) -> i64
107func main(argc: i64, argv: *i64) -> i64