Export: LED lamps light only their LED packages #247

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

@⁠holdmysocks on GitHub · 2026-11-25 05:52 UTC · original
holdmysocks:claude/led-lamps → master · +33 −2 · 1 files · 1 commits · merged 2026-11-25 06:15 UTC

What

Some vehicle lamps (spot, flood and marker lamps drawn with standard_vehicle_emissive_animated_bones) use the LED strip picture and glowed over all of it, board included. Same cause as PR 236 fixed for the rim light strip.

These lamps either have no emissivetex, or bind their colour map there again. The colour map's alpha is 255 on the LED packages and 0 on the board between them. The export now writes the emissive map of such a lamp as colour times alpha (the _lit.png PR 236 introduced), so only the LEDs glow.

A lamp with its own, different emissive map keeps it. A colour map with one alpha value all over is left as it is. Other shaders are not touched.

SIX-200.

Checked

  • Survey of 1,975 exported vehicle models: 20 lamp materials bind the LED picture this way (9 without an emissive map, 11 with the colour map bound again). The two other colour maps this shader uses there have a uniform alpha, so they do not change.
  • Exports of a coach and an ambulance with this change: the lamp materials now carry the lit map as emissive texture; base colour unchanged.
  • Unit test for which shaders light by their colour map's alpha. Workspace tests pass.

Not decoded / not done

  • Not confirmed in the game.
  • No visible difference in the viewer at whole-vehicle distance with the lights on (before and after pictures of the coach and the ambulance are identical); not looked at close up, and not in a render of the GLB.
  • The rule is tied to this one shader. Other emissive shaders that might light by alpha were not surveyed beyond the list above.
**@⁠holdmysocks** on GitHub · 2026-11-25 05:52 UTC · [original](https://github.com/holdmysocks/SixNG/pull/247) `holdmysocks:claude/led-lamps` → `master` · +33 −2 · 1 files · 1 commits · merged 2026-11-25 06:15 UTC ## What Some vehicle lamps (spot, flood and marker lamps drawn with `standard_vehicle_emissive_animated_bones`) use the LED strip picture and glowed over all of it, board included. Same cause as PR 236 fixed for the rim light strip. These lamps either have no `emissivetex`, or bind their colour map there again. The colour map's alpha is 255 on the LED packages and 0 on the board between them. The export now writes the emissive map of such a lamp as colour times alpha (the `_lit.png` PR 236 introduced), so only the LEDs glow. A lamp with its own, different emissive map keeps it. A colour map with one alpha value all over is left as it is. Other shaders are not touched. SIX-200. ## Checked - Survey of 1,975 exported vehicle models: 20 lamp materials bind the LED picture this way (9 without an emissive map, 11 with the colour map bound again). The two other colour maps this shader uses there have a uniform alpha, so they do not change. - Exports of a coach and an ambulance with this change: the lamp materials now carry the lit map as emissive texture; base colour unchanged. - Unit test for which shaders light by their colour map's alpha. Workspace tests pass. ## Not decoded / not done - Not confirmed in the game. - No visible difference in the viewer at whole-vehicle distance with the lights on (before and after pictures of the coach and the ambulance are identical); not looked at close up, and not in a render of the GLB. - The rule is tied to this one shader. Other emissive shaders that might light by alpha were not surveyed beyond the list above.
A vehicle lamp (standard_vehicle_emissive_animated_bones) that lights by its colour map, with no emissivetex or the colour map bound there again, glowed over the whole map. Its emissive map is now the colour times the alpha, as on the rim light strip. Maps with one alpha all over are unchanged.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:21:18 +00:00
github manually merged commit 30a0df78d5 into gh-pr/247/base 2026-11-26 20:21:20 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.