Vehicles: the body paint's finish from the data #127

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

@⁠holdmysocks on GitHub · 2026-11-24 05:47 UTC · original
holdmysocks:claude/paint-finish → master · +54 −10 · 6 files · 1 commits · merged 2026-11-24 05:53 UTC

The viewer gave every vehicle the same metallic paint finish (metalness 0.6, roughness 0.28), which is not in the data. Linear: SIX-76.

What

  • Each part id of a vehicle's part set has a surface record with low / high metalness and roughness. For the primary-paint parts the export discarded it (their vertex alpha is the 254 marker).
  • Export: part_colours.paint_finish in model.json: metalness and roughness of the surfaces of the primary-paint parts, averaged over their vertices of every LOD (vehcolour::paint_finish; low to high by the mean of lyr0materialatex, as for the other parts). part_colours_version 17, so vehicles are exported again on first open. COLOR_0 and the looks are unchanged.
  • Viewer: a fifth finish, "as stored", using those two numbers. It is the default for a vehicle whose export has them, until the user picks a finish or passes --finish (now 0 to 4). Models without the value keep metallic.

Checked

  • Stored values (metalness, roughness): rhino 0 / 0.07, comet7 0 / 0.09, sultan 0 / 0.10, benson 0 / 0.06, rebel 0 / 0.07, bison900 0 / 0.17, apc 0 / 0.17, journey 0 / 0.5. Body paint is non-metallic on all eight.
  • Renders of those eight with the old default and the new one: paint shows its own colour with a sharp highlight instead of a grey metallic sheen (rhino's hull is sand, not near white); journey's painted parts are matte.
  • cargo test -p sixng-core -p sixng-gui passes.

Not decoded / not done

  • One finish per vehicle, not per part: rhino has painted parts with roughness 0.5 next to glossy ones and gets their vertex-weighted mean.
  • Metallic flake, pearl and clear coat are not read from the data (the colour and surface records have more references that are not decoded). The pearl slider is unchanged.
  • The second material of a surface (wear) is not used, so paint is as clean as new.
  • The Metal renderer has no paint finishes at all (it only swaps in the paint colour), so nothing changes there. Not built or run on a Mac.
**@⁠holdmysocks** on GitHub · 2026-11-24 05:47 UTC · [original](https://github.com/holdmysocks/SixNG/pull/127) `holdmysocks:claude/paint-finish` → `master` · +54 −10 · 6 files · 1 commits · merged 2026-11-24 05:53 UTC The viewer gave every vehicle the same metallic paint finish (metalness 0.6, roughness 0.28), which is not in the data. Linear: SIX-76. ## What - Each part id of a vehicle's part set has a surface record with low / high metalness and roughness. For the primary-paint parts the export discarded it (their vertex alpha is the 254 marker). - Export: `part_colours.paint_finish` in model.json: metalness and roughness of the surfaces of the primary-paint parts, averaged over their vertices of every LOD (`vehcolour::paint_finish`; low to high by the mean of `lyr0materialatex`, as for the other parts). `part_colours_version` 17, so vehicles are exported again on first open. COLOR_0 and the looks are unchanged. - Viewer: a fifth finish, "as stored", using those two numbers. It is the default for a vehicle whose export has them, until the user picks a finish or passes `--finish` (now 0 to 4). Models without the value keep metallic. ## Checked - Stored values (metalness, roughness): rhino 0 / 0.07, comet7 0 / 0.09, sultan 0 / 0.10, benson 0 / 0.06, rebel 0 / 0.07, bison900 0 / 0.17, apc 0 / 0.17, journey 0 / 0.5. Body paint is non-metallic on all eight. - Renders of those eight with the old default and the new one: paint shows its own colour with a sharp highlight instead of a grey metallic sheen (rhino's hull is sand, not near white); journey's painted parts are matte. - `cargo test -p sixng-core -p sixng-gui` passes. ## Not decoded / not done - One finish per vehicle, not per part: rhino has painted parts with roughness 0.5 next to glossy ones and gets their vertex-weighted mean. - Metallic flake, pearl and clear coat are not read from the data (the colour and surface records have more references that are not decoded). The pearl slider is unchanged. - The second material of a surface (wear) is not used, so paint is as clean as new. - The Metal renderer has no paint finishes at all (it only swaps in the paint colour), so nothing changes there. Not built or run on a Mac.
- Export: model.json part_colours.paint_finish = metalness and roughness
  of the surfaces of the primary-paint parts, averaged over their
  vertices (vehcolour::paint_finish). part_colours_version 17.
- Viewer: a fifth paint finish, "as stored", which uses it. It is the
  default for a vehicle whose export has one, until a finish is picked
  (or --finish is given); other models keep metallic.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:11:49 +00:00
github manually merged commit 4a473abe59 into gh-pr/127/base 2026-11-26 20:11:51 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.