diff options
| author | Kam471 <115741199+Kam471@users.noreply.github.com> | 2026-11-21 18:28:33 +0000 |
|---|---|---|
| committer | Kam471 <115741199+Kam471@users.noreply.github.com> | 2026-11-21 18:28:33 +0000 |
| commit | e09fd70be36d5377f310ce2ccf2ad5db318cbc3f (patch) | |
| tree | bb6521a3c158ac9fa36a186a5cf6fd41482af11c /docs/models.md | |
| parent | 6af5524df79890c811ca973c2e4d7623a808f9f2 (diff) | |
Docs: record independent validation of the model decoder fix
Diffstat (limited to 'docs/models.md')
| -rw-r--r-- | docs/models.md | 75 |
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 | ||
| 3 | Measured state of `tools/rpf9dump models` on the Xbox Series 1.0.2.1 package, and the upstream | 3 | Pre-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. | 4 | upstream `rpf9-explorer` fix that closes it. The fix is validated but not merged yet. |
| 5 | 5 | ||
| 6 | The short version: the exporter does not reject any vertex or index layout in the tested archives. | 6 | Before the fix, the exporter did not reject any vertex or index layout in the tested archives. It |
| 7 | It drops valid models in three validation paths, all in `third_party/rpf9-explorer` at commit | 7 | dropped 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 |
| 13 | fix is already under review in | 13 | fix 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 |
| 15 | measured gap and independent evidence, not a competing patch. PR #1 reports 190,792 of 190,792 | 15 | awaiting upstream merge and a submodule pin bump. This page records the pre-PR gap, the independent |
| 16 | recognized candidates decoded across the ten archives configured in Leonida, including 169 | 16 | validation, and the scope caveat; it is not a competing patch. |
| 17 | candidates rejected by the previous scan (also verified after archive readback). | 17 | |
| 18 | 18 | PR #1 reports 190,792 of 190,792 recognized candidates across the ten archives configured in | |
| 19 | That count and the counts below are different scopes. Issue #29 is a full ten-archive run against | 19 | Leonida, including 169 previously rejected candidates (also verified after archive readback). That |
| 20 | its own recognized-candidate set and covers primary-LOD geometry. The counts below are independent | 20 | ten-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 | 21 | recognized-candidate set and covers primary-LOD geometry; the pre-fix counts below use |
| 22 | page-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 |
| 23 | 2,564 hidden rejects are therefore not a contradiction of 190,792; they measure the pre-fix gap in | 23 | different scopes, not contradictory. |
| 24 | these scopes. Reconcile them after PR #1 merges and the pin is bumped. | 24 | |
| 25 | ## Independent validation | ||
| 26 | |||
| 27 | Validated 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 | |||
| 37 | The `data.rpf` export reported `ok=2,313 fail=0 skip=0`, 2,313 unique OBJ names, and 0 duplicate | ||
| 38 | stems. All 963 pre-PR misses were recovered, and all 1,350 pre-PR OBJs were byte-identical to their | ||
| 39 | pre-PR versions. The PR smoke test passes; v1/v2 cache round-trip and two raw-segment entries were | ||
| 40 | verified. | ||
| 41 | |||
| 42 | Caveat: the full 76 GB `levels.rpf` and the other seven archives were not scanned, so the exact | ||
| 43 | ten-archive 190,792/190,792 and 169/169 claims were not independently reproduced. No counterexample | ||
| 44 | appeared 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 | |||
| 46 | mode. A printed `fail=0 skip=0` therefore means "no decoded entry failed", not "nothing was | 66 | mode. A printed `fail=0 skip=0` therefore means "no decoded entry failed", not "nothing was |
| 47 | rejected". | 67 | rejected". |
| 48 | 68 | ||
| 49 | ## Measured counts | 69 | ## Pre-fix measured counts |
| 70 | |||
| 71 | Counts 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. | |||
| 62 | The 2,313 candidates in `data.rpf` decode to 2,313 unique model names once the checks below are | 84 | The 2,313 candidates in `data.rpf` decode to 2,313 unique model names once the checks below are |
| 63 | relaxed, so the 963 missing entries are valid models, not duplicate or false candidates. | 85 | relaxed, 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 | ||
| 67 | Observed in `data.rpf` with the unmodified carver: | 89 | Observed 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 | |||
| 139 | The deleted check compared each geometry with the drawable-level bounds, which is not a valid | 161 | The deleted check compared each geometry with the drawable-level bounds, which is not a valid |
| 140 | envelope for a drawable with multiple LOD models. | 162 | envelope for a drawable with multiple LOD models. |
| 141 | 163 | ||
| 142 | Validated in a temp copy of Core through the real `RecoverAtOffsets` API: | 164 | The 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 | ||
| 148 | The two remaining 8 GiB cases are not tag rejections: one graphics extent is 48 bytes larger than | 170 | The two remaining 8 GiB cases are not tag rejections: one graphics extent is 48 bytes larger than |
| 149 | the assembled block and the next zlib stream starts 3,419 bytes past it; one model with 32 | 171 | the assembled block and the next zlib stream starts 3,419 bytes past it; one model with 32 |
| 150 | geometries throws inside `ReadMesh`. | 172 | geometries throws inside `ReadMesh`. PR #1's broader patch resolves both; at `c3708fb` the same |
| 173 | sample has 0 rejects. | ||
| 151 | 174 | ||
| 152 | ## Vertex and index tags | 175 | ## Vertex and index tags |
| 153 | 176 | ||
| 154 | The tested set contains 198,286 geometry records. No unhandled layout tag appears: | 177 | The pre-fix tag survey (`data.rpf` plus the 0-8 GiB `levels.rpf` sample) contains 198,286 geometry |
| 178 | records. 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 | ||
| 169 | 1. Merge [rpf9-explorer PR #1](https://github.com/breadbbbb/rpf9-explorer/pull/1). | 193 | 1. Merge [rpf9-explorer PR #1](https://github.com/breadbbbb/rpf9-explorer/pull/1). |
| 170 | 2. Bump `third_party/rpf9-explorer` in this repository to the merged commit. | 194 | 2. Bump `third_party/rpf9-explorer` from `48557ea` to the merged commit. |
| 171 | 3. Re-run `tools/rpf9dump models` on `data.rpf` and `levels.rpf`. The full `levels.rpf` has not been | 195 | 3. Re-run `tools/rpf9dump models` over the full ten-archive set configured in Leonida. |
| 172 | measured. | 196 | 4. Replace the sample numbers in this page with the full counts, and keep the README and issue #29 |
| 173 | 4. Reconcile the new counts with issue #29's 190,792 total, then update this page and the README | 197 | in sync. |
| 174 | model status. | ||