Commit Graph

42 Commits

Author SHA1 Message Date
1b2e8ff3d6 Revert "Merge pull request #2732 from Kam471"
This reverts commit f8175dc501, reversing
changes made to 6e3426d694.
2026-11-22 14:25:31 -05:00
f8175dc501 Merge pull request #2732 from Kam471 2026-11-22 13:17:25 -05:00
4e646b96c1 Merge pull request #2712 from Davide 2026-11-22 13:17:15 -05:00
4a32673149 Merge pull request #2519 from Rafael 2026-11-22 13:15:52 -05:00
2fd56dfc07 Merge pull request #2288 from Kam471 2026-11-22 13:13:36 -05:00
3d005ca90a tools: census decoded character models 2026-11-22 18:02:27 +00:00
e6ab90d6d4 rpf9dump: export a window of a file, and per-geometry counts in the models manifest
Models and textures no longer open the archive document. The entry list comes from this run's
scan or from the index cache, and every resource is read from its own compression blocks
(tools/rpf9dump/Segments.cs), which mirrors the checks ArchiveReader.ReadResourceData makes. That
makes a raw slice of an archive exportable: a window cut out of levels.rpf has no 9FPR header, so
there was nothing to open before, and the mode simply failed on it.

--start/--length scan one window instead of the whole file. A sub-range is never written to the
index cache, which is keyed by the file rather than by the window; the manifest records
Scan.Start and Scan.Length for it.

The manifest gains MeshTris, MeshModels and MeshGeoms: the per-geometry triangles and the
(model, geometry) pair the decoder puts in each mesh name, in the order of the OBJ's `o` groups.
A dehydrated BLAS leaf stores that pair as its geometry index (docs/bvh.md 4a), so a matching tool
can filter candidates on the manifest instead of reading every OBJ.

Measured: one 1 GiB slice of levels.rpf scans, recovers, decodes and exports 1,228 models in about
2 s. The project builds clean with no warnings; tests/Rpf9DumpDiagnostics covers the segment reader
(compressed and raw blocks, a block past the end, a short block, an entry without blocks) and the
mesh key parsing, and still passes.
2026-11-22 18:49:28 +01:00
bc66db1531 docs/models.md: material shader hashes lead to effects, not to draw programs
A material's shader hash (rpf9dump manifest Materials[].Shader) is the joaat of its effect name, and the
carve index names every compute program <effect>:<entry>, so a material reaches its effect and that
effect's RaytracingResolve programs: 3,211 of data.rpf's 3,340 materials (8 of 18 hashes). The 23,619
graphics programs carry no effect name, are not stored grouped by effect, and their 8-hex suffix neither is
a joaat of the name nor matches the effect-named programs' suffixes, so effect -> technique -> VS/PS is not
recoverable from the package (presumably in the executable, RT-5). Measured on a 1.0.2.1 copy, counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 14:31:56 -03:00
2b0a8b6be4 Merge pull request #2288 from Kam471
# Conflicts:
#	docs/character_skeleton.md
2026-11-22 11:43:50 -05:00
703766fabc tools: link the skinned GLB docs and cover the no-numpy path 2026-11-22 16:37:06 +00:00
e20ced9262 tools: export a skinned GLB from the ped skin streams 2026-11-22 16:34:30 +00: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
d816e75e73 docs: remove the last duplicated intro fragment in models.md 2026-11-22 14:27:24 +00:00
b474993bf5 docs: drop the duplicated Models rows and the split intro fragment 2026-11-22 14:26:44 +00:00
6ea07e1b86 docs: correct re-count baseline and mark unmeasured levels geometry
story000_restofworld already recovered its 3 models at 917e9b9, so its delta is 0 and the 917e9b9 baseline is 350,251 models / 159,486 children; the ten-archive delta is +32,530. The levels.rpf fragments/bone-bound/triangles cells have no manifest or harness fields, so they and the totals derived from them are marked not independently reproduced. Add the measured levels.rpf name-pass coverage to world_names.md.
2026-11-22 14:23:37 +00: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
5987ffb0a3 Merge pull request #1558 from Kam471
# Conflicts:
#	docs/README.md
#	docs/design.md
#	docs/models.md
2026-11-22 07:38:11 -05:00
b94ff2643a docs: record the levels.rpf recovery count at e293917 (343,327 models) 2026-11-22 12:34:20 +00:00
141136bb12 docs: fix the story000 c3708fb cell so the column sums to 190,792 2026-11-22 12:30:14 +00:00
76e5e8ef8b docs: correct the 917e9b9 baseline for story000_restofworld (3 models, not 0) 2026-11-22 12:24:13 +00:00
3bf713f0b0 docs: sync the remaining model-count prose with the e293917 re-count 2026-11-22 12:19:38 +00:00
e483cc8b0f docs: record the e293917 model re-count
The models.md re-count item was still open. Re-run rpf9dump models over
the same archives at e293917 and record the rows: 39,454 excluding
levels.rpf, +3,206 over 917e9b9, almost all recovered fragments (2,551
in packs.rpf, 594 in data.rpf). Split each archive by IsFragment and
update the packs.rpf paragraph and the README line.

levels.rpf and the triangle totals were not re-run; the table says so.
2026-11-22 12:13:04 +00:00
2a354f9460 Merge pull request #1542 from SombraSoft
# Conflicts:
#	docs/README.md
2026-11-22 07:08:08 -05:00
ee960b4b52 Docs: re-count all 10 model archives at rpf9-explorer e293917 (382,781 models) 2026-11-22 09:05:22 -03:00
2cfe6a1d04 docs: record the measured character-part inventory (packs.rpf, e293917)
Add docs/character_models.md and link it from the docs index and models.md.
The page records what the character export actually contains, so a preview
cannot quietly present a proxy or a placeholder as Lucia's hero asset:

- 26,585 manifest rows / 11,335 unique names: 23,720 drawables, 2,865 fragments.
- Every fragment exports as a 25-vertex bounds cube with Embedded: null; child
  drawables are not walked.
- Lucia's 22 named records and the 13 decoded parts, with vertex/triangle counts
  and albedo keys. The head drawable has no texture reference.
- The only Lucia full body is cs_lucia_legacypedcs (874/640-vertex rows,
  1,748/1,816 decoded): a clothed legacy ped, not a base body.
- player_story000_00 is 104 unique names = 63 drawables + 41 bounds fragments.
- Slot-token counts, with the explicit caveat that they are a name heuristic.
- Texture coverage 184/215; only 0xC8E8C282 is sRGB albedo; hands/feet keys
  unresolved.
- Not decoded: fragment children, a ped-variation table (the two common.rpf
  managers are height/shape and gameplay components, not appearance),
  Lucia's hair (3-vertex placeholders), levels.rpf names, and bind pose.
2026-11-22 12:02:36 +00:00
51c402027c Docs: note e293917 pin and v1.2 model-count re-measure caveat 2026-11-22 07:22:52 -03:00
f8d5e3624e Merge pull request #1213 from Lucy 2026-11-22 03:37:52 -05:00
1f3ef1bf43 Docs: vehicle ratings and performance estimates (CVehicleBaseRatingsAndEstimatesMap)
Counts and ranges over the one CVehicleBaseRatingsAndEstimatesMap document in
common.rpf: 252 entries keyed by vehicle model name (all are .yft base names),
road/offroad ratings with a floor of 10 that are not 0..1 fractions,
SI-looking estimates, and 0/inf sentinels a parser must accept. No names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:24:27 +00:00
f89a3ceb74 Docs: vehicle distant-light recipes (CVehicleDistantLightData)
Counts over the one CVehicleDistantLightData document in common.rpf: 1,980
recipes for 319 vehicle models, all of which exist as .yft (with _hi
variants) in the archive catalog; secondary recipe tokens; and no stored
light data (every lights list is empty). No names or values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 08:12:20 +00:00
9a87c348bb Docs: meaning of the shader RenderBucket and RenderBucketMask fields
rpf9dump exports both raw. On a 3,000-model sample (27,435 shaders) the mask
is 0xFF00 | 1 << (bucket & 0x7F) in every shader, bit 7 of the bucket is a
separate flag, and the bucket values 0-6 follow GTA V's drawable bucket list
(opaque, alpha, decal, cutout, no splash, no water, water), checked against
model-name tokens. Counts only.

AI-assisted (Claude). Measured on my own copy (1.0.2.1); docs only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:31:11 +00:00
74bd4cb805 docs/models.md: what the model rejects at 917e9b9 are
The 1,009 levels.rpf rejects in the last shard are texture dictionaries,
not incomplete or duplicate tail pages, and 28 more in shards 1 to 7 are
models the probe caps reject. The 27 standalone models below c3708fb are
those capped models, not merged duplicates. Adds a per-archive table of
reject classes and links the upstream fixes (rpf9-explorer#9, #11).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 06:05:44 +01: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
46722d8e77 docs: record the packs.rpf full-export result at 917e9b9
Full rpf9dump models export of packs.rpf at the new pin: ok=24,034 fail=0 skip=0 in 263 s, 0 embedded textures. The manifest and OBJs are local; only the counts are recorded.
2026-11-22 01:38:29 +00:00
3816356e05 third_party: bump rpf9-explorer to 917e9b9 and decode packs.rpf dictionary children
The 48557ea pin predates the merged model-layout recovery, the packs.rpf drawable-dictionary roots, the TTPF compact/array/cubemap/volume layouts and the external skeleton reader. Re-pin to upstream 917e9b9.

rpf9dump now passes e.ResourceDrawableOffset to RageModelDecoder.Decode; without it every dictionary child would decode as the first child. The manifest also records Drawable so a row can be traced to its dictionary offset.

Measured on the 1.0.2.1 package with .NET 8.0.428: a fresh packs.rpf scan recovers 24,034 models (23,720 dictionary children plus 314 fragments) from 23,838 candidates, against 314 at the old pin. docs/models.md keeps the 48557ea/c3708fb table as the control and adds the new packs.rpf result; docs/design.md notes the other archives were not re-counted at the new pin. Build: 0 warnings, 0 errors.
2026-11-22 01:35:02 +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
99f39062e3 Merge pull request #347 from Kam471 2026-11-21 18:37:57 -05:00
5b8dd6854b Tools: index named RPF9 resources without the TOC 2026-11-21 23:11:56 +00:00
a94e30d3a9 Docs: record the full-archive model validation 2026-11-21 23:10:55 +00:00
e09fd70be3 Docs: record independent validation of the model decoder fix 2026-11-21 18:28:33 +00:00
6af5524df7 Docs: link issue 29 and the upstream rpf9-explorer fix 2026-11-21 18:03:10 +00:00
f38de0470b Docs: measured model recovery state and the rpf9-explorer fix 2026-11-21 17:58:43 +00:00