Commit Graph

55 Commits

Author SHA1 Message Date
94e682cff4 Merge pull request #3341 from NiiRoZz
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:19 -05:00
1c01a0a087 Merge pull request #2899 from andretuta
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:06:20 -05:00
c1f812ae9a anim_move: decode MoVE v19 state-machine containers in anim.rpf (ASSET-86) 2026-11-22 20:40:36 -03:00
f22aa1472f Merge pull request #3341 from NiiRoZz 2026-11-22 17:01:32 -05:00
64e54c5a94 Merge pull request #3294 from eyyun
# Conflicts:
#	docs/animation.md
2026-11-22 17:01:17 -05:00
b77606dad2 Merge pull request #2406 from Kacper Serewis 2026-11-22 16:59:13 -05:00
9628bf207e anim_clips: count the +0x20 array of multi-axis motion nodes
From @ismailchaka1's check on #3341: types 4-8 have a {ptr, count} array at
+0x20 (null on type 4 and on 431 of 482 type-5 nodes; on every type-6/8 node,
items {u32, 0, u32, 0}). Counted as motion_node_pairs:<type>:<count|null> and
documented; the values are not decoded. Rechecked on anim.rpf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:58:31 +01:00
dac28e6b19 Fix what the round-42 merges broke (tests and docs)
- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
  deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
  its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
  resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
  the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
  allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
  reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
  orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:14:54 -05:00
ef9230b950 Merge pull request #3155 from Kacper Serewis 2026-11-22 15:15:15 -05:00
3e0a88bc96 Merge pull request #3135 from Vonsek 2026-11-22 15:15:02 -05:00
da1ed8005f Merge pull request #2899 from andretuta 2026-11-22 15:12:58 -05:00
a92d95386d Merge pull request #2764 from Kacper Serewis
# Conflicts:
#	docs/animation.md
2026-11-22 15:11:44 -05:00
cf3c48f6b2 ASSET-158: clarify the historical census and reference indices
AI-assisted documentation rebase. Checked the recorded offsets and reference index range against the format notes and reader.
2026-11-22 21:11:01 +01:00
d39dcc3bd6 ASSET-259: decode .motion node types and the sample-to-child lists
Parameter node types 3, 4, 5, 6 and 8 carry 1-5 axes ({u32 name hash, u16,
u16} at +0x10); types 4/5/6/8 keep their sample count at +0x90/+0x90/+0x50/
+0xA0, type 1 at +0x20. The .motion's +0x90 lists (one per node sample,
items {u32 child, f32, f32}) map each sample to a child: checked on all
8,932 one-node motions in anim.rpf. Counts only; synthetic tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 21:10:20 +01:00
fa342a822f tools: match anim.rpf SKEL_* bone lists against packs.rpf skeletons (ASSET-231) 2026-11-22 22:59:55 +03:00
262423974d Require pack membership evidence before a named page boundary 2026-11-22 20:47:42 +01:00
9d0d7a0490 anim_skel_match: the anim.rpf bone tables are joints of the 596/560-bone humanoid skeletons (ASSET-231)
docs/animation.md said the bone names in anim.rpf's four bone-table streams
could not be matched to a skeleton, because the pages carry no model name and
the model manifest no bone names. A skeleton carries its own names, though
(joaat32 at bone record +0x1C, name at +0x30). The new tool reads the names out
of the four streams and every skeleton anim_glb reads in packs.rpf, and counts
matches by joaat32 of the lowercased name.

On the 1.0.2.1 package: all 30 names are joints, all with the same spelling;
only the 596-bone female and 560-bone male humanoid skeletons hold every one
(14,212 skeletons, 199 distinct); the 15-name table is shared by 69 distinct
smaller rigs. animation.md records the counts.
2026-11-22 20:42:04 +01:00
15f5b2fbc0 Fix what the round-41 merges broke
- tests/semantic: BaseVertex/BaseInstance read 0 in the wave interpreter; the LDS MockGens follow
  SHADER-309 (lds_bound, lds_access, lds_atomic); abs emission tests load their operand, since
  SHADER-315 folds scalar ALU on constants.
- test_translate: the dynamic gather sampler is a loaded word, not s16 + 0 (SHADER-315 folds it).
- test_world_build: DDS downscale weights colours by alpha (62804d0d).
- test_fspx_shaders_stage: the fake disassembler writes the listing make_game now checks.
- xgameruntime_test: re-read the package id after clearing the LEONIDA_PACKAGE_ID override.
- docs: one row per topic again in design.md (72 topics) and README.md; one Other languages line;
  embedded_shaders.md keeps one copy of each bullet; animation.md links the heading anchor.
- tools/scripts: character_textures uses report_paths.same_report_path; stdout guard on six programs;
  LF write in vs_input_survey; the cl.exe fallback compiles winhttp_offline.cpp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:30:33 -05:00
9753dc436b anim_move: report per-container child counts and fix max single-stream byte size 2026-11-22 16:25:29 -03:00
079643ebfa ASSET-158: distinguish the census filter from reference indices
AI-assisted, verified against the original archive scan.
2026-11-22 19:42:53 +01:00
d83724030c Merge remote-tracking branch 'origin/main' into asset-158-fragment-bindings 2026-11-22 19:42:35 +01:00
f77d337315 anim_move: decode MoVE v19 state-machine containers in anim.rpf (ASSET-86) 2026-11-22 15:38:41 -03:00
0a88c2971a Link the animation reference to its auxiliary-table heading 2026-11-22 19:28:24 +01:00
de1c6b4194 Merge pull request #2406 from Kacper Serewis 2026-11-22 13:15:04 -05:00
2651d688d1 Check unresolved archetype references across the other package archives 2026-11-22 18:28:19 +01:00
ca540fb35a Resolve archetype clip references and frame the 0DRP auxiliary payloads 2026-11-22 18:09:01 +01:00
2848b49de8 Measure clip dictionary coverage across fragment skeleton tables (ASSET-158) 2026-11-22 17:56:54 +01:00
b745f93946 anim_glb: export a skinned part with its skeleton and clips as an animated GLB
tools/anim_glb.py reads a fragment's skeleton (drawable +0x18: bone records,
inverse bind matrices, parents), binds part meshes to it through the model
bone list at grmModel+0x28 (ASSET-12 skin layouts), and writes decoded
anim.rpf clips as glTF animations: bonerotation/bonetranslation/bonescale
drive the joint with the track's bone hash, bone hash 0 drives a mover node,
and a clip entry maps animation time t to (t - start) / rate. --coverage
counts how many clip bone tracks name a skeleton joint.

docs/character_skeleton.md: the instance table was read 0x40 bytes late, so
each row paired a bone with the next bone's TRS. Read from the record start,
the default transforms compose to the stored inverse bind matrices (5.1e-6 m
female, 3.3e-6 m male, all 14,212 skeletons in packs.rpf within 1e-3). The
model bone list is at +0x28, not +0x20. New "Animated glTF export" section
with the measured counts; animation.md, models.md, character_models.md and
the docs index follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:17:37 +00:00
4763e0f7fc anim_rigs: read the four RIG dictionaries in anim.rpf and resolve the RBF0 rig entries (ASSET-20)
The rig dictionaries share the clip dictionary root; each map value points at +0x20 to a RIG block of
{kind, size, count, word} tables. Their names are the RBF0 sources, and all 6,677 rig-set entries resolve
to a key there. docs/animation.md gets the layout, the counts and the clip-to-skeleton measurement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:59:03 +01:00
7a5be8a87e Merge pull request #1645 from Kam471
# Conflicts:
#	docs/animation.md
#	docs/models.md
2026-11-22 08:08:25 -05:00
97289391da docs: sync the remaining 917e9b9 model-count citations 2026-11-22 12:52:31 +00:00
76e5e8ef8b docs: correct the 917e9b9 baseline for story000_restofworld (3 models, not 0) 2026-11-22 12:24:13 +00:00
17f39ac44f anim_clips: read .motion child times and one-axis parameter nodes
.motion +0x70 holds one 0x28-byte item per child: the child's duration, its
duration in the blend and a (child time, blend time) curve. On anim.rpf the
first float is bit-for-bit the named .clip's duration for all 111,948 children
that name a .clip there; 158,991 of 159,584 curves are the identity and 402 are
monotonic time warps.

The parameter node is at +0x138 (+0x58 = 1) or at +0x18 of the block +0x120
points at (+0x58 = 2). Type 3 (10,171 of 17,247) is one sampled axis: a name
hash, (sample index, value) items sorted by value, min and max. 10 of the 88
axis name hashes resolve to joaat32 names such as yawangle and speed.

Also documents that the unlisted-last-page recovery needs the page map in a
listed stream (whattheflop's review on #1174): no anim.rpf root and no
story000 clip dictionary has its page map in such a tail. A synthetic test
keeps that layout unresolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 09:08:55 +00:00
eb739d2b0d docs: Windows paths in the story000 command, as in the rest of the page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:53:59 +00:00
69111ebe5e docs: anim_clips on story000.rpf (9,190 clip dictionaries, all animations decode)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:53:48 +00:00
590225ad0d anim_clips: join the 36 unresolved dictionaries and resolve .motion children
The 36 roots whose second system page is not the next listed stream have it
right after the first stream: a zlib stream inflating to 16-48 bytes, which
anim_index.py does not list (it keeps streams of 64 bytes or more), or a
16-byte raw page. group() now tries that page and joins it only when the
pages parse as a clip dictionary. All 36 join; 191,042 animations decode.

.motion clips list their children as {u64 0; u32 clip hash; u32 dictionary
hash} at +0x60, and the root's hash-only +0x70 references are dictionary
hashes. scan() joins both across the archive: 111,948 of the 114,925
children whose dictionary is in anim.rpf name a .clip of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 07:45:31 +00:00
09d3841df8 anim_clips: decode the clip dictionaries in anim.rpf to keyframes
tools/anim_clips.py groups the stream walk of anim_index.py into RAGE
resources via the page map at the +0x08 pointer, finds the clip
dictionaries (system-only, 1 or 2 pages) and decodes dictionary -> clips
-> packs -> animations -> sequences -> channels. Channel types 0-5, 7, 8
and the GTA VI type 10 (second-order delta coding) are decoded. Output is
counts and per-dictionary rows only; --decode prints one dictionary's
values to stdout for local use.

docs/animation.md gets a "Keyframe decoding" section with the layouts and
the measured full-archive counts, and the statements it makes stale are
updated: 0x98e1750c is joaat32("bonerotation"), the 2/3 packed streams
are second system pages of 0DRP resources, and keyframes are decoded for
the clip dictionaries. tests/test_anim_clips.py builds synthetic
resources, including a type-10 encoder for a round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:17:56 +00:00
b27b92a101 Count stored rig-name hashes in animation index reports
(cherry picked from commit 9940b3f05717a8291c25efd04780b4a8ae60a489)
2026-11-22 00:33:51 -05:00
050ea3dcfa Docs: re-count the model-bearing archives at rpf9-explorer 917e9b9 (ASSET-49)
Fresh scan/recover at the new pin, no cache, across every model-bearing archive. The new pin recovers 350,248 models (159,483 drawable-dictionary children) against 190,792 at c3708fb.

Per archive: levels.rpf 314,000 (130,225 children), story000 7,460 (4,156), packs 24,034 (23,720), data 2,581 (268), shared_minigame000 1,288 (317), core_restofworld 885 (797). The standalone total is 190,765, 27 below the c3708fb recovery (duplicates merged). levels.rpf is the sum of ten parallel recovery shards over 206,981 candidates; the last shard rejects 1,009 incomplete/duplicate tail pages. Triangle totals and the C# TTPF texture counts were not re-run.
2026-11-22 02:30:07 +00:00
0786a08395 Docs: measure the character skeleton and clip sidecars
Add a character-skeleton page: 597-name #ft table, the following 597-record parent/reference-TRS table, the model bone-hash mapping, and the character material texture-parameter split. Update animation.md with the partial clip decode (two named clips, 0x48-byte track arrays, 63/38 and 12/38 masks) and the 46-byte MoVE header correction. Link the new page from models.md and design.md. No game data.
2026-11-22 00:44:04 +00:00
fe8cd6bc72 Tools: reject out-of-range --start/--limit in RPF index tools
Adds the #283 argparse validators to anim_index, rbf0_index, restofworld_index and rpf9_carve: --start >= 0, --limit >= 1 (decimal or 0x hex), and --max-inflate >= 1 in restofworld_index. Bad ranges now exit 2 before any scan or output instead of silently scanning everything, less, or nothing. Synthetic CLI tests in all four test files; docs notes for each tool.

New item claimed in #156. AI-assisted (OpenCode).
2026-11-21 16:53:41 -06:00
d50ba56650 Tools: decode RBF0 trees for UI and subtitles
Add a stdlib record/tree decoder for the measured RBF0 format. It joins 64 KiB continuations, parses the inline descriptor table, builds element/attribute/content/text trees, and writes JSON plus optional generic XML. Unknown descriptors, record types and malformed framing fail closed with a partial tree. Add synthetic tests and the measured grammar, samples and remaining unknowns to docs/rbf0.md; note the rig-set blob tree result in docs/animation.md.
2026-11-21 21:01:14 +00:00
df508f3444 docs: distinguish hash presence from record confirmation 2026-11-21 19:06:07 +00:00
df86dba224 docs: scope the motion-matcher sample 2026-11-21 19:04:30 +00:00
2a0a77f15b docs: scope the bone-table resource count 2026-11-21 19:04:04 +00:00
018fda6d82 tools: parse RBF0 rig sets and bone-table resources 2026-11-21 19:02:31 +00:00
fa54b20fc5 docs: state the RBF0 block-boundary evidence 2026-11-21 18:40:02 +00:00
672ecbb8eb docs: tighten the measured claims and caveats 2026-11-21 18:38:54 +00:00
63e0069eb7 docs: correct type-hash and packed-clip measured counts 2026-11-21 18:38:15 +00:00
5e79a65c68 docs: identify the name-table hash as joaat32 of the path stem 2026-11-21 18:37:12 +00:00