Skip to content

Ankles, test_restitution.c whole, the world state hash, Aether 0.795.0 - #155

Merged
nicolas-maman merged 1 commit into
mainfrom
human/ankles
Oct 9, 2026
Merged

nicolas-maman merged 1 commit into
mainfrom
human/ankles

Conversation

@nicolas-maman

@nicolas-maman nicolas-maman commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Ankles for the ragdoll (#152), Box3D e77352c's test_restitution.c ported whole (#144), its world state hash, and Aether 0.795.0.

Ankles (#152):

  • With Human.ankles set before the figure is made, each foot becomes a bone of its own (BONE_FOOT_L, BONE_FOOT_R, 14 bones). Each foot is a body carrying the foot's capsule and hangs from its calf on a spherical joint at the far end of the calf's capsule. The calf keeps only its shin.
  • The joint frame looks down the foot, with x pointing the way the toes go down. Its elliptical cone reaches 50 degrees toes down and 35 up (a centre tipped toward the toes by half the difference), 15 to the side, and its twist rolls the sole 15 either way. Each joint has friction 0.6.
  • Without ankles the figure is the reference's twelve bones, unchanged. Every per-bone loop now runs over Human.bone_count. A shape whose calf has no foot is refused when ankles are asked for.
  • test_human.ae (115 checks) measures the four ranges through the joint, with the calf held and a steady torque on the foot: toes down 50.02, up 35.02, aside 14.62, roll 15.05. The figure falls and rests whole, with its joints closed. Crouch check, the issue's own measure: the figure is held still and each shin is tipped forward over its free foot. At 25 degrees the soles stay within 2.5 degrees of standing; the reference's foot, fixed to the calf, tilts the whole 25. At 45 degrees the soles lift by about the 10 degrees the 35 degree range cannot take (8.5 measured).

test_restitution.c (#144): tests/test_restitution.ae, 162 checks, all 14 subtests with the reference's own gates:

  • the coefficient head on at three density ratios and at sixteen impact phases;
  • a ball on a column of dead balls, with propagation off and on;
  • flat and spinning landings; elastic drops from 40, 20 and 10 m; a cube dropped flat four times;
  • the threshold, a resting stack that stays put, and the approach speed published only with hit events;
  • the narrow-floor overshoot, continuous and discrete;
  • the energy of thirteen elastic scenes;
  • every step's impulse balanced on drops either side of continuous collision;
  • one, two and four workers hashing alike.

I built Box3D's own test binary (single and double precision, Release) and ran its RestitutionTest beside ours. Every line agrees to the digits the reference prints, except where its own two builds disagree with each other:

  • the 10 m drop's later apexes, within 2 mm;
  • the step at which a peak energy ratio of 1.00000 occurs, for example 22 single, 20 double and 23 ours on the edge scene.

Ours matches the double build on the drop's second apex and the single build on the rest. Our worst impulse step error is at or below the reference's in every case.

The world state hash: dynamics.hash_world_state, the reference's b3HashWorldState. It folds every live body's pose and, for awake bodies, their velocities, as raw bits, with 64-bit FNV-1a in body order. The pose is in double here, so its bits are the double's, as in the reference's large world build. Aether defines signed overflow as wrapping (-fwrapv on every compile), so the multiply is FNV's own. native.f32_bits and native.f64_bits read the bits through memcpy. The worker parity check uses this hash, as the reference's does; the recording work in #149 will use it too.

Aether 0.795.0: AE_PIN bumped from 0.794.0 in CI and in the README's install line. Nothing in it changes this engine's results; the golden trace is unchanged.

Local gate on Aether 0.795.0: all 34 suites pass with no warnings, and the golden trace matches bit for bit (1,256 steps). Pins: Aether 0.795.0 and aeb v0.325, the latest releases.

Closes #152. Closes #144. Refs #149.

Human.ankles gives each foot a body on a spherical joint below its calf:
toes down 50 degrees and up 35 on an elliptical cone, 15 aside, 15 of
roll. Without it the figure is the reference's twelve bones (#152).

tests/test_restitution.ae ports Box3D's test_restitution.c whole, 162
checks with its gates; its numbers match Box3D's own run (#144).

dynamics.hash_world_state is the reference's b3HashWorldState, FNV-1a
over each body's pose and velocity bits; worker parity uses it.

AE_PIN 0.794.0 -> 0.795.0.
@nicolas-maman
nicolas-maman merged commit 8c7f397 into main Oct 9, 2026
2 checks passed
@nicolas-maman
nicolas-maman deleted the human/ankles branch October 9, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant