Vehicles: part colours per configuration, option lists followed #71

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

@⁠holdmysocks on GitHub · 2026-11-23 19:05 UTC · original
holdmysocks:claude/config-looks → master · +170 −24 · 6 files · 1 commits · merged 2026-11-23 19:10 UTC

Picking a configuration in the viewer now changes the vehicle's part colours, and the cause of comet7's black rear deck is fixed at the source.

Option lists

  • A configuration part can be a list of parts to choose one from (f5e9d7df.bf340aab: paint finishes, trims). These were not followed.
  • Configurations that reach their body-paint bindings through such a list kept unpainted panels. That is why comet7's first configuration had a black rear deck.
  • The first part of each list is now followed. All 17 comet7 configurations paint the rear deck.

Colours per configuration

  • Every distinct result is a part set of its own. vehicle_parts.json (format 7) maps model -> configuration key -> part set. The key is FNV-1a of the configuration's part list; vehicles.json writes it as parts_key (format 8).
  • model.json part_colours gains looks (256 x RGBA per distinct result, as hex), configs (parts_key -> look) and default (the look baked into the GLB). Exports are version 5, so the viewer exports vehicles again.
  • Viewer: choosing a configuration recolours the vehicle's parts. --config <n> picks one for automation.
  • comet7 has 16 distinct looks over 17 configurations: paint, a fabric or gloss black roof, interior differences.

Checked

  • comet7 in the viewer in four configurations.
  • 137 core tests pass; both binaries build on this branch (on master with #67 and #68).

Not decoded

  • Which part of an option list the game picks. The first is taken.
  • The other modifier kinds: dirt level, liveries, decal layers.
  • Mod part models keep one look.
**@⁠holdmysocks** on GitHub · 2026-11-23 19:05 UTC · [original](https://github.com/holdmysocks/SixNG/pull/71) `holdmysocks:claude/config-looks` → `master` · +170 −24 · 6 files · 1 commits · merged 2026-11-23 19:10 UTC Picking a configuration in the viewer now changes the vehicle's part colours, and the cause of comet7's black rear deck is fixed at the source. ## Option lists - A configuration part can be a list of parts to choose one from (`f5e9d7df.bf340aab`: paint finishes, trims). These were not followed. - Configurations that reach their body-paint bindings through such a list kept unpainted panels. That is why comet7's first configuration had a black rear deck. - The first part of each list is now followed. All 17 comet7 configurations paint the rear deck. ## Colours per configuration - Every distinct result is a part set of its own. `vehicle_parts.json` (format 7) maps model -> configuration key -> part set. The key is FNV-1a of the configuration's part list; `vehicles.json` writes it as `parts_key` (`format` 8). - `model.json` `part_colours` gains `looks` (256 x RGBA per distinct result, as hex), `configs` (`parts_key` -> look) and `default` (the look baked into the GLB). Exports are version 5, so the viewer exports vehicles again. - Viewer: choosing a configuration recolours the vehicle's parts. `--config <n>` picks one for automation. - comet7 has 16 distinct looks over 17 configurations: paint, a fabric or gloss black roof, interior differences. ## Checked - comet7 in the viewer in four configurations. - 137 core tests pass; both binaries build on this branch (on master with #67 and #68). ## Not decoded - Which part of an option list the game picks. The first is taken. - The other modifier kinds: dirt level, liveries, decal layers. - Mod part models keep one look.
Two things about a configuration's part colours.

1. Option lists. A configuration part can be a list of parts to choose
   one from (f5e9d7df.bf340aab: paint finishes, trims). They were not
   followed, so configurations that reach their body-paint bindings
   through such a list kept unpainted panels (comet7's first
   configuration showed a black rear deck). The first part of each list
   is now followed. With that, all 17 comet7 configurations paint the
   rear deck.

2. Colours follow the chosen configuration. Every distinct result is a
   part set of its own, and an export records them:
   - vehicle_parts.json (format 7): config_sets, model -> configuration
     key -> part set. The key is FNV-1a of the configuration's part
     list; vehicles.json writes it per configuration as parts_key
     ("format" 8).
   - model.json part_colours: looks (256 x RGBA per distinct result, as
     hex, encoded like COLOR_0), configs (parts_key -> look) and default
     (the look baked into the GLB, the one most configurations give).
     Exports are version 5, so the viewer exports vehicles again.
   - Viewer: choosing a configuration recolours the vehicle's parts
     from its look (the part id is in the raw vertex colour alpha).
     --config <n> picks a configuration for automation.
   comet7 has 16 distinct looks over 17 configurations: paint, a fabric
   or gloss black roof, interior differences.

Checked in the viewer on comet7 in four configurations. 137 core tests
pass.

Not decoded: which part of an option list the game picks (the first is
taken); the other modifier kinds (dirt level, liveries, decal layers).
Mod part models keep one look.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:07:30 +00:00
github manually merged commit 2a69a223be into gh-pr/71/base 2026-11-26 20:07:32 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.