Team Ai
Apppublic

axonis22/muse-engine-32-webgl2

sourceHugging Facemitupdated 7d agoView on Hugging Face
0likes
App README

Muse Engine 32, WebGL2 (release candidate)

This is the WebGL2 track of Muse Engine 32, labelled a release candidate. It renders with WebGL2 (GLSL ES 3.00) and falls back to WebGL1 on its own when WebGL2 is not available. It contains no three.js and no third-party 3D library: the glTF / GLB and FBX loaders, the maths and the scene graph are the engine's own (engine/gl2/, MIT). The WebGL1 build stays a separate Space.

  • —Switch the renderer: add ?gl=2 (WebGL2), ?gl=1 (WebGL1) or ?gl=auto (default) to the URL, or use the Renderer picker in the config panel (Tab).
  • —GPU report: `webgl2-report.html` shows the GPU, the WebGL2 features, a self-test and an FPS benchmark.
  • —Notes and known gaps: `WEBGL2-NOTES.md`.

Test results (release candidate)

  • —154 of 154 end-to-end checks pass in WebGL2 mode and 154 of 154 in WebGL1 mode (headless Edge).
  • —60 fps on Intel Core Ultra 7 255H graphics in Edge (real D3D11 GPU), in both ?gl=2 and ?gl=1. All WebGL2 feature checks pass.
  • —The own loaders match the earlier reference loaders on every glTF / GLB and FBX test file.

Known gaps

No VAOs or instancing yet; NURBS FBX, Draco, KTX2 and meshopt glTF are not supported; TGA textures inside FBX are not supported. Details in WEBGL2-NOTES.md.

Licence

MIT, Copyright (c) 2026 Paul Buckingham / Axonis Pty Limited. The Axonis name and logo are not covered by the MIT licence.


Muse Engine 32 is a small browser game engine (raw WebGL2, with automatic WebGL1 fallback) for trying out your own Maya / 3ds Max content in a playable level, with nothing to install:

  • —Your scene as the level: load an FBX or GLB/glTF scene and walk around and collide on its geometry. Units (cm, m, inches) and the up-axis (Z-up or Y-up) are read from the file, and textures are kept.
  • —Your skinned characters as the enemies: a rigged FBX from Maya or 3ds Max, or a GLB with a skeleton, is GPU-skinned. Its clips are mapped by name to idle / walk / run / shoot / death, and it gets a fitted capsule and a head hitbox.
  • —Model check: a panel that says what is wrong with an export and how to fix it (units, up axis, bones, takes, root motion, textures, texture memory, heavy meshes, missing floor or spawn).
  • —Save / load setup: save the whole setup (scene, character, units, clip picks, look, toggles) as one JSON file, and load it again.
  • —Drag and drop: drop models or a setup onto the game view. The left half loads a scene and the right half loads a character.
  • —HOWTO for Maya / 3ds Max users: `docs/HOWTO-AUTODESK.md` covers export settings, naming, bone limits, baking and every Model check warning.
  • —CC0 test pack: a test level and a test character (FBX and GLB) you can use straight away, in the panel or as one download (assets/testpack/muse-engine-32-testpack-cc0.zip).

Try it: press Play, then Tab. Under Load scene model, click Kenney Yard (FBX, cm, Z-up). Under Load character model, click SWAT (FBX, cm, Z-up, Character1: rig). Then open Model check. To use your own files, drop them on the game view.

It is built on Engine 29 (combat feel, Phase 28 movement) and keeps its two switchable looks: Look A · Breaker Bay (the original Phase 29 scene) and Look B · Scrap Dusk (warm sand, rust scrap and yellow-armed scrap bots, authored by Muse Glimmer). Looks only swap the visuals; gameplay, colliders and hitboxes are the same in both.

Muse Glimmer (Paul's local model) wrote these parts, and Grok Bot reviewed and fixed them (each fix is marked in the code):

  • —Phase 30: the collider and units modules
  • —Phase 31: the clip matcher, capsule fitter, skeleton pose / crossfade and bone budget
  • —Phase 32: the Model check rules, root-motion strip, setup schema / drop planner and texture-size checks

The prompts, raw outputs, test harnesses and fix logs are in game/muse-authored/. This WebGL2 copy bundles no third-party 3D library: imported .glb / .gltf / .fbx files are read by the engine's own loaders (engine/gl2/, written by Muse Glimmer, coached by Grok Bot) and the engine renders everything itself. See WEBGL2-NOTES.md.

Phase 30: your scene as the level

  1. 1.Press Tab. Under Load scene model, pick a file (.fbx, .glb or .gltf; for .gltf or .fbx with external textures, also select the .bin and texture files) or enter a URL. To try it straight away, use the CC0 test scenes: Kenney Yard (FBX, cm, Z-up) or Kenney Yard (GLB, m, Y-up).
  2. 2.Use as level (on by default): the scene is converted to metres and Y-up, and walkable floors (surfaces facing up, slope ≤ ~45°) plus wall colliders (everything else) are generated from its triangles. Built-in props, lamps and pickups are put away, and the enemies are moved onto your floor.
  3. 3.Units / Up are auto by default: FBX UnitScaleFactor + UpAxis from the file, glTF = metres and Y-up. If an export has no metadata, sizes over 400 units are read as cm and over 4000 as mm. Override them in the panel if a file comes in at the wrong size or lying on its side.
  4. 4.Scene colliders toggle: off falls back to the built-in colliders and map (your scene stays visible); on brings the level back. Untick Use as level to get Engine 29 behaviour (the model is fitted to the 20 × 20 m map, visual only).
  5. 5.The status line shows units, scale, up-axis, size in metres, textured parts, collider triangles and where you spawned.

Naming conventions (object or parent names in your DCC tool): | Name | Effect | |---|---| | PlayerStart, spawn, SpawnPoint (empty/locator) | player spawn; snapped to the floor below it | | UCX_…, …_col, col_… | collision only (invisible) | | …nocol… | visible, no collision | | grass…, foliage…, plant…, bush…, flower…, decal…, leaf… at the start of the object's own name, when small (under 3 × 3 m and 1.5 m tall) | visible, no collision |

Tips for Autodesk exports: FBX 7.x (FBX 2011 or later), binary or ASCII, as read by the built-in FBX reader (engine/gl2). Keep your scene's own units and up axis; the engine reads UnitScaleFactor and UpAxis from the file. Embed media, or select the textures together with the FBX. The import limit is 1.5 million vertices. Dense meshes cost frame time, so for heavy scenes add simple UCX_ collision proxies and mark detail meshes nocol. Falling below the lowest geometry respawns you at the spawn point.

Also fixed in Engine 30: the crosshair and hit marker are centred on the game view (they were at the window centre, about 170 px off with the sidebar open), and the pyramid is hit-tested on its real faces (its square box used to swallow shots at lamp 1 from the spawn point: "STONE HIT"). H hides the sidebar.

Phase 31: animated characters

  1. 1.Press Tab. Under Load character model, pick a skinned .glb/.gltf/.fbx (for .gltf, or .fbx with external textures, also select the .bin and texture files) or enter a URL. To try it straight away, use the CC0 test characters: SWAT (GLB, m, Y-up) or SWAT (FBX, cm, Z-up, Character1: rig).
  2. 2.Units / Up / Faces are auto by default, as for scenes (FBX UnitScaleFactor + UpAxis, glTF = metres, Y-up). If a character still comes in far too small or large (under 0.25 m or over 6 m tall), it is rescaled to 1.8 m and the status line says so. Faces sets which way the model looks in its bind pose (+Z by default, the glTF and Maya convention).
  3. 3.Skinning runs on the GPU: 4 weights per vertex and up to 60 bones (fewer on GPUs with few vertex uniforms; ?maxbones=N forces a lower limit). Rigs with more bones are reduced automatically: minor leaf bones (fingers, toes, twist and end bones) are merged into their parents, while the head, neck, spine, hips, arms and legs are always kept. The status line shows bones, GPU slots used and merged bones.
  4. 4.Clips are mapped by name, case-insensitively, ignoring namespaces and take prefixes (Character1:Reference|Walking, mixamorig:, Armature|, Take 001 …): idle (idle, stand, breathe, rest), walk (walk, stroll), run (run, jog, sprint), shoot (shoot, fire, attack), death (death, die, dead, dying). Anything the matcher can't place is listed in the clip picker under the character slot. Choose a clip for any role there (or none); your picks are saved per model in this browser.
  5. 5.In play: idle when still, walk at normal speed, run above ~2.2 m/s, with a 0.2 s crossfade between clips. The shoot clip plays when an enemy hits you. When a death clip is present it replaces fall-then-boom: the character plays it, holds, sinks and is removed. Without a death clip, fall-then-boom is kept.
  6. 6.Hitboxes come from the bind pose: a capsule around the body (radius from the hips and legs, so T-pose arms don't inflate it) and a head sphere that follows the head bone as it animates. A headshot does 3 damage ("HEADSHOT"); a body hit does 1. The capsule is also the character's collider on your level, so characters are placed on, and stay on, the level floor.
  7. 7.Root motion: since Phase 32 the forward drift in takes is removed by default (Strip root motion), and the dog can use your character (Dogs use the loaded character). See Phase 32 below.

Tips for Autodesk rigs (Maya / 3ds Max → FBX):

  • —Bind pose: export from the bind pose (Maya: Skin › Go to Bind Pose; Max: Skin modifier with Always Deform), with the character standing on the origin and facing +Z in Maya or −Y (the Front view) in 3ds Max. Both arrive facing +Z after the up-axis conversion; if one comes in turned, set Faces.
  • —Bone count limit: 60 skinned bones with 4 influences per vertex. Larger rigs load, but the smallest leaf bones get merged, so prune unused helpers, or keep them unskinned. Max "Nub" bones and Maya end joints are fine.
  • —Bake animation: tick Bake Animation (any frame rate; 30 fps is typical). Several takes or clips in one FBX are all read; name them idle, walk, run, shoot, death to skip the picker. Namespaces such as Character1: or mixamorig: are fine.
  • —Embed media, or select the texture files together with the FBX. Units and up-axis come from the file; there's no need to change your scene settings.
  • —FBX 7.x (2011 or later), binary or ASCII. Keep one skinned character per file; props parented to bones follow the bone.

Phase 32: save / load, drag-and-drop, Model check

  1. 1.Save / load setup: Tab › Setup › Save setup (.json) writes one file with the scene, the character, units / up / faces, clip picks, the look and all toggles.
  2. 2.Load setup… restores it, and so does dropping the .json on the game view.
  3. 3.Models loaded from a URL come back by themselves. Models loaded from your disk are matched by file name when you drop them together with the .json; otherwise the engine asks for them.
  4. 4.A bad file is rejected with the reason (wrong kind, newer version, a javascript: URL …). Unknown toggles are ignored with a note.
  5. 5.Example: assets/testpack/setup-yard-swat.json.
  6. 6.Drag and drop: drop files onto the game view. The left half loads a scene, the right half a character. Drop an .fbx / .gltf together with its .bin and textures. Unsupported files (.obj, .blend, .max, .ma, .mb …) get a message saying to export FBX or glTF.
  7. 7.Model check (in the panel) lists for each loaded model:
  8. 8.format, units and up axis (from the file, guessed or forced), triangles, parts, size;
  9. 9.textures (missing ones named), colliders and floor triangles, spawn;
  10. 10.for rigs: bones (merged ones marked), GPU slots, and a takes table (fps, frames, length, root motion in metres).
  11. 11.It also shows warnings with the fix: no skin, over 60 bones, root motion, unmapped roles, low / odd frame rates, odd size, no unit / up info, missing textures, large textures (over 2048 px, e.g. 4K maps) and texture memory, non-power-of-two textures, heavy mesh, many parts, no floor, no PlayerStart.
  12. 12.Strip root motion (on by default): finds the moving root / hips bone, measures each take and removes only the forward drift, keeping sway and bob, so characters stay on their capsule. Untick it for the raw takes.
  13. 13.Dogs use the loaded character:
  14. 14.an animated rig is drawn at half size as the dog, with idle / walk / run;
  15. 15.a static model fills the dog box;
  16. 16.off = the built-in dog.
  17. 17.Release polish:
  18. 18.A progress bar shows download %, parsing, textures, building and GPU upload.
  19. 19.Clear errors: file not found, damaged or truncated .glb, old FBX (FBX 6.x, e.g. FBX 6.1 from 3ds Max 2006-2010, binary or ASCII: Old FBX 6.x: re-export as FBX 2011+ or GLB), missing .bin, Draco / KTX2, unsupported format.
  20. 20.Heavy static models: parts that share a material are batched into 16 m cells, parts outside the view are culled, and shared textures are uploaded once. A 577-part, 442k-triangle test scene loads in about 0.6 s instead of 7 s on software rendering.
  21. 21.CC0 test pack in one download: assets/testpack/muse-engine-32-testpack-cc0.zip (Kenney Yard + SWAT, FBX and GLB, the SWAT with 3ds Max Biped bone names (Bip001 …: clips and head hitbox map by name), a small FBX 6.1 prop set for the old-FBX message, example setup, licence). It is also linked in the panel and the sidebar.
  22. 22.Autodesk HOWTO: `docs/HOWTO-AUTODESK.md`, linked from the panel and the sidebar. It covers export settings for scenes and rigs, UCX_ / _col / nocol / PlayerStart, the 60-bone limit, baking, root motion, embedding media, and every Model check warning.

Controls

KeyAction
Clickcapture the mouse / aim
WASD, mousemove and look
Space / Ctrljump / crouch
LMB / Rshoot / reload
Edoor
Nnight mode
Lnext look (A ⇄ B)
Tab (or ⚙ button)config panel (pauses the game; Esc/Tab closes)
Shift+Lload a GLB prop (Phase 26 picker)
drag filesdrop onto the game view: left half = scene, right half = character, setup .json anywhere
K / T / O / Cbollard on/off / character shapes / orbit camera / credit
Hhide / show the sidebar

Start screen: pick Look A or B (1/2 or ←/→, Enter to play). Your choice is saved in this browser. URL options: ?look=A|B, ?start=0 (skip the start screen).

Config panel (Tab)

  • —Setup: save / load the whole setup as JSON (see Phase 32), plus links to the Autodesk HOWTO and the CC0 test pack.
  • —Model check: what the engine found in each loaded model, with warnings and fixes (see Phase 32).
  • —Look: switch between A and B. Load scene model or Load character model from a local file (.glb / .gltf / .fbx; for .gltf/.fbx, select the .bin and texture files together) or from a URL. Scene models become the level by default (see Phase 30 above); untick Use as level to fit them to the 20 × 20 m map as visual-only props. Skinned character models are animated and get fitted hitboxes (see Phase 31 above); static character models are still scaled to the character collider and drawn instead of the hostile and patrol boxes (optionally the dog as well). Reset to built-in removes an import.
  • —Engine parts: shadow maps, textures + normal maps, lighting extras, screen FX, fog, collision (off = noclip), enemy AI update, physics/gravity (off = fly), audio. Each has a one-line explanation.
  • —Gameplay & scene: enemies, enemy attacks, dogs, player shooting, infinite ammo, jump, parkour blocks + ladder, fall-then-boom death, HUD, grid, bollard, night.
  • —All settings apply live and are saved in this browser. Defaults restores the original Phase 29 behaviour; the default state is identical to Phase 29.

Layout

  • —engine/ - the reusable engine: runtime, look switcher, UI (start screen, config panel, model import), physics/mesh-collider.js + import/scene-units.js (Phase 30) and anim/clip-map.js, anim/capsule-fit.js, anim/skeleton-pose.js, anim/bone-budget.js (Phase 31), check/model-check.js, anim/root-motion.js, io/setup-schema.js (Phase 32), all by Muse Glimmer with coach fixes marked, plus the own loaders and WebGL2 layer in engine/gl2/ (Muse Glimmer drafts, coach fixes marked [w2 coach]).
  • —docs/ - HOWTO-AUTODESK.md for Maya / 3ds Max users.
  • —game/ - the built-in looks (Look A, Look B) and Muse provenance (game/muse-authored/: the prompt, the raw output and the fix log).
  • —assets/ - sample models for testing the importer (Khronos Toy Car, CC0; sample cube) and assets/testpack/ (Kenney Yard test level and the Quaternius SWAT test character, each as FBX Z-up/cm and GLB, CC0, with the Blender scripts that build them).

Credits

Muse Glimmer, coached by Grok Bot, hosted by Axonis Pty Limited (Paul Buckingham)

Hardware

Look B and the Muse-written engine modules were generated on a classic early dual Tesla P100 in an HP DL380 Gen9, Ubuntu 24.04, llama.cpp.

Licences

  • —MIT covers the engine and both built-in scenes/looks (Look A · Breaker Bay, including the map, and Look B · Scrap Dusk). Reuse them freely under the MIT terms. See LICENSE (Copyright (c) 2026 Paul Buckingham / Axonis Pty Limited); the same file is also in engine/ and game/.
  • —The Axonis name and logo are reserved. The Axonis name and logo are not covered by the MIT licence.
  • —Models you load stay under their own licence. Loading a model does not relicense it; you are responsible for having the rights to use it.
  • —Loaders: .glb/.gltf and .fbx files are read by the own loaders in engine/gl2/ (MIT, no third-party library). glTF is an open, royalty-free Khronos standard; FBX is an Autodesk format.
  • —Third-party files keep their own licences: the Khronos Toy Car, the Kenney Yard test level (built from Kenney Starter Kit FPS models) and the SWAT test character (Quaternius, Ultimate Modular Men Pack) are CC0-1.0. No Autodesk sample files and no Mixamo content are used. The full list with sources is in ASSETS-LICENSES.md. Files with unclear rights (old project sound files and diary clips) are excluded from this release.