Convertibles: the roof animation in the export and the viewer #55

Manually merged
github merged 3 commits from gh-pr/55/head into gh-pr/55/base 2026-11-26 20:06:14 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-23 15:48 UTC · original
holdmysocks:claude/roof-animation → master · +229 −9 · 5 files · 3 commits · merged 2026-11-23 16:48 UTC

The roof-folding animation of convertibles, found and wired into the export and the viewer.

  • Where it is. A convertible's model info names it as in GTA V: animConvRoofDictName = joaat(va_<model>), animConvRoofName = joaat(roof). The dictionaries are in levels.rpf as unnamed entries (170 clip dictionaries there, 11 of them va_*).
  • Export. model.glb gets the clip as a glTF animation va_<model>/roof; model.json gets roof_animation with the source, duration and bone coverage.
  • Viewer. A "roof fold" slider plays the clip. The viewer now also reads joint nodes written as translation / rotation / scale, which a GLB with an animation uses.

The viewer re-exports cached vehicles that predate this.

Checked

  • All ten convertibles among the 284 surveyed vehicles have the clip and every animated bone is on the car's skeleton (3.8 to 11.1 s, 12 to 74 channels).
  • In the viewer: sentinelclassic2 at six points of the clip, comet7 mid-fold, windsor2 stowed, and blista2 (no clip) with doors open.
  • 135 core tests pass.

Not done

va_jubilee holds a sunroof clip (sunroof_r_anim) that is not wired in. The exported GLB was checked for the animation but not opened in another tool.

Stacked on #54

This branch sits on #54 (dual wheels, skeleton fix, the roof switch), which it needs, and targets that branch so the diff shows only the animation work. Merge #54 first.

**@⁠holdmysocks** on GitHub · 2026-11-23 15:48 UTC · [original](https://github.com/holdmysocks/SixNG/pull/55) `holdmysocks:claude/roof-animation` → `master` · +229 −9 · 5 files · 3 commits · merged 2026-11-23 16:48 UTC The roof-folding animation of convertibles, found and wired into the export and the viewer. - **Where it is.** A convertible's model info names it as in GTA V: `animConvRoofDictName` = joaat(`va_<model>`), `animConvRoofName` = joaat(`roof`). The dictionaries are in `levels.rpf` as unnamed entries (170 clip dictionaries there, 11 of them `va_*`). - **Export.** `model.glb` gets the clip as a glTF animation `va_<model>/roof`; `model.json` gets `roof_animation` with the source, duration and bone coverage. - **Viewer.** A "roof fold" slider plays the clip. The viewer now also reads joint nodes written as translation / rotation / scale, which a GLB with an animation uses. The viewer re-exports cached vehicles that predate this. ## Checked - All ten convertibles among the 284 surveyed vehicles have the clip and every animated bone is on the car's skeleton (3.8 to 11.1 s, 12 to 74 channels). - In the viewer: sentinelclassic2 at six points of the clip, comet7 mid-fold, windsor2 stowed, and blista2 (no clip) with doors open. - 135 core tests pass. ## Not done `va_jubilee` holds a sunroof clip (`sunroof_r_anim`) that is not wired in. The exported GLB was checked for the animation but not opened in another tool. ## Stacked on #54 This branch sits on #54 (dual wheels, skeleton fix, the roof switch), which it needs, and targets that branch so the diff shows only the animation work. Merge #54 first.
- Skeletons: a bone name with a dash ended the bone array. Vehicle
  skeletons name their breakable joints that way
  (connect-chassis-bumper_f-1), so a motorhome's skeleton stopped at bone
  107, before its wheel bones, and 18 of its meshes had joints with no
  bone. Names may now hold - . # + and spaces.
- Dual wheels: the inner wheel of a pair has its own bone
  (wheel_lr_inr, wheel_lm1_inr) and its own collision disc. wheel_mounts
  lists them, and each mount takes the nearest of two equally large discs
  (outer and inner can be 12 cm apart). model.json gets
  wheel_mounts_version 2. The viewer draws the inner wheel mirrored.
- Viewer: a rim_train_* / rim_metrotrain_* rim gets no tyre and keeps its
  own width (it comes with its axle stub). It was given a car tyre.
- Viewer: an electric scooter has no rim in its configurations and a
  wheelScale of 0.08, like a helicopter, and lost its wheels to the
  helicopter rule. That rule now also needs the wheels to have no
  collision discs. A configuration with a tyre and no rim takes a rim of
  the tyre's kind.
- Viewer: "roof down" for convertibles hides what hangs on the
  convertible_roof bone except the roof cover (--roof-down in
  automation).

Checked in the viewer on eboost, spreader, trailers, traileruld2,
traincar2, trotter, trlr_tnkr and sentinelclassic2.

Not found: a roof-folding animation. Nothing in the animation index is
named after the car, its roof bones or a soft top, so the roof is a
switch. trlr_tnkr has no wheel bones and no wheel discs (55 bones): it
is taken as a body that sits on a separate chassis, which was not
identified.
A convertible's model info names its roof animation as in GTA V:
animConvRoofDictName = joaat("va_<model>") and animConvRoofName =
joaat("roof"). The dictionaries are in levels.rpf as entries without a
recovered name (170 clip dictionaries there, 11 of them va_*); the
existing clip decoder reads them.

- anim: level_dictionaries (names cached in
  <work>/index/levels.clipdicts.json) and vehicle_roof.
- Export: a vehicle with a va_<model>/roof clip gets it in model.glb as a
  glTF animation of the joint nodes, and model.json gets roof_animation
  (source, duration, bone coverage). Time 0 is the roof up, the end the
  roof stowed.
- Viewer: a "roof fold" slider plays the clip (--roof 0..1 in
  automation). The "roof down" switch stays for a car with roof bones and
  no clip.
- Viewer: joint nodes written as translation / rotation / scale are read.
  Only matrices were, and a GLB with an animation writes its joints as
  TRS, so its joints loaded at the origin.

All ten convertibles among the 284 surveyed vehicles have the clip
(carbonizzare, comet7, dominator9, dominatorclassic, lasso, schutzen,
sentinelclassic2, vigero3, windsor2, zion2; 3.8 to 11.1 s, 12 to 74
channels) and every animated bone is on the car's skeleton. Watched in
the viewer on sentinelclassic2, comet7 and windsor2.

Not wired: va_jubilee holds a 1.7 s clip sunroof_r_anim (2 bones). The
exported GLB was checked for the animation but not opened in another
tool.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:06:13 +00:00
github manually merged commit f91f4854a9 into gh-pr/55/base 2026-11-26 20:06:14 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.