3D fighters
Status: shipped behind the Cargo feature model3d, on by default. Rollback: remove model3d from default in the root Cargo.toml; the game then draws the 2D donor sprites and hides the 3D category.
Principle
The simulation stays 2D. Hitboxes, physics, state machine and rollback never read the model. A 3D fighter is a UMF fighter (assets/chars3d/<id>.json, usually extends a native kit) whose drawing is replaced by a GLB model, so a 3D fighter fights a 2D one with the same rules. Light mode (lite::scale() < 1) falls back to the 2D sprites.
Pipeline
Model::from_glbparses a.glb(own parser overserde_json, PNG textures throughpng): nodes, skins, meshes, materials, animations.StateMap(JSON) maps native anim names (anims) or MUGEN state ranges (states) to a clip, loop flag and speed.- The pose is a pure function of
anim_no/anim_elapsed(orstateno/statetime), skinned on the CPU, so it is rollback safe. Model::projectuses an orthographic camera on the fight plane, flat Lambert shading and back-to-front triangles, drawn throughume_shell::quad::draw_meshbatched by texture. No GPU pipeline change.
In the game
src/model3d.rsis the facade (draw,draw_fit,is_3d,portrait);src/model3d/specs.rslists the models.- Fight: one line in
render.rs. Select, versus and results panels:draw_fitinsidedraw_char_fit. Tiles and loading useportrait. - The select screen has a
3Dcategory. - The awakened form swaps to the second model (Ichigo: Hollow Total).
src/model3d/aura.rsdraws the 3D-only effects: theAfterImagetrail as additive tinted copies of the current frame (crimson Shunpo, gold Sonido in Hollow form) and a reiatsu barrier in front of the fighter in guard states (120-155) that flashes on guard hit (150-155).
Asset tools
tools/retarget (Python, stdlib only):
retarget.py <clips dir> <source.glb> <out.glb> <rig>bakes the clips listed inclips.jsononto a rig fromrigs.json.autorig.py <mesh.glb> <clips dir> <out.glb>fits a skeleton and skin weights to an unrigged mesh.keyposes.py <in.glb> <out.glb> <rig>bakes the hand-keyed clips ofkeyposes.json(Bankai stance, three-hit sword string, Getsuga wind-up, charge and release, Juujishou cross, Shunpo, Cero, guard, pointing win pose). A pose sets hips offset, torso/chest/head yaw-pitch-roll and limb directions as[azimuth, elevation]in character space (0 = toward the rival, +90 = his left);bladeRis solved byblade_solve.pyinto the wrist rotation that aims Zangetsu, andkeys_<rig>overrides a clip for one rig (the Hollow fires Cero from the horns). Feet stay on the floor automatically. Re-run on both GLBs after editing; the script is idempotent.- Contact sheet of clips:
cargo run --release -p ume-model3d --example clip_sheet -- <model.glb> <out.png> Clip1,Clip2 <frames>. - Portrait:
cargo run -p ume-model3d --example portrait -- <model.glb> <states.json> <out.png>. - Voices:
tools/voices/generate.py <id>adds the fighter tovoices.bankand keeps the other banks.
3D stage: Airport
airport3d ("3D Airport — Sunset") is a live 3D backdrop behind the same model3d feature, so dropping the feature removes the stage with no other change.
assets/model3d/airport.glb(128 KB) is generated bypython3 tools/airport/build.py <out.glb>(stdlib only): airliners, terminal with jet bridges, control tower, runway, hills, clouds and sun. No third party art; vertex colors per material,emissiveFactormarks unlit lights and the sun.- Clip
ambient(40 s loop): one jet lands on the far runway, one taxis across the apron, a baggage tug crosses the stand. Model::project_scene(crates/model3d/src/perspective.rs) is the perspective projector: near-plane clip, flat Lambert, per-vertex distance fog, gradient sky. It feeds the same z-bufferRasterused by the fighters.src/model3d/airport.rsrenders 480x270 (320x180 in lite mode) at 30 Hz into one texture that fills the stage rect; the 2D parallax scroll of illustrated stages still applies. Lite "backdrop off" shows a still of the same scene.- Measure:
cargo run --release -p ume-model3d --example airport -- assets/model3d/airport.glb out.png 480 270 1.
Ichigo moves
Jumps: D, U or U, U super jump (also in the air), two air jumps, three air dashes. Specials: Getsuga Tenshou (~D, DF, F, x), charged Getsuga (~D, DB, B, y, hold y; 45 ticks for the max wave), Shunpo (~D, DB, B, b, Sonido trail in Hollow form), Shunpo Rush, Hollow Cero (~D, DB, B, a, hold a; 40 ticks for the big beam), Getsuga Juujishou, Kuro Getsuga, Hollow Rampage; Hollow Total adds Cero Oscuras. Charges use the holdRelease move field (see UMF character).
Credits
See assets/model3d/ATTRIBUTION.md.