Cutscenes: join the streamed section dictionaries into scene clips #213

Manually merged
github merged 1 commit from gh-pr/213/head into gh-pr/213/base 2026-11-26 20:18:41 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 21:52 UTC · original
holdmysocks:claude/cutscene-sections → master · +535 −104 · 7 files · 1 commits · merged 2026-11-24 22:05 UTC

Most cutscene clips couldn't be played: their animation is streamed in the scene's cin@<scene>-<N> section dictionaries. This joins those sections back in, so outfit --clip cin@<scene> and clips cin@<scene> play each clip over the whole scene.

How the sections fit together (read from the files):

  • A scene clip plays the scene in sections, one per camera cut. The clip's +0x68 / +0x70 hold a list of 0x18-byte sections {ptr windows, u16 count, u16, f32 duration}, played one after another. The durations add up to the clip's duration.
  • Each window (0x38 bytes) names an animation by its map key (+0x08) and the stretch of it to play (+0x28 start, +0x2C end, +0x30 rate). Its pointer is 0 when the animation is streamed.
  • The animations are pooled per skeleton or model and cut into pieces of about 16 or 32 s, at 60 frames a second. Example: cinematic_q8@female@0@60_0.anim holds every female ped of the scene. The section dictionaries keep these .anim objects in their clip map.
  • Earlier only the first section was read, so most clips looked unbound.

Measured on the story pack:

  • 143,050 streamed windows. 15 of them, in 2 scenes, have no animation in any section dictionary.
  • 4,720 of the 4,723 character cast entries now play in full. Before, 1,441 character clips played.
  • Lucia in air_beach_ext_p1_t05: 48.6 s, 11 sections, 2,917 frames. Mover and bone steps across every section start match the step before them, so there is no jump where sections meet.
  • anim.rpf clips are unchanged: a census of every 10th dictionary finds no multi-section and no pending clips.

Changes:

  • anim: clips read every section. Bindings carry a clip-time offset. Windows that are not in the dictionary are kept as pending. ClipDictionary::join adds section dictionaries. clip_tracks / clip_mover continue tracks across sections. Section dictionaries' .anim map values are decoded as animations.
  • cutscene: the catalog (v3, rescanned once, about 2 min) stores each scene's section ids and which windows are missing. load_dictionary loads a scene with its sections joined. The "streamed, not joined yet" refusal is gone.
  • CLI: cutscenes totals add streamed_windows, streamed_windows_missing and scenes_with_missing_windows. outfit and clips report sections and missing windows.
  • Test for the join and the continued time line. Research example sectprobe.

Not decoded yet: what the pool names' @0@ part means, and the scene files' timing and events.

**@⁠holdmysocks** on GitHub · 2026-11-24 21:52 UTC · [original](https://github.com/holdmysocks/SixNG/pull/213) `holdmysocks:claude/cutscene-sections` → `master` · +535 −104 · 7 files · 1 commits · merged 2026-11-24 22:05 UTC Most cutscene clips couldn't be played: their animation is streamed in the scene's `cin@<scene>-<N>` section dictionaries. This joins those sections back in, so `outfit --clip cin@<scene>` and `clips cin@<scene>` play each clip over the whole scene. **How the sections fit together** (read from the files): - A scene clip plays the scene in sections, one per camera cut. The clip's +0x68 / +0x70 hold a list of 0x18-byte sections `{ptr windows, u16 count, u16, f32 duration}`, played one after another. The durations add up to the clip's duration. - Each window (0x38 bytes) names an animation by its map key (+0x08) and the stretch of it to play (+0x28 start, +0x2C end, +0x30 rate). Its pointer is 0 when the animation is streamed. - The animations are pooled per skeleton or model and cut into pieces of about 16 or 32 s, at 60 frames a second. Example: `cinematic_q8@female@0@60_0.anim` holds every female ped of the scene. The section dictionaries keep these `.anim` objects in their clip map. - Earlier only the first section was read, so most clips looked unbound. **Measured on the story pack:** - 143,050 streamed windows. 15 of them, in 2 scenes, have no animation in any section dictionary. - 4,720 of the 4,723 character cast entries now play in full. Before, 1,441 character clips played. - Lucia in `air_beach_ext_p1_t05`: 48.6 s, 11 sections, 2,917 frames. Mover and bone steps across every section start match the step before them, so there is no jump where sections meet. - `anim.rpf` clips are unchanged: a census of every 10th dictionary finds no multi-section and no pending clips. **Changes:** - `anim`: clips read every section. Bindings carry a clip-time `offset`. Windows that are not in the dictionary are kept as `pending`. `ClipDictionary::join` adds section dictionaries. `clip_tracks` / `clip_mover` continue tracks across sections. Section dictionaries' `.anim` map values are decoded as animations. - `cutscene`: the catalog (v3, rescanned once, about 2 min) stores each scene's section ids and which windows are missing. `load_dictionary` loads a scene with its sections joined. The "streamed, not joined yet" refusal is gone. - CLI: `cutscenes` totals add `streamed_windows`, `streamed_windows_missing` and `scenes_with_missing_windows`. `outfit` and `clips` report sections and missing windows. - Test for the join and the continued time line. Research example `sectprobe`. Not decoded yet: what the pool names' `@0@` part means, and the scene files' timing and events.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:18:39 +00:00
github manually merged commit 24a26daa7c into gh-pr/213/base 2026-11-26 20:18:41 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.