Skip to content

docs/models.md: measured reject classes for the 71 levels.rpf fragments (ASSET-504) - #6102

Open
abilliontokens wants to merge 6 commits into
ItsNotRexed:mainfrom
abilliontokens:modelrecovery/fragment-candidates
Open

abilliontokens wants to merge 6 commits into
ItsNotRexed:mainfrom
abilliontokens:modelrecovery/fragment-candidates

Conversation

@abilliontokens

@abilliontokens abilliontokens commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds the measured three-class breakdown of the 71 unrecovered fragment candidates in levels.rpf at the e293917 pin to docs/models.md.

Depends on: #5674 (ASSET-430 pin bump to 16134b0). This PR is rebased on top of #5674's head (63a81ccc3) and only adds the classification subsection; all pin text and re-count numbers remain #5674's. It merges cleanly into #5674 (verified with git merge-tree --write-tree). #4687 owns the 7ef5c51 pin referenced in the classification.

Item: ASSET-504 (the 71 unrecovered fragment candidates in levels.rpf).

AI-assisted (omp orchestrator).

What this PR adds vs. what it leaves to #5674

  • Adds: the ##### Measured reject classes at e293917 subsection under the e293917 re-count — the instrumented-recovery method, the 64/1/6 class table, and the per-pin recovery counts (64 at 7ef5c51, 65 at 16134b0).
  • Leaves to ASSET-430: Integrate merged rpf9-explorer fragment recovery fix #5674: the 16134b0 pin bump, the ten-archive re-count table, the ASSET-430 prose, and all other docs/models.md rewrites.

Classification (counts and failure classes only, no game data)

Re-ran recovery over all 235,330 levels.rpf candidates with an instrumented copy of Rpf9ModelRecovery.TryResource that records which check drops each candidate (the same method used for the 917e9b9 classification). The instrumented run reproduces the release counts exactly (235,259 recovered, 71 rejected) and yields:

Class Count Mechanism
Large-mesh index buffers 64 system/graphics split found, but RageModelDecoder.Decode rejects the drawable (mesh > 65,535 triangles or vertex references); the recovery loop keeps requesting continuation blocks until the archive ends and reports no continuation
Short secondary LOD palette 1 LooksLikeFragment true but the ordinary extent probe cannot complete (MetadataComplete == false on the first block), leaving the split ambiguous; the declared-split fragment probe resolves it
Extent probe returns null 6 single-block .#ft fragments whose main drawable is empty (null LOD0–3, empty-sentinel bounds), so ExtentReader.Probe() fails LooksLikeDrawableHeader and returns null; Rpf9TextureRecovery recovers none, so they are not texture dictionaries

The 64 are recovered by upstream rpf9-explorer#18 and the 1 by rpf9-explorer#26. The 6 remain rejected at 16134b0 and at upstream main 4eee1e6.

Why the 6 fail (commit 1b4c83a47): they are the 6 fragments that docs/character_models.md (ASSET-261, tools/fragment_children.py) counts as having "a main drawable that fails the embedded-drawable header test".

  • Each declares two 0x110-byte drawable records (u16 +0x30 = 2).
  • All of the geometry is in the child record at main +0x110, whose LOD0 pointer is at main +0x160.
  • A scratch copy of the 16134b0 decoder that reads the LOD groups from the child record recovers all 6, from 1 mesh / 55 vertices to 2 meshes / 3,638 vertices.
  • With that copy, a full levels.rpf run recovered 235,330 of 235,330 candidates with none lost.
  • The decoder fix belongs in the submodule. It is reported upstream as rpf9-explorer#29, with a structural description only.
  • Whether the child record is a detail or variant drawable is stated in the doc as a hypothesis.

Fragment child drawables are not exported (commit 82459b7e3): this adds a new docs/models.md subsection.

  • Omitted: tools/rpf9dump models writes only a fragment's main drawable, so its OBJ and manifest output, and batch_glb.py/world_build.py downstream, omit the 735 child drawable records of the 734 levels.rpf child-array fragments.
  • Why: the decoder API pins fragments to +0x18 (Require(selectedOffset == drawable)), and DecodeModels splits only dictionaries. This is the same at e293917, 16134b0 and 4eee1e6, so it is not a Leonida-side filter.
  • How measured: a scratch harness repeats Export() at e293917. It reproduces the levels.rpf export exactly (343,327 models, 2,509,947,536 triangles).
  • Counts: the child records hold 3,520 meshes, 2,065,882 vertices and 1,992,588 triangles. All 735 decode at LOD0, and none shares a buffer with an exported mesh. 41 are byte-identical copies, and excluding them leaves 3,479 meshes, 2,060,291 vertices and 1,985,528 triangles.
  • Scale: that is about 31% of these fragments' exported geometry, and 0.079% of the archive's exported triangles.
  • Upstream: the API request is on rpf9-explorer#29.

Tests

Docs-only change. All docs-structure tests pass:

python -I tests/test_docs_links.py          -> OK
python -I tests/test_docs_list_items.py     -> OK
python -I tests/test_docs_table_rows.py     -> OK
python -I tests/test_docs_repeated_lines.py -> OK
python -I tests/test_docs_repo_paths.py     -> OK
python -I tests/test_docs_table_ids.py      -> OK
python -I tests/test_docs_cli_flags.py      -> OK
python -I tests/test_docs_design_rows.py    -> OK
python -I tests/test_docs_env_vars.py       -> OK
python -I tests/test_docs_pr_template.py    -> OK
python -I tests/test_docs_python_deps.py    -> OK
python -I tests/test_design_contract_rows.py -> OK
python -I tests/test_i18n_index.py          -> OK

git diff --check: clean.

Commits 59b50494c, 1b4c83a47 and 82459b7e3 on modelrecovery/fragment-candidates (rebased on #5674 head 63a81ccc3), then merge commit 0cfadb646, which brings in origin/main at 1cc6e3c12 without rewriting them. Its only conflict was the status table in README.md: main had dropped the duplicated rows next to the Models row (#6323), so the merged table keeps main's rows and the 16134b0 Models row. Docs tests above re-run at 0cfadb646: all OK; git diff --check clean.

Environment

Windows 11, .NET 8 SDK, third_party/rpf9-explorer at 16134b0 (matching #5674's pin). Game package read-only (no game data committed; counts and failure classes only).

…ts (ASSET-504)

Add the three-class breakdown (64 large-mesh index, 1 short secondary
LOD palette, 6 extent-probe-null) with the instrumented-recovery method,
on top of ItsNotRexed#5674's pin bump and re-count. The classification is additive;
pin text and re-count numbers remain ItsNotRexed#5674's.
@abilliontokens
abilliontokens force-pushed the modelrecovery/fragment-candidates branch from 800396e to 59b5049 Compare November 23, 2026 13:15
@abilliontokens abilliontokens changed the title docs/models.md: classify the 71 levels.rpf fragment rejects at e293917 (ASSET-504) docs/models.md: measured reject classes for the 71 levels.rpf fragments (ASSET-504) Nov 23, 2026
@memorypressure

Copy link
Copy Markdown

Re-verified at your current head 59b5049 — you force-pushed mid-review (800396e → three commits incl. the ASSET-430 submodule pin bump to 16134b0), and this comment covers the new head: all docs guards pass (links 6, list-items 2, design-rows 4, repeated-lines 2, contract-rows 4, i18n 9) and the arithmetic reconciles — 383,997−382,781 = 1,216 = 65 recovered rejects + 1,151 new candidates (65 + 250 levels, 899 packs, 2 minigame), rejects 72→7 with the textures.rpf dictionary reject unchanged. No game data in the diff, just counts. The pin bump and the upstream #18/#19/#26 content claims are not re-derivable from this host. FYI: README.md lines 55/57 carry a pre-existing duplicated Models (OBJ) row pair — also on main — and only the first received the new count. Checks now pending, none failing. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

…ent probe (ASSET-504)

Main drawable empty, geometry in the 0x110 child record; links rpf9-explorer#29. AI-assisted (omp orchestrator).
…s.rpf counts (ASSET-504)

AI-assisted (omp orchestrator).
…t-candidates

Conflicts in README.md: main dropped the duplicated status rows (ItsNotRexed#6323) next to the Models row that ItsNotRexed#5674 re-counts at 16134b0. The merged table keeps main's rows and that 16134b0 row.
@abilliontokens

Copy link
Copy Markdown
Contributor Author

New head 0cfadb646: merge commit 0cfadb646 brings origin/main at 1cc6e3c12 into the branch and was pushed as a fast-forward, so 59b50494c (re-verified by memorypressure) and 82459b7e3 stay in the history unchanged.

  • Changed against 82459b7e3: only what main brought in, plus one resolved conflict in the status table of README.md. main had dropped the duplicated rows beside the Models row (README: drop duplicated rows in the project status table #6323), so the merged table keeps main's rows and the 16134b0 Models row; the duplicated pair noted in the review is gone.
  • Diff against main: the same 9 files with the same line counts as before the merge.
  • Tests at 0cfadb646 (Windows 11): the 11 tests/test_docs_*.py guards, tests/test_design_contract_rows.py and tests/test_i18n_index.py pass; git diff --check is clean; scripts/merge_check.py reports clean.

#5674 is unchanged (63a81ccc3), so Depends on: #5674 stays. AI-assisted (omp orchestrator).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants