nx_arousal_mesh.nx
buildroot/runtime/nx_arousal_mesh.nx
about
nx_arousal_mesh.nx -- arousal on a real TRIANGLE MESH, not a raymarched implicit surface.
★ADOPTION, NOT INVENTION. The implicit->explicit bridge already existed and this lane was
raymarching around it: nx_isosurf's surface_nets polygonizes any SDF into the nx_trimesh buffers,
and nx_trimesh is a real rasterizer with sun direction, specular, texture and BAKED SHADOWS -- none
of which a hand-rolled sphere-tracer has. nx_isosurf's own gate comment says it exists to
"polygonize the holistic BEING's skin SDF -> a real triangle mesh".
★THE PHYSIOLOGY RIDES ON VERTEX COLOUR: after polygonization every vertex is evaluated through
sk_eval_at at its own world position, so the flush field is Gouraud-interpolated across real
triangles instead of being computed per-screen-pixel. Same optics, better substrate -- and the
identical path an IMPORTED scan mesh takes, so nothing here is throwaway.
⚠HONEST LIMIT: surface-nets of the 44-ellipsoid rig yields a triangle mesh OF THAT RIG. This
changes the renderer and the shading substrate, NOT the underlying form. The blob silhouette
survives polygonization. Only a correct base mesh (nx_obj_import, gated 14/14) removes it.
usage: nx_arousal_mesh <out.png> <sex0m1f> <drive_permil> <melanin_permil> [cell_fx]
license_tier: ORIGINAL expect_exit: 0
dependencies 5 imports · 0 importers
imports: nx_arousal_skin_lib.nxnx_body_figure.nxnx_isosurf.nxnx_doc_layout.nxnx_png_write.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
| 25 | const AM_MAGIC_185000: i64 = 185000 |
| 26 | const AM_MAGIC_210000: i64 = 210000 |
| 27 | const AM_MAGIC_1520: i64 = 1520 |
| 28 | const AM_MAGIC_1760: i64 = 1760 |
| 29 | const AM_MAGIC_3120: i64 = 3120 |
| 30 | const AM_MAGIC_65536: i64 = 65536 |
| 31 | const AM_MAGIC_9000: i64 = 9000 |
| 32 | const AM_MAGIC_1500: i64 = 1500 |
| 34 | const AM_FRAMES: i64 = 3 |
| 35 | const AM_FW: i64 = 340 |
| 36 | const AM_FH: i64 = 560 |
| 37 | const AM_HEAD: i64 = 30 |
| 38 | const AM_FOOT: i64 = 24 |
| 39 | const AM_W: i64 = 1020 |
| 40 | const AM_SPAN_MS: i64 = 900000 |
functions
| 42 | func am_px(img: *u8, x: i64, y: i64, r: i64, g: i64, b: i64) -> i64 |
| 51 | func am_char(img: *u8, tbl: *u8, x: i64, y: i64, ch: i64, cr: i64, cg: i64, cb: i64) -> i64 |
| 65 | func am_text(img: *u8, tbl: *u8, x: i64, y: i64, s: *u8, cr: i64, cg: i64, cb: i64) -> i64 |
| 70 | func am_num(img: *u8, tbl: *u8, x: i64, y: i64, v: i64, cr: i64, cg: i64, cb: i64) -> i64 |
| 84 | func am_site(wx: i64, wy: i64) -> i64 called by 1: main |
| 96 | func main(argc: i64, argv: *i64) -> i64 |