Textures: read every de-duplication table (gore textures), cached #346

Manually merged
github merged 1 commit from gh-pr/346/head into gh-pr/346/base 2026-11-26 20:29:17 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-26 03:09 UTC · original
holdmysocks:people-texture-dupes → master · +131 −24 · 3 files · 1 commits · merged 2026-11-26 03:22 UTC

Follows #332. I checked what texture hashes are still missing after the de-duplication table and found a second table.

The second table: core_restofworld appends an EDUP table (33 pairs, gore textures) to the end of its pack setup XML, so it was classified as XML and not read. Tables are now found anywhere inside the small plain files (bin, xml, text under 1 MiB) of textures.rpf and the content packs. I searched every archive of the install for the magic; these two are the only real tables (the other matches are words such as TIEDUP and chance bytes in models). The merged table (17,464 pairs) is cached as <work>/index/texture_dupes.json and rebuilt when one of those indexes changes. A cold build takes about a second.

What "missing" really was: the 111 K "still missing" in #332 was almost all tint palettes embedded in the models, which the exporter already reads from the model. Of the 391,040 referenced hashes, 7,789 now resolve through the tables (16 more than #332). The remaining 620:

  • 5d7a3a87cc19967d, the engine default (54,889 models; already white)
  • 403 placeholder textures of head models that get a face preset in their place (all 2,601 preset faces resolve)
  • 177 other character textures (body-detail spec maps, a few animals and accessories)
  • 20 gore textures, 19 map and prop textures

The install names those only in the models that use them.

Also: a test in ttpf.rs from #332 had raw NUL bytes in a string literal, which made git and grep treat the file as binary. Fixed.

bodyskin example: missing (TSV of what is still missing) and heads modes.

Tests: sixng-core lib 310 passed.

**@⁠holdmysocks** on GitHub · 2026-11-26 03:09 UTC · [original](https://github.com/holdmysocks/SixNG/pull/346) `holdmysocks:people-texture-dupes` → `master` · +131 −24 · 3 files · 1 commits · merged 2026-11-26 03:22 UTC Follows #332. I checked what texture hashes are still missing after the de-duplication table and found a second table. **The second table:** core_restofworld appends an `EDUP` table (33 pairs, gore textures) to the end of its pack setup XML, so it was classified as XML and not read. Tables are now found anywhere inside the small plain files (bin, xml, text under 1 MiB) of textures.rpf and the content packs. I searched every archive of the install for the magic; these two are the only real tables (the other matches are words such as `TIEDUP` and chance bytes in models). The merged table (17,464 pairs) is cached as `<work>/index/texture_dupes.json` and rebuilt when one of those indexes changes. A cold build takes about a second. **What "missing" really was:** the 111 K "still missing" in #332 was almost all tint palettes embedded in the models, which the exporter already reads from the model. Of the 391,040 referenced hashes, 7,789 now resolve through the tables (16 more than #332). The remaining 620: - `5d7a3a87cc19967d`, the engine default (54,889 models; already white) - 403 placeholder textures of head models that get a face preset in their place (all 2,601 preset faces resolve) - 177 other character textures (body-detail spec maps, a few animals and accessories) - 20 gore textures, 19 map and prop textures The install names those only in the models that use them. **Also:** a test in `ttpf.rs` from #332 had raw NUL bytes in a string literal, which made git and grep treat the file as binary. Fixed. `bodyskin` example: `missing` (TSV of what is still missing) and `heads` modes. Tests: sixng-core lib 310 passed.
core_restofworld appends a second EDUP table (33 pairs, gore textures) to
its pack setup XML. Tables are now found anywhere inside the small plain
files of textures.rpf and the content packs (a search of every archive
found no others) and cached as <work>/index/texture_dupes.json. 7,789
referenced hashes now resolve. Also removes raw NUL bytes from a test.

bodyskin example: missing and heads modes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:29:16 +00:00
github manually merged commit cab2de9fa8 into gh-pr/346/base 2026-11-26 20:29:17 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.