Skip to content

Replace procedural boxers with rigged CC0 Barbarian model - #286

Merged
user1303836 merged 4 commits into
mainfrom
feature/hands-boxer-model
Aug 6, 2026
Merged

Replace procedural boxers with rigged CC0 Barbarian model#286
user1303836 merged 4 commits into
mainfrom
feature/hands-boxer-model

Conversation

@user1303836

Copy link
Copy Markdown
Owner

Per player direction: replaces the hand-built procedural boxers with a real rigged model.

Asset: KayKit Adventurers Barbarian.glb — CC0 (Kay Lousberg), vendored with license in web/hands/assets-src/. Inspected: 41-bone armature, 76 in-place authored clips, T-pose, ~1.35m, faces +Z, 4,045 tris, 1 palette texture; props (axes/shield/mug/hat/cape) stripped at generation.

Pipeline: scripts/generate-fighter-glb.ts retarget-bakes our 18 combat clips onto the armature (world-delta for torso/head, child-aim for limbs, scaled hips), preserving manifest phase-locking. Canonical BONE_ADAPTER with hard diagnostics on missing bones. Embedded base64 like the previous GLB (exact 3-file manifest intact).

Runtime: SkeletonUtils.clone per fighter, one AnimationMixer each, independent materials only where appearance differs (gear gloves, clearcoat), shared geometry/texture; corrections after mixer.update only; debug markers via adapter; procedural animator behind ?procedural=1 + automatic fallback on load failure.

/hands/model-lab: play/pause/seek/loop/crossfade, SkeletonHelper, bone hierarchy print, clip durations/tracks, triangle/material/texture inventory, transform controls, warnings.

Evidence: model-lab screenshot, in-ring screenshots, zero console errors, frame timings, missing-clips list, and remaining defects are documented in docs/hands-lab-architecture.md. 1,892 Python + 145 frontend tests green; deterministic bundle; golden replay still byte-stable.

Vendor KayKit Adventurers Barbarian.glb (CC0) and retarget-bake the
project's boxing motion onto its 41-bone armature: world-delta retarget
for torso/head, child-aim retarget for limbs, hips translation scaled
by rest ratio. The generated fighter GLB carries all 18 combat clips at
authoritative tick timing, phase-locked via combat-manifest.json.

Runtime: SkinnedBoxer (SkeletonUtils.clone, per-fighter mixer, cloned
materials only where appearance differs, shared geometry/texture),
canonical bone adapter with missing-bone diagnostics, runtime glove
meshes for corner colors, and the BoxingGraph driving layered blending,
foot locking, and constrained additive IK strictly after mixer.update.
Procedural animator preserved behind ?procedural=1 and as load-failure
fallback.

Adds /hands/model-lab: clip player with crossfade, SkeletonHelper, bone
hierarchy and clip/track inventory, triangle/material/texture stats,
transform controls, and warnings reporting.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

Reviewer-found: the post-mixer IK used the procedural rig's -Y bone
axis while the Barbarian's children sit at +Y (limbs aimed 180 degrees
off), segment lengths are now measured from the bones instead of
hardcoded for the old proportions, the foot-lock threshold derives from
the rig's ankle rest height, and aim/drip heights use the model's head
and chest rest positions. Runtime glove meshes now sit on the fist,
dispose with the fighter, and the renderer only preserves the drawing
buffer in lab mode. BONE_ADAPTER has one source, model-lab clones the
cached scene, and a no-op-aim regression test pins the convention.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@user1303836 user1303836 closed this Aug 6, 2026
@user1303836 user1303836 reopened this Aug 6, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@user1303836
user1303836 merged commit 5b933a9 into main Aug 6, 2026
0 of 6 checks passed
@user1303836
user1303836 deleted the feature/hands-boxer-model branch August 6, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant