Viewer: sliding doors slide #190

Manually merged
github merged 2 commits from gh-pr/190/head into gh-pr/190/base 2026-11-26 20:16:47 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 18:21 UTC · original
holdmysocks:claude/sliding-doors → master · +70 −8 · 4 files · 2 commits · merged 2026-11-24 19:12 UTC

What

Sliding doors slide in the viewer. Before, every door bone was treated as hinged, so a van's side door swung out like a car door.

  • Which doors slide comes from the bone flags. The low byte is the bone's freedom: 0x07 rotation about x, y, z; 0x08 rotation limited; 0x70 translation along x, y, z; 0x80 translation limited. A hinged door has 0x7f, a sliding one 0xf7. drawable::slides tests flags & 0x88 == 0x80 on door_* bones, and the export writes the names to model.json as sliding_doors (with a note).
  • Which way comes from the bone: a sliding door's bone is turned a few degrees about the vertical (8 on the minivan's rear doors), so its own forward axis is the track and the door moves out of its opening as it moves back. It always moves towards the rear.
  • How far is not stored in the model. The door's front edge stops 5 cm short of the rear end of its opening at sill height (never more than 0.9 of the door's length), reached at 1.0 on the "doors open" slider. The first version used 0.9 of the length everywhere; the user saw the minivan's roller bracket (on the door's bottom front edge) run into the panel ahead of the wheel arch. Minivan travel: 1.15 m -> about 0.91 m.
  • door_dside_m / door_pside_m (a van's middle side door) are now door bones too.

EXPORT_VERSION 22 -> 23, so the viewer exports cached vehicles again and picks up sliding_doors.

Checked

Viewer, doors closed and open, same camera:

model sliding result
minivan_hi door_dside_r, door_pside_r rear doors slide back along the body, front doors still swing
boxville_hi door_dside_f, door_pside_f cab doors slide back behind the cab wall
youga2_hi door_dside_m (flags), side door slides back; front doors swing
  • cargo build -p sixng-cli -p sixng-gui passes.

Not decoded / not done

  • The slide distance and the hinge angles are not stored in the skeleton; where the game keeps the limits (the fragment's joint data, presumably) was not found. The stop is an estimate from the door's shape.
  • The names of the flag bits are a reading of which bones carry them (hinged doors, bonnets with 0x0f, sliding doors), not confirmed otherwise.
  • How many vehicles have sliding doors was not counted; three were looked at.
  • sixng vehicle exports the bind pose and is unchanged. The Metal renderer was not built or run.
  • No unit test.
**@⁠holdmysocks** on GitHub · 2026-11-24 18:21 UTC · [original](https://github.com/holdmysocks/SixNG/pull/190) `holdmysocks:claude/sliding-doors` → `master` · +70 −8 · 4 files · 2 commits · merged 2026-11-24 19:12 UTC ## What Sliding doors slide in the viewer. Before, every door bone was treated as hinged, so a van's side door swung out like a car door. - **Which doors slide** comes from the bone flags. The low byte is the bone's freedom: 0x07 rotation about x, y, z; 0x08 rotation limited; 0x70 translation along x, y, z; 0x80 translation limited. A hinged door has 0x7f, a sliding one 0xf7. `drawable::slides` tests `flags & 0x88 == 0x80` on `door_*` bones, and the export writes the names to `model.json` as `sliding_doors` (with a note). - **Which way** comes from the bone: a sliding door's bone is turned a few degrees about the vertical (8 on the minivan's rear doors), so its own forward axis is the track and the door moves out of its opening as it moves back. It always moves towards the rear. - **How far** is not stored in the model. The door's front edge stops 5 cm short of the rear end of its opening at sill height (never more than 0.9 of the door's length), reached at 1.0 on the "doors open" slider. The first version used 0.9 of the length everywhere; the user saw the minivan's roller bracket (on the door's bottom front edge) run into the panel ahead of the wheel arch. Minivan travel: 1.15 m -> about 0.91 m. - `door_dside_m` / `door_pside_m` (a van's middle side door) are now door bones too. `EXPORT_VERSION` 22 -> 23, so the viewer exports cached vehicles again and picks up `sliding_doors`. ## Checked Viewer, doors closed and open, same camera: | model | sliding | result | |---|---|---| | `minivan_hi` | `door_dside_r`, `door_pside_r` | rear doors slide back along the body, front doors still swing | | `boxville_hi` | `door_dside_f`, `door_pside_f` | cab doors slide back behind the cab wall | | `youga2_hi` | `door_dside_m` (flags), side door | slides back; front doors swing | - `cargo build -p sixng-cli -p sixng-gui` passes. ## Not decoded / not done - The slide distance and the hinge angles are not stored in the skeleton; where the game keeps the limits (the fragment's joint data, presumably) was not found. The stop is an estimate from the door's shape. - The names of the flag bits are a reading of which bones carry them (hinged doors, bonnets with 0x0f, sliding doors), not confirmed otherwise. - How many vehicles have sliding doors was not counted; three were looked at. - `sixng vehicle` exports the bind pose and is unchanged. The Metal renderer was not built or run. - No unit test.
A door bone whose flags allow a limited translation and no limited
rotation (0xf7 against a hinged door's 0x7f) slides along its bone's
forward axis towards the rear. model.json lists them as sliding_doors.
The door's front edge stops 5 cm short of the rear end of its opening at
sill height, so a roller bracket on the door's bottom front edge stays in
the opening (the minivan's ran into the panel ahead of the wheel arch).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:16:46 +00:00
github manually merged commit 649aa07a01 into gh-pr/190/base 2026-11-26 20:16:47 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.