Vehicles: liveries as data (brands, stickers, textures, layouts) #168

Manually merged
github merged 2 commits from gh-pr/168/head into gh-pr/168/base 2026-11-26 20:14:55 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-24 15:13 UTC · original
holdmysocks:claude/liveries-data → master · +264 −1 · 3 files · 2 commits · merged 2026-11-24 16:05 UTC

What

sixng vehicles now also writes <out>/vehicles/liveries.json: which stickers each vehicle brand puts where. This is the data side of liveries (SIX-109). Nothing is drawn yet; the exact placement of a sticker inside its zones is still not decoded.

How a livery is stored:

  • A livery is a "brand": a vehicle variation record (fc1c7000) such as BENSON_BRAND_BAUMHARDERDAIRY. It gives slots with weighted part options and can build on parent variations (03ae1cb0).
  • Some of its parts list sticker entries (86cdf3df) in their modifier list. An entry names a sticker record and a layout in a layout group.
  • A sticker record (ed9cf5df, vehicle library) names a texture by its 64-bit id in the vehicle texture stores, and holds colours and an aspect class.
  • The layouts are in one PSO file of data.rpf (groups b0dd20cb, layouts e2d9c73a; its field names are hashed with their capitals). A layout lists the sticker zones it covers, a position, a size, a rotation in degrees and the UV set.
  • A vertex's sticker zone is the fourth byte of the mesh's second colour stream (_COLOR1, PR 162).

liveries.json per vehicle: its brands, each with its stickers (part, sticker record, texture id, colours, layout group and name, and the layout's zones, position, size, rotation, UV mode and aspect). New core module vehstickers.

Numbers (one run on the full install)

  • 281 vehicles with brands, 1,898 brands, 1,096 of them with a name from the game's name list.
  • 18,157 stickers placed by brands; 17,005 have their layout, 1,152 name a layout that is not in the file.
  • 2,299 layout groups, 14,561 layouts, 5,614 sticker records.
  • UV mode of the layouts used: 3 (second UV set) on 14,871 stickers, 2 on 1,030, 4 on 690, 1 on 414.
  • The file is 5.7 MB. The run adds about a minute to sixng vehicles.

Checked

  • The benson's dairy brand comes out with six stickers: two large ones on zones 169 to 174 and 177 to 182 (the box's side walls), front wall stickers on 165 to 168, and door logos on 24 and 32. These are the zones found on the models in PR 162.
  • cargo build -p sixng-cli passes without warnings.

Not decoded / not done

  • The exact map from a layout's position to the sticker's place in UV space. Fits over 225 layouts give about "a constant per panel group minus half the position", but two ways of fitting disagree on the scale, so it is not used.
  • A layout's Location and two small integers (80c88a97, 9f8b8007); a sticker entry's five flags.
  • How the game picks a brand for a vehicle. The configurations the viewer uses name no brand.
  • Sticker textures are not exported, and the viewer does not read this file yet.
  • No unit tests.
**@⁠holdmysocks** on GitHub · 2026-11-24 15:13 UTC · [original](https://github.com/holdmysocks/SixNG/pull/168) `holdmysocks:claude/liveries-data` → `master` · +264 −1 · 3 files · 2 commits · merged 2026-11-24 16:05 UTC ## What `sixng vehicles` now also writes `<out>/vehicles/liveries.json`: which stickers each vehicle brand puts where. This is the data side of liveries (SIX-109). Nothing is drawn yet; the exact placement of a sticker inside its zones is still not decoded. How a livery is stored: - A livery is a "brand": a vehicle variation record (`fc1c7000`) such as `BENSON_BRAND_BAUMHARDERDAIRY`. It gives slots with weighted part options and can build on parent variations (`03ae1cb0`). - Some of its parts list sticker entries (`86cdf3df`) in their modifier list. An entry names a sticker record and a layout in a layout group. - A sticker record (`ed9cf5df`, vehicle library) names a texture by its 64-bit id in the vehicle texture stores, and holds colours and an aspect class. - The layouts are in one PSO file of data.rpf (groups `b0dd20cb`, layouts `e2d9c73a`; its field names are hashed with their capitals). A layout lists the sticker zones it covers, a position, a size, a rotation in degrees and the UV set. - A vertex's sticker zone is the fourth byte of the mesh's second colour stream (`_COLOR1`, PR 162). `liveries.json` per vehicle: its brands, each with its stickers (part, sticker record, texture id, colours, layout group and name, and the layout's zones, position, size, rotation, UV mode and aspect). New core module `vehstickers`. ## Numbers (one run on the full install) - 281 vehicles with brands, 1,898 brands, 1,096 of them with a name from the game's name list. - 18,157 stickers placed by brands; 17,005 have their layout, 1,152 name a layout that is not in the file. - 2,299 layout groups, 14,561 layouts, 5,614 sticker records. - UV mode of the layouts used: 3 (second UV set) on 14,871 stickers, 2 on 1,030, 4 on 690, 1 on 414. - The file is 5.7 MB. The run adds about a minute to `sixng vehicles`. ## Checked - The benson's dairy brand comes out with six stickers: two large ones on zones 169 to 174 and 177 to 182 (the box's side walls), front wall stickers on 165 to 168, and door logos on 24 and 32. These are the zones found on the models in PR 162. - `cargo build -p sixng-cli` passes without warnings. ## Not decoded / not done - The exact map from a layout's position to the sticker's place in UV space. Fits over 225 layouts give about "a constant per panel group minus half the position", but two ways of fitting disagree on the scale, so it is not used. - A layout's `Location` and two small integers (`80c88a97`, `9f8b8007`); a sticker entry's five flags. - How the game picks a brand for a vehicle. The configurations the viewer uses name no brand. - Sticker textures are not exported, and the viewer does not read this file yet. - No unit tests.
New core module vehstickers; sixng vehicles also writes <out>/vehicles/liveries.json. Work in progress: the layout reader is not yet checked against the game (the packs index is being rebuilt at version 6).
The layout file's groups are the elements of its root record and its field names are hashed with their capitals. Brands are counted once per vehicle.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:14:52 +00:00
github manually merged commit 4b7b13839b into gh-pr/168/base 2026-11-26 20:14:55 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.