Stickers: texture export by id (sixng stickers) and the sticker zone in the viewer's vertices #172
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!172
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/172/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 15:51 UTC · original
holdmysocks:claude/livery-textures→master· +152 −3 · 7 files · 9 commits · merged 2026-11-24 16:42 UTCWhat
First step of a custom livery editor in the viewer (stickers placed on a vehicle by hand). This PR gives the editor its two inputs; nothing is drawn yet.
sixng stickers -o <out>: writes<out>/vehicles/stickers.json, the list of every sticker record of the vehicle library and packs (name hash, texture id, the three colours, mask flag, aspect class, and the record's fields as read). With--texturesevery sticker texture is decoded to<out>/vehicles/stickers/<64-bit id>.png.--name <regex>filters by name hash or texture id;--id <hex>writes one texture.vehstickers::sticker_list,vehstickers::sticker_png(game, id, dir)(decodes one texture intodir, which works as a cache: a file that is there is kept) andvehstickers::parse_texture_id._COLOR1(PR 162) and keeps its fourth byte, the sticker zone, per vertex (Vertex::zone[0]). When fitted parts are merged into a vehicle (a truck's box or bed), each vertex also gets the number of the part it came from (Vertex::zone[1], the part's place inassembled_from, from 1), because zones are numbered per model. The vertex buffer layout passes it at location 14; no shader reads it yet. A vertex grows from 76 to 80 bytes.Found on the way
54ec9205marks a colour mask texture. Of 8,415 records it is true on 6,116 that have colours and on 1 that has none, false on 1,791 without colours and on 507 with. Mask textures looked at are opaque (alpha 254 to 255) with red, green and blue as the cover of three colours; the others have colours and an alpha channel of their own.colorRed,colorGreenandcolorBlue. Thecoloursthat PR 168 writes toliveries.jsonarecolorRed, the field9dbbd803(the same value,ffd9e0e5, on 7,995 of 8,415 records) andcolorGreen;colorBlueis left out there. Not changed in this PR.Checked
--idwrites one texture in 0.2 s; a second call keeps the file.cargo build --release -p sixng-cli -p sixng-guipasses without warnings; the new unit test passes.benson_hiwith its box as before (screenshot compared by eye).Not decoded / not done
718a6bbb,ec4371eb,92dd759a,aa79df8a,b35f9888,layer, the emissive and glass values) are passed through as read, not interpreted._COLOR1in their cached GLB; the viewer reads zone 0 for them until they are exported again. The next PR handles that for the editor.metal4-poc) was not built here.