Files
security-game/docs/adr/0018-quaternius-stage2-runtime-rig.md
T
zwitschi e2f52fbfd1
Full build / Import + headless tests (push) Successful in 48s
Full build / Full desktop build + optional release (push) Skipped
Accept ADR-0018 option 2: adopt the Quaternius 62-joint rig at runtime
2026-11-05 21:39:38 +01:00

3.4 KiB
Raw Blame History

ADR-0018: Quaternius Stage 2 — adopt source proportions at runtime

  • Status: Accepted (2026-11-05, owner chose option 2)
  • Date: 2026-11-05
  • Supersedes: ADR-0017 decision 2 (Stage 1 keeps the 13-core contract)

Context

ADR-0017 made Quaternius the NPC base and staged the migration: Stage 1 bakes a proportion-warped mesh onto the existing 13-core contract; Stage 2 adopts the 62-joint rig at runtime only if the warp fails.

The Stage 1 proportion warp was executed and measured (docs/npc-model-sourcing.md §Rest-pose and proportion-warp measurement). The arm-down rest pose bakes cleanly, but the warp to the contract proportions does not:

Joint Quaternius Contract Delta
Hips height 0.869 0.62 −0.249
Shoulder x 0.148 0.27 +0.122
Arm (shoulder→hand tip) 0.429 0.70 ×1.63
Leg (hip→ankle) 0.835 0.62 ×0.74
Torso (hip→head) 0.745 1.20 ×1.61

The vision judge reads the warped mesh as distorted: paddle/claw hands, forearms lost into the torso, stretched shins, "long legs + short torso". The arm either stays short (a shortened arm against the contract hand) or stretches 1.63× (a distorted deltoid + hand). Both are the gate's rejection conditions.

Decision

Stop the Stage 1 rollout and adopt the Quaternius 62-joint rig at runtime (owner chose option 2). The mesh is not proportion-warped: it keeps its source LOD (3,199 welded verts / 6,206 tris) and only the arm-down rest pose is baked.

  • NpcAvatar maps the Quaternius joint names instead of the 13-core names.
  • Gear attach points are re-derived from the Quaternius skeleton (hip ≈0.87, shoulder ≈0.148/1.39, wrist ≈0.99, knee ≈0.52).
  • The Quaternius Idle and Walk clips are used directly — they are authored for the 62-joint rig, so no retargeting pass is needed. Combat/gun/sword clips stay unused.

Option 1 (keep the 13-core names with Quaternius rest positions) is rejected in favour of the full source rig.

Consequences

Positive

  • The Quaternius silhouette, deltoid, hand and leg proportions are preserved — no paddle hands, no shortened arm, no torso/leg distortion.
  • The mesh stays at source LOD (far under the 24,000 cap), so no decimation is needed.

Negative

  • The runtime contract numbers (hip 0.62, shoulder 0.27, hand 0.78) change; every gear attach point, npc_proportions guide, fit measurement and pose-composition constant must be re-derived and re-tested.
  • NpcAvatar's bone mapping and pose composition are rewritten for the 62-joint rig, a larger change than the mesh swap.
  • The 12-variant rollout and the 12×6 baseline are still blocked until the new rest positions and gear fit are owner-approved.

Alternatives

  • Ship the warped mesh. Rejected by the gate: the 1.63× arm / 0.74× leg warp visibly distorts and the owner directed keeping the Quaternius as close to source as possible.
  • Keep the old contract and accept a short arm. Rejected for the same reason: the hand ends at ≈0.99 instead of 0.78, so handheld gear floats unless attach points move — which is option 1.
  • Abandon Quaternius and keep the procedural generator. Rejected in ADR-0017.

Open question

Resolved: option 2 (62-joint runtime) is the owner's choice. The first implementation step is the NpcAvatar bone-map + gear-attach re-derivation, then the slot/AO bake and the 12-variant rollout.