nx_pose_retarget.nx
buildroot/runtime/nx_pose_retarget.nx
about
nx_pose_retarget.nx -- RETARGET a pose track (joint world POSITIONS) onto our rig's joint ANGLES (roadmap R3,
the video->pose->MOTION heart: once R2 turns pixels into joint positions, this makes them DRIVE our rig ->
motion clips for the move library / text2motion corpus, fixing the no-mocap ceiling). Inverts the sovereign FK
(worldR=Ry(yaw)*Rz(elev), bones along +x -> aimed dir = (cy*ce, se, -sy*ce)): per bone aim its child, so
elev=asin(dir_y), yaw=atan2(-dir_z, dir_x) in the PARENT's local frame. Chain form (each bone -> next). Needs
integer atan2/asin, built on the it_* tables. license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_skeleton.nxnx_itrig.nx
imported by: nx_pose_retarget_gate.nx
structs
| none |
consts
| 10 | const K_MAGIC_25736: i64 = 25736 |
| 11 | const K_MAGIC_4096: i64 = 4096 |
| 12 | const K_MAGIC_12868: i64 = 12868 |
functions
| 14 | func rt_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x + 1) / 2; while y < x { x = y; y = (x + v / x) / 2 } return x } |
| 18 | func rt_atan2(y: i64, x: i64) -> i64 |
| 34 | func rt_asin(s: i64) -> i64 |
| 44 | func rt_retarget_chain(base: i64, targets: *i64, nbones: i64) -> i64 |