SuperHQ Motion (experiment)
Controllable motion. Runs in your browser.
This is a research experiment, not a production model. It is a small learned locomotion model for humanoid game characters, combined with game-side runtime code and a few authored clips. It is useful for studying a compact, browser-run motion controller; it is not yet natural enough to ship as a game's character animation.
Try it: SuperHQ Motion playground.
What is in this repository
| Path | Contents |
|---|---|
model/ |
Locomotion network: 616,591 parameters, 34 inputs, 143 outputs, FP32 (2.47 MB) |
actions/ |
Action network: our own frozen 616,591-parameter base plus two 41,231-parameter residual adapters (stance, jump); 699,053 parameters, 48 inputs |
clips/action-clips.json |
Eight authored CC0 clips on the canonical rig (dash, lunge, knockback, get-up, ledge climb, jump references) |
src/ |
Dependency-free JavaScript runtime: inference, game controller, running-jump composition, IK, clip playback, Three.js adapter |
examples/, index.html |
The playground, including the display character |
evaluation/ |
Saved development evidence (see below) |
provenance.json |
Source checkpoints, training jobs, data licenses and SHA-256 of every file |
Output: 23 six-dimensional joint rotations, a 3D pelvis offset and two foot contact logits for a 28-landmark, Y-up, metre-scale rig at a fixed 60 Hz. Both packages together: 1,315,644 parameters, about 5.26 MB.
What is learned and what is code
| Behavior | How it is produced |
|---|---|
| Idle, walk, jog, sprint, crouch, carrying and zombie locomotion | Learned (locomotion network), conditioned on gait profile, trajectory preview and phase |
| Standing crouch and standing jump poses | Learned (action network) from synthetic key-pose targets |
| Running jump | Learned stride plus runtime code: support-foot takeoff timing, IK foot planting, push-off and landing pelvis curves, time-warped flight. Not a learned running-jump policy. |
| Dash, lunge, knockback and get-up, ledge climb | Authored clips replayed with offset blending into and out of locomotion |
| Turning and strafing | Code rotates the forward gait; no learned strafe, backpedal or pivot |
| Gravity, collisions, horizontal travel | The host game (an example host is included) |
Usage
import {MotionGameController} from './src/game-controller.js';
import {correctHeadPitch} from './src/pose.js';
const motion = await MotionGameController.load(
new URL('./model/', location.href),
new URL('./actions/', location.href),
{clipsURL: new URL('./clips/action-clips.json', location.href)}
);
// Call once per 1/60 s.
const pose = motion.step({moving: true, jog: true, heading: 0});
motion.requestJump(); // on an input edge
motion.requestAction('dash'); // 'dash' | 'lunge' | 'knockback' | 'climb'
draw(correctHeadPitch(pose)); // canonical pose; apply worldPosition and heading once
Serve the repository over localhost (python3 -m http.server) and open
index.html to run the playground. Weight checksums are verified on load.
See PLAYGROUND.md for controls, the physics-host contract and details.
Training
- Locomotion: our earlier 100STYLE-trained locomotion network, fine-tuned on retargeted Quaternius Universal Animation Library game loops in three short studies (game repair v3, floor refine v4, idle refine v5) on one NVIDIA L4; recorded compute about USD 0.49. This release is seed 431 of idle refine v5, fixed final update (1,000 updates), with no checkpoint selection on fresh cases.
- Actions: two residual adapters on our frozen base, trained on synthetic stance and jump targets built from authored key poses (action repair v11 stance, v9 jump; composed without further training).
- Inputs are the profile clock and trajectory preview; the networks do not consume the history of applied poses.
Evaluation
All results are development evidence on cases inspected during development; there is no independent test set or user study.
Software checks (passed): weight checksums; JavaScript and PyTorch
agreement (model/browser-parity.json); 180 runtime tests; the playground loads
and runs in desktop Chromium, locally and as the hosted Space (1.7 ms per
step).
Learned behavior, measured:
- The locomotion network reproduces its source clips closely: head pitch
within 0.3 degrees of the source at idle, walk, jog and sprint; development
gates for idle and cycle pose error passed (
evaluation/locomotion-gates.json). - The action network's standing jump is learned from a few stationary key poses blended over fixed timings; its targets do not contain a real jump.
Running jump (runtime composition, 64 phase cases, evaluation/running-jump/):
| Measure | Previous runtime | This release |
|---|---|---|
| Pelvis vertical-velocity jump at takeoff | 2.8 to 4.1 m/s in one frame | 0 |
| Support toe height at takeoff (jog, median) | 179 mm | 3 mm |
| Landing foot ahead of pelvis | 0.08 m | 0.42 to 0.56 m |
| Blend floor lift required | up to 63 mm | 0 |
| Request to takeoff (jog / sprint, median) | 0 ms | 233 / 150 ms |
These held on untuned phases, a different request frame and two other jump impulses.
Known failures and limitations
- Head pitch: source conversion pitched the canonical head 10.9 degrees
forward; every checkpoint carries this bias.
correctHeadPitchremoves it for display. The source clips still hold the head about 12 degrees down at idle and 20 to 23 degrees down when running. - Running-jump latency: takeoff waits up to 0.32 s for a support foot, because the jog stride spends about 70 percent of each cycle airborne.
- Foot sliding: ordinary locomotion, including gait transitions, slides up to about 3.3 m/s near the floor by our screen; sprint toe-off after landing up to about 6 m/s.
- Stops: stopping from a run routes through walking and takes about 1.5 s.
- No directional data: turning is code-driven; no strafe, backpedal or pivot.
- Actions: dash and lunge arms are posed for a shield and sword; climbing needs a game-supplied ledge and has no ledge alignment.
- Scope: flat ground, upright humanoid, the rig in
model/profile-controller.json. Crouched and carrying jumps are not supported. Walking and standing jumps use the older key-pose jump prior and look stiff. - The integration evaluator's "zero weight equals locomotion" and "canonical
root step under 50 mm" checks encode the previous runtime design and fail by
construction for the stride jump (
evaluation/integration/).
License and attribution
Weights: CC BY 4.0. Runtime code: MIT (LICENSE-CODE). Training data: The
100STYLE Dataset by Ian Mason (CC BY 4.0); Quaternius Universal Animation
Library 1 and 2 by Quaternius and Gonzalo Furnier (CC0). Authored clips: the
same Quaternius libraries (CC0). Display character: "Eric Rigged 001" by
Renderpeople (CC BY 4.0). See ATTRIBUTION.md.