Textures: resolve de-duplicated textures (painted body skins for 2,602 characters) #332

Manually merged
github merged 2 commits from gh-pr/332/head into gh-pr/332/base 2026-11-26 20:28:07 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-26 02:00 UTC · original
holdmysocks:people-body-skin → master · +207 −7 · 4 files · 2 commits · merged 2026-11-26 02:22 UTC

Most characters' painted body skin textures were missing, so bodies took the face colour at the neck. The textures are in the install: identical textures are stored once, and a table in textures.rpf maps the other hashes to the stored copy.

Format (a plain bin entry in textures.rpf): EDUP, u32 count, then 17,431 pairs of u64 dropped hash and u64 kept hash, sorted by the dropped hash, then filler. No chains (no kept hash is itself a dropped one).

Change

  • TtpfSet::get falls back to the table when a hash is in no store (get_stored keeps the exact lookup; kept, dupes). The table is read once from the textures.rpf index, so that archive needs to be indexed.
  • model.json gives stored_as when a texture was found this way; the PNG is named after the stored hash.
  • README: body skin tone note and the bulk texture store row.
  • bodyskin example: survey of body items per character and table coverage.

Results

  • Referenced texture hashes (all model materials): 391,040, of which 271,969 stored directly, 7,773 now found through the table, 111,298 still missing. The new ones are spread over map props, clothing, decals, water and peds.
  • Body upper and lower colour textures both found: 2,602 of 2,628 characters (19 before); normal maps likewise. The remaining ones have body items with no texture named.
  • Viewer screenshots of 9 characters, front and back, before and after: the bodies now show painted detail (moles, age spots, body hair) and the tone still matches the face.

Tests: sixng-core lib 308 passed.

**@⁠holdmysocks** on GitHub · 2026-11-26 02:00 UTC · [original](https://github.com/holdmysocks/SixNG/pull/332) `holdmysocks:people-body-skin` → `master` · +207 −7 · 4 files · 2 commits · merged 2026-11-26 02:22 UTC Most characters' painted body skin textures were missing, so bodies took the face colour at the neck. The textures are in the install: identical textures are stored once, and a table in `textures.rpf` maps the other hashes to the stored copy. **Format** (a plain `bin` entry in textures.rpf): `EDUP`, u32 count, then 17,431 pairs of u64 dropped hash and u64 kept hash, sorted by the dropped hash, then filler. No chains (no kept hash is itself a dropped one). **Change** - `TtpfSet::get` falls back to the table when a hash is in no store (`get_stored` keeps the exact lookup; `kept`, `dupes`). The table is read once from the textures.rpf index, so that archive needs to be indexed. - `model.json` gives `stored_as` when a texture was found this way; the PNG is named after the stored hash. - README: body skin tone note and the bulk texture store row. - `bodyskin` example: survey of body items per character and table coverage. **Results** - Referenced texture hashes (all model materials): 391,040, of which 271,969 stored directly, **7,773 now found through the table**, 111,298 still missing. The new ones are spread over map props, clothing, decals, water and peds. - Body upper and lower colour textures both found: **2,602 of 2,628 characters** (19 before); normal maps likewise. The remaining ones have body items with no texture named. - Viewer screenshots of 9 characters, front and back, before and after: the bodies now show painted detail (moles, age spots, body hair) and the tone still matches the face. Tests: sixng-core lib 308 passed.
The install stores identical textures once. A plain file in textures.rpf
(EDUP, u32 count, then 17,431 sorted pairs of dropped and kept u64 hash)
maps the other hashes to the stored one. TtpfSet::get falls back to it,
so 7,773 referenced texture hashes that were in no store now resolve,
among them the painted body skins: both body textures are now found for
2,602 of 2,628 characters (19 before). model.json records stored_as.

bodyskin example: per-character body skin survey and table coverage.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:28:05 +00:00
github manually merged commit 4380dc8566 into gh-pr/332/base 2026-11-26 20:28:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.