Skip to content

Instrument backlighting with emissive dimmer - #46

Merged
vanlueckn merged 1 commit into
mainfrom
t3code/weather-rendering-polish
Aug 16, 2026
Merged

Instrument backlighting with emissive dimmer#46
vanlueckn merged 1 commit into
mainfrom
t3code/weather-rendering-polish

Conversation

@vanlueckn

Copy link
Copy Markdown
Collaborator

Summary

  • New motion type Motion::Emissive: scales a material's emissive colour by a value (0…1) instead of moving the node, enabling smooth dimming of backlighting
  • Cab input CabInputs::instrument_light (f64, 0…1) with CabControl::InstrumentLight for keyboard control (,/. keys) and interactive 3D cab binding
  • UI system in models.rs:
    • animate_backlight() system updates emissive colour of glowing parts per frame
    • GlowMesh component tracks base emissive colour and parent part node
    • Material cloning during bind to preserve per-part emissive scaling
  • BR 101 example model includes instrument_light node with emissive material, demonstrating content integration
  • Editors updated: vehicle editor, signal editor UI to support the new motion type
  • Documentation in MODS.md and STATUS.md covering usage pattern and technical notes
  • i18n strings added to both en and de locales (motion-glow, cab-input-instrument-light, hud-keys-lights)

Testing

  • Verified i18n keys exist in both crates/i18n/locales/en/main.ftl and crates/i18n/locales/de/main.ftl
  • Confirmed Motion::Emissive integrated into all editor motion-selection paths (vehicle, signal, UI)
  • BR 101 model includes functional instrument_light binding with Motion::Emissive
  • Keyboard input (, and .) integrated into player_input() system for continuous dimmer control
  • HUD updated to display lights control keys under separate hud-keys-lights line
  • All part_value() branches return appropriate values for the new switch:instrument_light and switch:cab_light functions
  • Not run: full runtime test of dimming interaction with the 3D cab and material emissive scaling

- Add Motion::Emissive: scales material emissive colour instead of moving node
- Bind emissive parts in 3D cab via switch:instrument_light, dimmed by `,`/`.` keys (0…1)
- Material cloning ensures only the backlit panel dims, not the entire vehicle
- Update cab light, headlight and instrument dimmer controls in HUD
- Document emissive motion in vehicle editor, signal editor, and MODS.md
@vanlueckn
vanlueckn merged commit bfbd2d4 into main Aug 16, 2026
3 checks passed
@vanlueckn
vanlueckn deleted the t3code/weather-rendering-polish branch August 16, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant