Vehicles: mod part models take their vehicle's part colours #124

Manually merged
github merged 3 commits from gh-pr/124/head into gh-pr/124/base 2026-11-26 20:11:37 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 05:23 UTC · original
holdmysocks:claude/bed-colours → master · +28 −3 · 1 files · 3 commits · merged 2026-11-24 05:33 UTC

Pickup beds and other mod part models were exported without part colours, so most beds showed stock grey beside a painted cab. For after the 0.8.0 release.

What

  • A part model (pickup bed, bumper, bonnet, roll bar ...) has no part set of its own. Its vertices carry part ids of its vehicle's set, and nothing linked a part model to its vehicle.
  • vehcolour::Tables gets part_owner: the asset id (meta7a::asset_id, PR 118) of every model a single vehicle's pack fits, to that vehicle. for_model falls back to the vehicle's set through it.
  • Whose pack it is: the chassis part has an element for the vehicle's own model, and that model's asset id is the name of the vehicle's part set. Variation sets without an owner (filed under 0) are not vehicles; taking one gave benson's bonnet the unmodified base set (a red bonnet) in an earlier try.
  • vehicle_parts.json format 16, part_colours_version 16 (vehicles and their parts are exported again on first open).

Checked

  • Table: 11,369 model ids linked to 315 vehicles; sets, models, elements and configuration counts are as before (3,622 / 320 / 319 / 318).
  • Renders of the 16 trucks and pickups: beds take the cab's colours (reclaimerclassic teal, bobcatxl silver, where they were grey); cabs unchanged; benson's bonnet matches its cab.
  • Renders of sultan, comet7, declasse500, journey, rhino: as before. pulsebike now has its purple body panels. reclaimerclassic's flatbed and tow bed configurations are coloured.
  • cargo test -p sixng-core -p sixng-gui passes.

Not decoded / not done

  • A part shows the vehicle's default look until a configuration is chosen in the viewer, then follows it like the body; an exported part GLB on its own always has the default look (no part_colours.looks for parts).
  • Parts from the shared library (truck beds and boxes) are not covered: they have no single owner.
  • Whether a part's own modifiers change colours beyond the vehicle's configuration looks was not checked.
  • Checked by eye on about 25 vehicles, not the whole fleet.
**@⁠holdmysocks** on GitHub · 2026-11-24 05:23 UTC · [original](https://github.com/holdmysocks/SixNG/pull/124) `holdmysocks:claude/bed-colours` → `master` · +28 −3 · 1 files · 3 commits · merged 2026-11-24 05:33 UTC Pickup beds and other mod part models were exported without part colours, so most beds showed stock grey beside a painted cab. For after the 0.8.0 release. ## What - A part model (pickup bed, bumper, bonnet, roll bar ...) has no part set of its own. Its vertices carry part ids of its vehicle's set, and nothing linked a part model to its vehicle. - `vehcolour::Tables` gets `part_owner`: the asset id (`meta7a::asset_id`, PR 118) of every model a single vehicle's pack fits, to that vehicle. `for_model` falls back to the vehicle's set through it. - Whose pack it is: the chassis part has an element for the vehicle's own model, and that model's asset id is the name of the vehicle's part set. Variation sets without an owner (filed under 0) are not vehicles; taking one gave benson's bonnet the unmodified base set (a red bonnet) in an earlier try. - `vehicle_parts.json` format 16, `part_colours_version` 16 (vehicles and their parts are exported again on first open). ## Checked - Table: 11,369 model ids linked to 315 vehicles; sets, models, elements and configuration counts are as before (3,622 / 320 / 319 / 318). - Renders of the 16 trucks and pickups: beds take the cab's colours (reclaimerclassic teal, bobcatxl silver, where they were grey); cabs unchanged; benson's bonnet matches its cab. - Renders of sultan, comet7, declasse500, journey, rhino: as before. pulsebike now has its purple body panels. reclaimerclassic's flatbed and tow bed configurations are coloured. - `cargo test -p sixng-core -p sixng-gui` passes. ## Not decoded / not done - A part shows the vehicle's default look until a configuration is chosen in the viewer, then follows it like the body; an exported part GLB on its own always has the default look (no `part_colours.looks` for parts). - Parts from the shared library (truck beds and boxes) are not covered: they have no single owner. - Whether a part's own modifiers change colours beyond the vehicle's configuration looks was not checked. - Checked by eye on about 25 vehicles, not the whole fleet.
- A mod part element's `asset` in a vehicle pack is a 64-bit id of its
  model: the first half of MurmurHash3 x64 128 (seed 0) of the model's
  lower-case name without LOD suffix (`meta7a::asset_id`). vehicles.json
  gives it per element (`asset`, format 12).
- The viewer finds a part's models by it. A pickup's bed is fitted by a
  part of the vehicle's own pack (bed at mod_bed_attach plus the rear
  bumper), which the configurations list: the bed no longer needs the
  name guess, and a configuration that names a flatbed or tow bed gets
  that body. Parts of that slot are one "body" choice.
- Two parts can fit the same first model; the option answers to both.
- The chassis part lists every stock alternative and is left as it was.
- An automated screenshot waits for a parts reload a configuration asked
  for.
A part model (pickup bed, bumper, bonnet, roll bar ...) has no part set
of its own: its vertices carry part ids of its vehicle's set. Tables now
maps the asset id of every model a single vehicle's pack fits to that
vehicle (`part_owner`), and `for_model` falls back to the vehicle's set.
The pack's vehicle is the one whose part set is named by the asset id of
the pack's own model element; variation sets without an owner are not
vehicles.

vehicle_parts.json format 16, part_colours_version 16.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:11:35 +00:00
github manually merged commit 0819916802 into gh-pr/124/base 2026-11-26 20:11:37 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.