Viewer: vehicle wear in patches of the game's wear mask #293

Manually merged
github merged 4 commits from gh-pr/293/head into gh-pr/293/base 2026-11-26 20:25:13 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-25 16:20 UTC · original
holdmysocks:wear-mask → master · +63 −7 · 7 files · 4 commits · merged 2026-11-25 16:56 UTC

Builds on #292 (which builds on #291); merge after them.

What

  • The viewer loads the game's tiling wear mask for vehicle part materials: the material parameter b9f4bdac, a 2048 px texture with three grunge channels that most vehicles share. It is bound as a new material texture (binding 6), and flag bit 15 says it is present.
  • Where a material has the mask, the second layer shows where the mask's green channel (tiled 5x over UV0) is above a threshold.
    • The threshold falls as the part's wear amount rises: the share of the mask shown is 0.45 x amount², read off the mask's green histogram.
    • Results: none when new, about 30% at level 3, 40% at levels 4 and 5.
  • Painted body panels, which have no layer detail texture in the install, now show wear too. Parts without the mask keep the old detail-texture rule.

Checked

  • Workspace tests pass.
  • Renders, in a private work folder:
    • rancher (level 3): rust patches on the cab roof and doors, and the bed floor and wheel well rusty. 4.1% of the picture changes against no wear, up from 1.7% without the mask.
    • zorrusso (level 0): clean.

Not decoded / not done

  • The game windows the mask's three channels (and the layer texture's blue channel) with per-part bytes that come from the wear preset. Which preset field fills which byte is not decoded, so the threshold rule is a stand-in. The tiling factor of 5 matches the age records' minTiling / maxTiling (about 4 to 6.5) but is not read per part.
  • The game also scales the mask by vertex colours; the viewer does not.
  • Some materials (the rancher's tailgate and bed sides) name no mask and stay clean.
**@⁠holdmysocks** on GitHub · 2026-11-25 16:20 UTC · [original](https://github.com/holdmysocks/SixNG/pull/293) `holdmysocks:wear-mask` → `master` · +63 −7 · 7 files · 4 commits · merged 2026-11-25 16:56 UTC Builds on #292 (which builds on #291); merge after them. ## What - The viewer loads the game's tiling wear mask for vehicle part materials: the material parameter `b9f4bdac`, a 2048 px texture with three grunge channels that most vehicles share. It is bound as a new material texture (binding 6), and flag bit 15 says it is present. - Where a material has the mask, the second layer shows where the mask's green channel (tiled 5x over UV0) is above a threshold. - The threshold falls as the part's wear amount rises: the share of the mask shown is 0.45 x amount², read off the mask's green histogram. - Results: none when new, about 30% at level 3, 40% at levels 4 and 5. - Painted body panels, which have no layer detail texture in the install, now show wear too. Parts without the mask keep the old detail-texture rule. ## Checked - Workspace tests pass. - Renders, in a private work folder: - rancher (level 3): rust patches on the cab roof and doors, and the bed floor and wheel well rusty. 4.1% of the picture changes against no wear, up from 1.7% without the mask. - zorrusso (level 0): clean. ## Not decoded / not done - The game windows the mask's three channels (and the layer texture's blue channel) with per-part bytes that come from the wear preset. Which preset field fills which byte is not decoded, so the threshold rule is a stand-in. The tiling factor of 5 matches the age records' minTiling / maxTiling (about 4 to 6.5) but is not read per part. - The game also scales the mask by vertex colours; the viewer does not. - Some materials (the rancher's tailgate and bed sides) name no mask and stay clean.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:25:11 +00:00
github manually merged commit 687c4557eb into gh-pr/293/base 2026-11-26 20:25:13 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.