upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/models.md
diff options
context:
space:
mode:
authorKam471 <115741199+Kam471@users.noreply.github.com>2026-11-21 18:28:33 +0000
committerKam471 <115741199+Kam471@users.noreply.github.com>2026-11-21 18:28:33 +0000
commite09fd70be36d5377f310ce2ccf2ad5db318cbc3f (patch)
treebb6521a3c158ac9fa36a186a5cf6fd41482af11c /docs/models.md
parent6af5524df79890c811ca973c2e4d7623a808f9f2 (diff)
Docs: record independent validation of the model decoder fix
Diffstat (limited to 'docs/models.md')
-rw-r--r--docs/models.md75
1 files changed, 49 insertions, 26 deletions
diff --git a/docs/models.md b/docs/models.md
index 7fa2d1092..8f8341d57 100644
--- a/docs/models.md
+++ b/docs/models.md
@@ -1,27 +1,47 @@
1# Model recovery 1# Model recovery
2 2
3Measured state of `tools/rpf9dump models` on the Xbox Series 1.0.2.1 package, and the upstream 3Pre-fix measured state of `tools/rpf9dump models` on the Xbox Series 1.0.2.1 package, and the
4`rpf9-explorer` changes needed to recover the models it currently drops. 4upstream `rpf9-explorer` fix that closes it. The fix is validated but not merged yet.
5 5
6The short version: the exporter does not reject any vertex or index layout in the tested archives. 6Before the fix, the exporter did not reject any vertex or index layout in the tested archives. It
7It drops valid models in three validation paths, all in `third_party/rpf9-explorer` at commit 7dropped valid models in three validation paths, all in `third_party/rpf9-explorer` at commit
8`48557ea`. 8`48557ea`.
9 9
10## Upstream status 10## Upstream status
11 11
12[Leonida issue #29](https://github.com/ItsNotRexed/Leonida/issues/29) tracks this work. The decoder 12[Leonida issue #29](https://github.com/ItsNotRexed/Leonida/issues/29) tracks this work. The decoder
13fix is already under review in 13fix in [rpf9-explorer PR #1](https://github.com/breadbbbb/rpf9-explorer/pull/1) is at head
14[rpf9-explorer PR #1](https://github.com/breadbbbb/rpf9-explorer/pull/1), so this page records the 14`c3708fb` and has now been independently validated on the package in the scopes below. It is
15measured gap and independent evidence, not a competing patch. PR #1 reports 190,792 of 190,792 15awaiting upstream merge and a submodule pin bump. This page records the pre-PR gap, the independent
16recognized candidates decoded across the ten archives configured in Leonida, including 169 16validation, and the scope caveat; it is not a competing patch.
17candidates rejected by the previous scan (also verified after archive readback). 17
18 18PR #1 reports 190,792 of 190,792 recognized candidates across the ten archives configured in
19That count and the counts below are different scopes. Issue #29 is a full ten-archive run against 19Leonida, including 169 previously rejected candidates (also verified after archive readback). That
20its own recognized-candidate set and covers primary-LOD geometry. The counts below are independent 20ten-archive total was not independently reproduced here. Issue #29's run uses its own
21`rpf9dump` runs at submodule `48557ea`: `data.rpf` plus a 0-8 GiB sample of `levels.rpf`, over the 21recognized-candidate set and covers primary-LOD geometry; the pre-fix counts below use
22page-scan candidate set, and the exporter writes every recovered drawable/LOD variant. The 963 and 22`rpf9dump`'s page-scan candidates and export every recovered drawable/LOD variant. The two sets are
232,564 hidden rejects are therefore not a contradiction of 190,792; they measure the pre-fix gap in 23different scopes, not contradictory.
24these scopes. Reconcile them after PR #1 merges and the pin is bumped. 24
25## Independent validation
26
27Validated at PR #1 head `c3708fb` with .NET 8.0.428 on the real package:
28
29| Scope | Candidates | Recovered | Rejects | Readback |
30|---|---:|---:|---:|---:|
31| `data.rpf` full | 2,313 | 2,313 | 0 | 2,313 / 2,313 |
32| `common.rpf` | 0 | 0 | 0 | 0 / 0 |
33| `levels.rpf` 0-8 GiB | 28,748 | 28,748 | 0 | 28,748 / 28,748 |
34| `levels.rpf` 4-4.5 GiB | 4,010 | 4,010 | 0 | 4,010 / 4,010 |
35| `levels.rpf` 12-16 GiB | 10,429 | 10,429 | 0 | 10,429 / 10,429 |
36
37The `data.rpf` export reported `ok=2,313 fail=0 skip=0`, 2,313 unique OBJ names, and 0 duplicate
38stems. All 963 pre-PR misses were recovered, and all 1,350 pre-PR OBJs were byte-identical to their
39pre-PR versions. The PR smoke test passes; v1/v2 cache round-trip and two raw-segment entries were
40verified.
41
42Caveat: the full 76 GB `levels.rpf` and the other seven archives were not scanned, so the exact
43ten-archive 190,792/190,792 and 169/169 claims were not independently reproduced. No counterexample
44appeared in the tested scopes. A scoped validation comment was posted on PR #1.
25 45
26## How the exporter works 46## How the exporter works
27 47
@@ -46,7 +66,9 @@ model entry returned by the carver fails `RageModelDecoder.Decode`; `skip` is no
46mode. A printed `fail=0 skip=0` therefore means "no decoded entry failed", not "nothing was 66mode. A printed `fail=0 skip=0` therefore means "no decoded entry failed", not "nothing was
47rejected". 67rejected".
48 68
49## Measured counts 69## Pre-fix measured counts
70
71Counts below are from submodule `48557ea` before the upstream fix:
50 72
51| Archive | Candidates | Recovered | Not recovered | 73| Archive | Candidates | Recovered | Not recovered |
52|---|---:|---:|---:| 74|---|---:|---:|---:|
@@ -62,7 +84,7 @@ All counts come from the same package and the same `48557ea` submodule.
62The 2,313 candidates in `data.rpf` decode to 2,313 unique model names once the checks below are 84The 2,313 candidates in `data.rpf` decode to 2,313 unique model names once the checks below are
63relaxed, so the 963 missing entries are valid models, not duplicate or false candidates. 85relaxed, so the 963 missing entries are valid models, not duplicate or false candidates.
64 86
65## Rejection classes 87## Pre-fix rejection classes
66 88
67Observed in `data.rpf` with the unmodified carver: 89Observed in `data.rpf` with the unmodified carver:
68 90
@@ -139,7 +161,7 @@ every decoded vertex against the geometry's own part bounds (`Core/RageModelDeco
139The deleted check compared each geometry with the drawable-level bounds, which is not a valid 161The deleted check compared each geometry with the drawable-level bounds, which is not a valid
140envelope for a drawable with multiple LOD models. 162envelope for a drawable with multiple LOD models.
141 163
142Validated in a temp copy of Core through the real `RecoverAtOffsets` API: 164The narrow two-hunk experiment in a temp copy recovered:
143 165
144- `data.rpf`: 2,313 / 2,313 entries. 166- `data.rpf`: 2,313 / 2,313 entries.
145- `levels.rpf` 4-4.5 GiB: 4,010 / 4,010 entries. 167- `levels.rpf` 4-4.5 GiB: 4,010 / 4,010 entries.
@@ -147,11 +169,13 @@ Validated in a temp copy of Core through the real `RecoverAtOffsets` API:
147 169
148The two remaining 8 GiB cases are not tag rejections: one graphics extent is 48 bytes larger than 170The two remaining 8 GiB cases are not tag rejections: one graphics extent is 48 bytes larger than
149the assembled block and the next zlib stream starts 3,419 bytes past it; one model with 32 171the assembled block and the next zlib stream starts 3,419 bytes past it; one model with 32
150geometries throws inside `ReadMesh`. 172geometries throws inside `ReadMesh`. PR #1's broader patch resolves both; at `c3708fb` the same
173sample has 0 rejects.
151 174
152## Vertex and index tags 175## Vertex and index tags
153 176
154The tested set contains 198,286 geometry records. No unhandled layout tag appears: 177The pre-fix tag survey (`data.rpf` plus the 0-8 GiB `levels.rpf` sample) contains 198,286 geometry
178records. No unhandled layout tag appears:
155 179
156| Item | Observed | 180| Item | Observed |
157|---|---| 181|---|---|
@@ -167,8 +191,7 @@ The tested set contains 198,286 geometry records. No unhandled layout tag appear
167## What to do next 191## What to do next
168 192
1691. Merge [rpf9-explorer PR #1](https://github.com/breadbbbb/rpf9-explorer/pull/1). 1931. Merge [rpf9-explorer PR #1](https://github.com/breadbbbb/rpf9-explorer/pull/1).
1702. Bump `third_party/rpf9-explorer` in this repository to the merged commit. 1942. Bump `third_party/rpf9-explorer` from `48557ea` to the merged commit.
1713. Re-run `tools/rpf9dump models` on `data.rpf` and `levels.rpf`. The full `levels.rpf` has not been 1953. Re-run `tools/rpf9dump models` over the full ten-archive set configured in Leonida.
172 measured. 1964. Replace the sample numbers in this page with the full counts, and keep the README and issue #29
1734. Reconcile the new counts with issue #29's 190,792 total, then update this page and the README 197 in sync.
174 model status.