Commit Graph
2 Commits
Author SHA1 Message Date
CydandClaude Fable 5 c85bf98814 BT410 5.3.103: the INTERIOR clip set, the duck, and why state 4 was always the turn
Three finds from one suffix table, closing the last mech2-family loader:

THE 'i' SET.  The 4-char table at .data:0050d94d is the 3-char gait table
with an 'i' appended -- swri, wwri, ... squi, sqdi, trni.  These are the
INTERIOR clips: the gait as seen from inside the cockpit, animating the
inside-view skeleton (they never bind the hip -- you cannot see your own
hip from the seat).  LoadLocomotionClipsExt (@004a86c8) is byte-identical
to LoadLocomotionClips over that table, and is now its reconstructed twin.

THE VIEW DISPATCH (ctor tail @0x4a1674 region): a REPLICANT loads the
exterior set -- you see it from outside -- while the MASTER loads the
interior set.  And the binary carries its own dev override: the L4VIEWEXT
env var forces the exterior set on a master for external-camera work.
Which is exactly what our render-bridge verification rigs need, so
pod_render_joints/limp.conf now set it -- the 1995 authors shipped the
switch our test harness wanted.

THE TAIL THE 5.3.93 LOADER MISSED: two more optional sets past the limp
probes.  squ/sqd resolve into slots 3 and 2 with squatCapable -- the DUCK:
state 2 plays the squat-down, holds ducked at state 1, state 3 stands back
up (three state numbers the machines always handled but never had clips
for).  And trn resolves into SLOT 4 with turnCapable -- which is WHY state
4 is turn-in-place.  The slot map explains the state machine, again.

VERIFIED both paths live: L4VIEWEXT rig run measures the exterior set
bit-identically to 5.3.93 ('mad': standSpeed=5.23428 walkStride=18.5085
revStride=56.0462); the authentic default (master -> interior) measures
THE SAME CONSTANTS from the 'i' clips -- as it must, the mech covers the
same ground from either view, only the joint content differs -- proving
every madXXXi clip resolves.  No fault on either run.

turnCapable is now real, which unblocks the turn-in-place dispatcher
(master perf) as the next locomotion piece.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 14:44:58 -05:00
CydandClaude Fable 5 f0f0e3d70e BT410 5.3.88: hinges flush as MATRICES -- the axis was never on the wire, and a DCS remembers how it was last set
The mech rendered with a live root and frozen limbs.  Cause, and it is not in
the renderer:

  L4VIDRND.CPP:1028 sets SINGLE_AXIS_HINGE True, so HingeRenderable pushes a
  joint with dpl_SetDCSXAxis / YAxis / ZAxis -- three separate libDPL entry
  points, each handed only (sine, cosine).  The AXIS is carried by WHICH
  FUNCTION WAS CALLED, and libDPL never puts it on the wire.

Confirmed against a live capture rather than argued: every articulation
record in joints_check.fifodump is 12 bytes, [handle][sin][cos], 26133 of
them, no axis field anywhere.  And the renderer cannot recover it from
context either -- that capture contains ZERO action-0x22 name records, so a
DCS handle cannot be matched back to a .SKL node.  vrboard was parsing those
records correctly and dropping them on purpose, with a comment saying so.

THE FIX is the archive's own alternative.  The #else half of that same #if
(L4VIDRND.CPP:1153) builds a Quaternion from the Hinge and assigns it over
the DCS matrix -- the axis ends up IN the matrix, and it flushes as a
12-float pose the renderer already applies.  That is precisely what
BallJointRenderable::Execute does unconditionally, with no #if at all, which
is why ball joints were never affected.  So this is the branch the original
authors wrote and did not take, applied to hinges so they behave like the
ball joints beside them.

A DCS REMEMBERS HOW IT WAS LAST SET -- the part that cost a build.

The first attempt subclassed HingeRenderable and overrode only Execute.  It
compiled, ran, and did not work: the wire still carried 12-byte records.  What
it DID change was their contents -- the pair went from (sin, cos) to
(0.9990, 0.0000), which is m00 and m01 of the matrix being written.  That is
the whole diagnosis in one number.  The base ctor calls dpl_SetDCS?Axis before
the subclass gets control, which puts the DCS in single-axis mode, and the
flush then serialises two floats out of it no matter what goes in through
dpl_GetDCSMatrix.

So the axis setter must never touch this DCS.  BTL4HingeRenderable therefore
derives from ChildOffsetRenderable, whose ctor builds the offset DCS and calls
no axis setter -- making it the exact hinge analogue of BallJointRenderable:
same base, holds its own attribute pointer plus a previous-value copy, writes
a full matrix in Execute.  CODE/ untouched; Component::Execute is virtual
(CMPNNT.HPP:40) so the override dispatches normally, and shadowing 1900 lines
of L4VIDRND.CPP to flip one #define was not needed.

VERIFIED on the rig, torso-sweep conf, clean run:

    before   26133 records, ALL 2-float, 1 handle, renderer applied NOTHING
    after     7626 records, ALL 12-float, ZERO 2-float messages remaining,
              22 handles emitted, renderer applied all 22 (anim_abs)

  and the swept joint moves: handle 0x684, m00 across 1532 distinct values
  from 0.1582 to 1.0000 -- cos of a 0..80 degree sweep, which is exactly what
  BT_FORCE_TORSO drives.

LEG GAIT: NOT FIXED, and the earlier note claiming this would fix it was
wrong.  The transport was necessary but not sufficient.  On a walking run
(new pod_render_joints.conf = the arena mission with BT_JOINTS) all 22 joints
flush as matrices and the renderer applies them, but only handle 0x672 -- the
vehicle ROOT -- animates.  The limbs emit their initial pose and never change.

  Because nothing drives them.  Joint::SetHinge / SetRotation exist, and the
  ONLY caller anywhere in the reconstruction is TorsoSimulation
  (BT/TORSO.CPP:382, horizontalJointNode->SetRotation).  That is why the
  torso is the one thing that moves.  MAD.SKL declares JointCount=25 --
  jointhip, jointlthigh, jointrthigh, jointtorso, jointshakey, jointeye and
  the rest -- and the gait that should walk them is simply not reconstructed
  yet.  Separate piece of work, now unblocked rather than done.

HARNESS CAVEAT: pose_probe frames on "the last-articulated root" in
anim_abs.  With 21 joint DCSs now landing there, that heuristic picks a joint
instead of the vehicle root and frames empty arena.  The change invalidated
the assumption; the render is not evidence either way until it takes the root
handle explicitly.  The counts above are the evidence.

FAULTS SEEN: two crashes during this work, both cr2=7000FA64 at host 66D9 --
the known parked load-window fault, address unmoved across a relink (which is
the standing test for "not ours").  They died at DIFFERENT points ([mer] 217
and [mer] 116), where a defect in new construction code would die
consistently.  Third and fourth runs clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 09:25:12 -05:00