code wiki / (root) / nx_figure_render.nx

nx_figure_render.nx

buildroot/runtime/nx_figure_render.nx

10501 B240 linesdepth 3pulls 4 transitivereach 23 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_figure_render.nx -- the ELARA RIG (17-joint humanoid skeleton, bones-as-data) + a fast software renderer that draws the POSED skeleton as a shaded humanoid (tapered capsules between joints + a head), with a per-pixel Z-BUFFER so limbs occlude correctly regardless of draw order. This is the MOTION-v0 render surface (swap+motion census SCOPE B): forward-kinematics from nx_skeleton give correct joint motion for ANY authored move; the figure is a mannequin preview -- skinning it with the photoreal SDF body / a rigged mesh is the deep rung (S5/S6). ALL INTEGER (deterministic, VM-vettable). Rig consts are shared by nx_movelib (which poses the bones) and this renderer (which draws them). Reuses nx_skeleton FK + nx_itrig. license_tier: ORIGINAL

dependencies 3 imports · 16 importers

nx_syscalls.nx nx_skeleton.nx nx_itrig.nx nx_figure_render.nx nx_bodypose.nx nx_creature_motion.nx nx_creature_motion_gate.nx nx_figr_probe.nx nx_motion_neural_gate.nx nx_motion_photo_gate.nx nx_motion_video_gate.nx nx_movelib.nx nx_newmoves_gate.nx nx_pose_coach_gate.nx

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

imports: nx_syscalls.nxnx_skeleton.nxnx_itrig.nx

imported by: nx_bodypose.nxnx_creature_motion.nxnx_creature_motion_gate.nxnx_figr_probe.nxnx_motion_neural_gate.nxnx_motion_photo_gate.nxnx_motion_video_gate.nxnx_movelib.nxnx_newmoves_gate.nxnx_pose_coach_gate.nxnx_pose_estimate_gate.nxnx_poseelm_gate.nxnx_poseest2.nxnx_poseest_gate.nxnx_synth_serve.nxnx_text2motion_gate.nx

structs

none

consts

11const RIG_MAGIC_65536: i64 = 65536
12const RIG_MAGIC_4096: i64 = 4096
13const RIG_MAGIC_2000000000: i64 = 2000000000
14const RIG_MAGIC_6000: i64 = 6000
15const RIG_MAGIC_1024: i64 = 1024
20const RIG_NB: i64 = 17
21const RG_PELVIS: i64 = 0
22const RG_SPINE: i64 = 1
23const RG_CHEST: i64 = 2
24const RG_NECK: i64 = 3
25const RG_HEAD: i64 = 4
26const RG_SHL: i64 = 5
27const RG_ELL: i64 = 6
28const RG_WRL: i64 = 7
29const RG_SHR: i64 = 8
30const RG_ELR: i64 = 9
31const RG_WRR: i64 = 10
32const RG_HIPL: i64 = 11
33const RG_KNL: i64 = 12
34const RG_ANL: i64 = 13
35const RG_HIPR: i64 = 14
36const RG_KNR: i64 = 15
37const RG_ANR: i64 = 16
107const SK_R: i64 = 236
108const SK_G: i64 = 182
109const SK_B: i64 = 158

functions

17func fr_dbg(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
calls 1: sys_write
41func rig_build(sk: i64) -> i64
64func rig_r0(i: i64) -> i64
called by 1: rig_draw
83func rig_r1(i: i64) -> i64
called by 1: rig_draw
103func fr_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a }
called by 1: fr_capsule
104func fr_clamp(v: i64, lo: i64, hi: i64) -> i64 { if v < lo { return lo } if v > hi { return hi } return v }
called by 2: fr_discrig_draw
113func fr_disc(fb: *i64, zb: *i64, w: i64, h: i64, c: *i64) -> i64
called by 2: fr_capsulerig_draw calls 1: fr_clamp
158func fr_capsule(fb: *i64, zb: *i64, w: i64, h: i64, e: *i64) -> i64
called by 1: rig_draw calls 3: fr_abssys_mmapfr_disc
184func rig_draw(sk: i64, fb: *i64, zb: *i64, w: i64, h: i64, camyaw: i64, scale: i64) -> i64