nx_skullskin.nx
buildroot/runtime/nx_skullskin.nx
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
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
structs
| none |
consts
| 20 | const SKN_EXIT_USAGE: i64 = 2 |
| 21 | const SKN_EXIT_CONF: i64 = 3 |
| 22 | const SKN_EXIT_SKULL: i64 = 4 |
| 23 | const SKN_EXIT_LOCATE: i64 = 5 |
| 24 | const SKN_EXIT_WRITE: i64 = 6 |
| 25 | const SKN_ARGC_MIN: i64 = 4 |
| 26 | const SKN_W: i64 = 512 // the frame nx_sdfrender renders the results boards at (W 512, H 384) |
| 27 | const SKN_H: i64 = 384 |
| 28 | const SKN_YAW_THREEQUARTER: i64 = 2145 // thirty degrees in rad*4096, the results lane's three-quarter view |
| 29 | const SKN_ROBUST_DEFAULT: i64 = 500 |
| 30 | const SKN_CELL_UM_DEFAULT: i64 = 2000 // 2 mm cells: nx_skullsdf's measured resolution floor (G 160..319 all yield cell 2) |
| 31 | const SKN_EQ: i64 = 61 |
| 32 | const SKN_COMMA: i64 = 44 |
| 33 | const SKN_PATHB: i64 = 512 |
| 34 | const SKN_KEY_CAP: i64 = 64 |
| 35 | const SKN_I64: i64 = 8 |
functions
| 39 | func skn_puts(s: *u8) -> i64 { return tfl_puts(s) } |
| 40 | func skn_kv(k: *u8, v: i64) -> i64 { return tfl_kv(k, v) } |
| 41 | func skn_ms() -> i64 { return sys_now_ms() - SKN_T0 } |
| 43 | func skn_arg(argc: i64, argv: *i64, from: i64, key: *u8) -> *u8 |
| 56 | func skn_argn(argc: i64, argv: *i64, from: i64, key: *u8, dflt: i64) -> i64 |
| 62 | func skn_rgb(s: *u8) -> i64 |
| 83 | func skn_render_to(fb: *i64, prefix: *u8, suffix: *u8, w: i64, h: i64) -> i64 |
| 91 | func skn_scene(which: i64, M: *i64, S: *i64, T: *i64, tilt10: i64, skin_col: i64, eyes_out: *i64, nose_out: *i64) -> i64 |
| 107 | func main(argc: i64, argv: *i64) -> i64 |