Vehicles: part colours per pixel from the material palette #137
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!137
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/137/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-24 11:58 UTC · original
holdmysocks:claude/palette-per-pixel→master· +127 −8 · 9 files · 1 commits · merged 2026-11-24 12:07 UTCWhat
A vehicle part without a colour of its own reads a row of the material palette. Until now the whole part got one colour: the row at the mean green of the model's layer detail textures. The game picks the column per pixel from the green channel of the material's layer detail texture (
lyr0diffusetex). The viewer now does the same.vehicle_palette.png(128 columns, its 8 slices one below the other, 256 rows each).model.jsonpart_coloursgetsrows(per look, the palette row of each part id: 256 x 4 hex digits,ffff= the part has a colour of its own) andpalette. Part colours version 19, so the viewer exports vehicle models again once.looksare unchanged, so other readers of the export see what they saw before.tile.w= 2 marks it).Measured
Checked
cargo test -p sixng-core vehcolourpasses.Not decoded / not done
rowsand keep one colour per part. Wheels keep one colour per part.