Skip to content

Add Light Defaults editor tool - #9856

Merged
Blyron merged 2 commits into
ue58-devfrom
marcos/ue58_Lights
Sep 2, 2026
Merged

Add Light Defaults editor tool#9856
Blyron merged 2 commits into
ue58-devfrom
marcos/ue58_Lights

Conversation

@Madecu

@Madecu Madecu commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a "Light Defaults" editor tool (Window > Light Defaults) to tune
color/intensity/emissive for street lights, building lights, traffic
lights, procedural building windows, and vehicle lights from one panel,
backed by a reusable per-class JSON catalog instead of editing each
Blueprint/material by hand. Also includes two lighting bugs found and
fixed while building the tool.

Companion content PR (required for the tool to have anything to read/write
and for the fixes below to take effect):

  • Lights (UCarlaLight): applied natively in C++, bypassing a dead
    Blueprint event that never reached the native component.
  • Traffic lights: emissive + on/off preview, writes onto the MID the
    traffic light's own construction script already owns (no new MID, keeps
    its red/amber/green cycle array intact).
  • Procedural buildings: per-window "Percent Lit" via a new
    PerInstanceRandom-gated parameter added to M_FakeInterior in the content
    PR, instead of only being able to toggle an entire HISM block at once.
  • Vehicles: full catalog from VehicleParameters.json (not just what's
    placed in the level), per-group intensity, live preview with camera
    framing, and runtime integration with manual_control.py/generate_traffic.py
    light toggling.
  • Bug fix: vehicle turn-indicator light-function (road/environment
    illumination, LFM_Indicator in the content PR) was reading the engine's
    raw, unsynchronized Time instead of the same VisualTime used by the
    body's emissive material -- fixed the permanent phase offset between the
    two.
  • Bug fix: Moon directional light could win SkyAtmosphere's single
    sun-light slot over the real Sun, and could get stuck at its night-floor
    intensity during the day -- both caused broken/black sky rendering in
    some configurations.

This change is Reviewable

…osphere lighting

New editor tool (Window > Light Defaults) to edit color/intensity/emissive
for street/building/vehicle lights, traffic lights, and procedural building
windows from a single panel, backed by a reusable JSON catalog
(Config/Lights/Defaults.json) keyed by asset class with LightGroup fallback.

- CarlaLight: apply intensity/color/emissive natively in C++ instead of
  relying on BP_Lights' UpdateLights BlueprintImplementableEvent, confirmed
  dead (never reached the native light component).
- CarlaWheeledVehicle: apply saved per-group light intensities on BeginPlay
  and after every SetVehicleLightState, gated by which group is actually on,
  so the Blueprint's own weak RefreshLightState values don't win the race.
- Sky/Weather: stop the Moon directional light from contending with the Sun
  for the single forward-shading/SkyAtmosphere sun slot (ForwardShadingPriority,
  AtmosphereSunLight) -- was causing a black sky once the sun rose in some
  configurations. Also reset Moon intensity when it's day (was getting stuck
  at its night floor) and neutralize a stray third DirectionalLight introduced
  by SetSunActorReference.
- Carla.Build.cs/Carla.cpp: wire up new module dependencies (InputCore,
  AppFramework for SColorPicker) and register/unregister the Light Defaults
  editor tab + map-opened hook.
- CustomV2XSensor.cpp: add missing CarlaStatics.h include (unrelated, needed
  to compile).
@Madecu
Madecu requested a review from a team as a code owner September 2, 2026 11:57
@Blyron
Blyron changed the base branch from ue5-dev to ue58-dev September 2, 2026 12:01
@Blyron
Blyron merged commit 0de5574 into ue58-dev Sep 2, 2026
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.

2 participants