Commit Graph

68 Commits

Author SHA1 Message Date
5d883298ed docs/textures.md: the TTPF pools hold no name streams (BUILD-1368)
BUILD-1368 asked to index two name streams, a `nameTable` of 64-byte
records and a `nameData` of ASCII strings. Measured over all 57 pools,
neither exists: every byte of a pool is header, chunk table, ETPF
descriptors, u64 asset keys, trailing metadata that reads as uniform
random bytes, zero padding or texture data, and the virtual space has
no range left for another stream. The names do not occur in the pools
or in the inflated streams of common.rpf, script.rpf and data.rpf
either. Counts only; the trailing bytes stay unread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:19:13 -05:00
34969aa207 bcpack_tool: name the paths in the decode refusal as given, not their repr (EGEN-BCPACKTOOL-PATHREPR) (#6618)
Squash-merged after diff review of PR #6618
2026-11-23 11:14:33 -06:00
ff686dfe84 docs/textures: name tools/tex_mode_probe.py as the swizzle-mode and top-mip placement probe (EGEN-TEXMODEPROBE-DOC) (#6673)
Squash-merged after diff review of PR #6673
2026-11-23 11:00:30 -06:00
bb938f6395 ttpf_assets: the BCPack pass stamp hashes the decoder modules, so a fixed decoder completes old pools again (#6678)
Squash-merged after diff review of PR #6678
2026-11-23 10:59:15 -06:00
2dd8795ad8 navmesh_index/world_lights_paths input guards; bcpack_tool in docs; design.md f16-interp row (#6916)
Squash-merged after diff review of PR #6916 - navmesh_index/world_lights_paths input guards; bcpack_tool in docs; design.md f16-interp row
2026-11-23 09:36:24 -06:00
bb75702bc6 Revert #4638: the rpf9-explorer submodule pin stays at e2939175
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:17:16 -05:00
064d06e459 Merge pull request #4638 from lines9686-rgb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:16:42 -05:00
17be613754 Merge pull request #4520 from Lucy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:15:31 -05:00
179cde16b3 Merge pull request #3937 from Jeremy Goldberg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:42 -05:00
be036ae3ae Merge pull request #3876 from Silent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:08 -05:00
cc603fd8bb docs/textures.md: follow the three diverging textures.rpf streams past the divergence
An in-order alignment finds five different 4 MiB data/ttdb chunks reappearing for 65.8-97.5% of their bytes
in the 6 and 32 MiB streams, in short runs with hundreds of gaps (8.6% for the 12 MiB stream). Recorded as
shared runs, not a copy: five chunks aligning this well says they resemble each other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 03:05:18 +00:00
e0789346de docs/textures.md: textures.rpf's 121 opaque streams are not copies of the TTPF pools
The doc left matching them to the data/ttdb pools as the next check. Against all 1,026,833 chunks of the
57 pools (whole-content SHA-1 as stored and inflated, plus the first 64 bytes): 1 stream (4 KiB) is
identical to a pool chunk, 3 large ones share their first 212-582 KB with a 4 MiB chunk and then diverge,
3 share only a short common leading pattern, and 114 match nothing. Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 02:00:50 +00:00
15435e54da third_party/rpf9-explorer: pin ad41e794 (RbPlus 64 KiB 4 BPP tile order, ASSET-125)
breadbbbb/rpf9-explorer#15 merged: Core/TtpfReader.cs Patterns[2] now uses the
RDNA2/RbPlus (3, -3) order at bits 6..7 (GFX10_SW_64K_D_RBPLUS_PATINFO), as
tools/ttpf_mips.py already does. The pin also brings #13, merged just before it
(32 kHz Opus durations in 48 kHz frames). docs/textures.md "Next step" drops the
Patterns[2] item.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:13:03 +03:00
37eb4f2808 fix(tools): retain character texture resource IDs in reports
Keep the display name or hash and carry the separate 64-bit asset key through each output so the binding can be joined to a texture pool.

Refs: #3918
2026-11-22 17:34:18 -05:00
d5ef9a4c20 ttpf_mips: read the asset key across the records/ids boundary, as TtpfReader does
Pool.descriptor() gave asset_key_at None whenever the key sat past the record
area, which is where most of the array lives in retail pools: 28,666 of 357,115
entries over the 57 pools of a 1.0.2.1 install. TtpfReader.cs at the e293917
pin reads the key from the ID region in that case and refuses only a key split
by the boundary itself; mirror both. write_rds5_pool grows an optional area so
tests can build a straddling pool.
2026-11-22 19:15:16 -03:00
86d4f3c130 Merge pull request #3491 from wxrrry 2026-11-22 17:02:16 -05:00
cac7fe25cf tex_headers: address review comments on pointer tags, JOAAT name mapping, and mip layout
- tools/tex_headers.py: read mips from flags at +0x42 (flags >> 16) and preserve b6 at +0x3e.
- tools/tex_headers.py: validate system pointer tag (0x5...) and reject null pointers so all-zero buffers produce empty records.
- tools/tex_headers.py: match texture names by lowercase JOAAT32 hash rather than index position.
- docs/textures.md: wrap lines under 118 chars and label dry cell occupancy as hypothesis.
- tests/test_tex_headers.py: add tests for differing b6/mips offsets, zero buffers, invalid tags, reversed and missing names.
2026-11-23 00:17:56 +03:00
14c5b93ff7 Merge remote-tracking branch 'origin/main' into feature/asset-274-textures-rpf 2026-11-23 00:16:19 +03:00
47938586a4 tex_headers: decode texture dictionary system pages and verify DXGI formats (ASSET-274)
- Add parse_texture_dict_page in tools/tex_headers.py to extract grcTexture descriptors, name hashes, and data offsets from pgDictionary pages.
- Update docs/textures.md resolving the ASSET-274 hypothesis: all 1,313 texture page pairs are keyed by waterfog/waterfog2 joaat32 hashes matching the active world streaming grid cells, with formats strictly matching DXGI enums (0x5f = BC6H_UF16, 0x62 = BC7_UNORM, 0x4d = BC3_UNORM).
- Add synthetic unit tests in tests/test_tex_headers.py for parse_texture_dict_page.
2026-11-22 23:41:01 +03:00
988a98f923 Merge pull request #3068 from Shrey Ratna 2026-11-22 15:14:32 -05:00
b3b85737cb Merge pull request #3009 from Emma
# Conflicts:
#	docs/character_models.md
2026-11-22 15:14:02 -05:00
6431f00d06 Merge pull request #2874 from Tim Elery 2026-11-22 15:12:47 -05:00
c94fbce94c docs: materialid on the four garments as measured, and textures.md agrees (ASSET-230 review)
Review of #3009:

- character_models.md said materialid is "declared but unbound on the jacket"
  and "unbound on all four". The jacket's and the crop tee's material rows
  reference a BC4_UNORM texture that is in the pools; the bikini top's and the
  undies' rows have no such slot. Whether a shader samples it is not measured.
- textures.md still said "the jacket, crop tee and other garments have no
  albedo". The bikini top and the undies are on other shaders and account for
  nine of the 0xC8E8C282 references (six and three material rows).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 21:58:16 +02:00
794df5ddd5 Label BCPack Outcome column as projected, account for 17/5,167 BC7 refusals, and update design.md TTPF row 2026-11-22 11:48:06 -08:00
9e6fe1e74e fix(bcpack): preserve BC6H history confirmation depths 2026-11-22 19:10:20 +00:00
640dec65f2 docs/textures.md: update stale BCPack gap title, Outcome table, and historical checklist 2026-11-22 10:34:40 -08:00
2a853d019c Merge pull request #2695 from Kam471 2026-11-22 13:17:09 -05:00
f5a7a903ba character_textures.py: classify material slots and flag garments without albedo
The five slot hashes are the verified character-corpus mapping: diffusetex (0xC8E8C282) is the only albedo, speculartex (0xC6F46E79) is specular/gloss, bumptex (0x1E77BF4C) is the tangent-space normal, speculartex2 (0x739E3D0D) is packed ORM, and materialid (0x8ADB8480) is an ID/palette map. Unrecognised hashes print as unknown 0x... and are never matched by texture name.

Garment shaders d5ed50f4, ea8d09d0 and 39ddb9ca declare no 0xC8E8C282 slot, so a garment material without one is flagged garment-no-albedo instead of treating speculartex as colour. --json/--csv reports reuse gamedata_xml.py's same_report_path guard. Tests use synthetic model JSON only.
2026-11-22 17:51:33 +00:00
e2de7fc875 Merge pull request #1534 from Kam471 2026-11-22 11:40:35 -05:00
6380eb73fd docs: correct the character texture-slot roles 2026-11-22 15:39:08 +00:00
4695bb398e tools/bcpack: add pure-stdlib local history calibrator (bcpack_history_calib.py)
Add `tools/bcpack_history_calib.py` to derive external `--history <path>` JSON
tables (`bc1.json`..`bc7.json` or combined JSON) locally from a player's own
texture pools or exact reference block/DDS pairs using only the Python
standard library (`python -I`):

- Exact reference inversion (`--ref-dds POOL:INDEX=REF.dds`, `--ref-pairs`):
  algebraically inverts direct built-in history references (`d > i` in blocks
  0..255) across BC1/BC3/BC4/BC5/BC6H/BC7 into confirmed strict-mode entries.
- Read-only TTPF pool self-calibration (`inputs ...`): uses a prefix rANS lane
  decoder (`decode_lanes_prefix`) together with exact BC6H/BC7 anchor MSB and
  BC7 Mode-1 shared p-bit parity constraints, intra-block index smoothness
  voting, and sibling raw/zlib mip endpoint fitting to derive provisional
  tables usable with `--history <path> --allow-provisional`.
- Extend `tools/bcpack_tables_bptc.py`, `tools/bcpack.py`, and
  `tools/ttpf_mips.py` so `--history` also accepts optional BC1-BC5 JSON
  tables (`confirmed`, `provisional`, optional `replace`) alongside BC6H/BC7.
- Add synthetic unit tests in `tests/test_bcpack_history_calib.py` and document
  the schemas and CLI workflow in `docs/textures.md`.
2026-11-22 07:21:13 -08:00
9ff55521ab ttpf_mips: add DXGI 11 and validate 2D uncompressed tiling (RDNA2 64K 4BPP) 2026-11-22 05:01:41 -08:00
38d43286b9 ttpf_mips: decode BC6H and BC7 blocks in check 2026-11-22 04:29:11 -08:00
5d32ddb7f4 Docs: textures.rpf header variants, say only what was seen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:33:22 +00:00
7149907c8f Docs: what textures.rpf holds
rpf9_carve over textures.rpf: 2,749 streams; 1,313 system/graphics page pairs
of one two-texture dictionary template (128x128, format code 0x5f, payload
exactly 2 x 16,384 bytes) with 1,117 distinct payloads, and 121 opaque raw
streams holding 91% of the inflated bytes. Counts only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:33:14 +00:00
c833ae6d48 ASSET-44: Bump rpf9-explorer for C# BCPack BC1/BC3/BC4/BC5 decode 2026-11-22 06:57:22 -03:00
23fe0a0c3a Complete BCPack DDS entries during the normal assets export 2026-11-22 16:04:49 +08:00
0a288c3cd0 textures: support locally calibrated BCPack DDS exports 2026-11-22 15:33:40 +08:00
cd5a8c484b Merge pull request #951 from Lucy 2026-11-22 00:33:14 -05:00
b7ec22e798 Merge pull request #890 from nicolas 2026-11-22 00:33:00 -05:00
3bce1fd0d0 Docs: name and measure map material texture parameters
Adds joaat names for 0x1E77BF4C (bumptex), 0xC6F46E79 (speculartex),
0x739E3D0D (speculartex2), 0x3FB7964F (tinttexture) and 0xC075F9B6
(lookuptexture), and a content check on a 1,500-model map sample: bumptex is
normal-map-like (1,394 vs 74), speculartex is not (69 vs 1,469). Notes the
conflict with the character table's 0xC6F46E79 row and three sRGB colour
parameters missing from ModelTextureBindings. 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 05:05:39 +00:00
ed784a2300 Report incomplete texture pool exports and retry missing DDS files 2026-11-21 21:10:28 -07:00
5d5885559f Docs: RDS5 chunk tag to BCPack codec table and a strict BC7 fixture (#827)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 01:09:07 -03:00
03d1e118a6 bcpack: add BC6H and BC7 decoders with external runtime history loader (ASSET-5) 2026-11-21 18:27:01 -08:00
c77944a465 Merge pull request #647 from SirAmong 2026-11-21 21:08:33 -05:00
bffc4942f3 docs: textures.md step 1 names ASSET-38 and no longer closes step 3 (PROC-18 review)
Review of #647: #576 only closes step 1 (the BC6H/BC7 block rebuilders), not
step 3 (BC6H/BC7 pixel decoders for ttpf_mips.py check), and its tracker ID
is ASSET-38 (ASSET-5 is the old #156 ID its description uses).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 20:59:32 -05:00
016f39c484 Merge pull request #650 from Kam471
# Conflicts:
#	docs/textures.md
2026-11-21 20:39:07 -05: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
248ca96b4d docs: textures.md next steps point at what is left (PROC-18)
The list still sent people to work that was done or is in review:
- step 1: the BC6H/BC7 rebuilders are in #576, not on main yet, so it says so
  and notes that steps 1 and 3 stay open until it merges;
- step 2: the compact layout rule and multi-slice layouts are already upstream
  in rpf9-explorer; only the BCPack decoder is left (ASSET-44);
- step 5: the multi-slice layouts are done (#520, rpf9-explorer #5 and #6);
  what is left is the submodule pin (BUILD-101).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 20:33:16 -05:00
72314f8051 Merge pull request #554 from Kam471
# Conflicts:
#	docs/design.md
2026-11-21 20:09:21 -05:00