Revamped lighting #7

Closed
opened 2026-10-17 15:55:27 +00:00 by oliver · 4 comments
Collaborator

Lighting looks kinda ass rn. Very flat/unflattering.

Implement different lighting algorithm + dynamic light source/sun moving across the campus based on time of day?

Lighting looks kinda ass rn. Very flat/unflattering. Implement different lighting algorithm + dynamic light source/sun moving across the campus based on time of day?
oliver added this to the (deleted) project 2026-10-17 15:55:27 +00:00
Owner

Three new issues out of the OSM/MazeMap coverage audit bear on this one:

  • #39 Light the campus at night -- 105 highway=street_lamp nodes with
    lamp_mount/lamp_type, and 603 ways tagged lit=yes / 156 lit=no. Every
    lamp is currently a PROP_LAMP box that emits nothing, so the night is
    uniformly moonlit. The cheap version is not a point-light budget at all: a lit
    surface with a higher albedo at night, per street, from the lit way tag.
  • #47 Weather from Open-Meteo -- free, no key, same reason the elevation
    source needs none. Cloud cover dims the directional light, which is a lighting
    question more than a weather one.
  • #48 Rain and snow -- and a snow line is a comparison against the
    BakedTerrain height field the bake already carries, which is a cheap feature
    for something that looks as good as it does.

None of them are the revamp. They are the two things that decide what the
revamped lighting has to cope with: a night that is actually dark, and a campus
where parts of it are lit and parts are not.

Three new issues out of the OSM/MazeMap coverage audit bear on this one: - #39 **Light the campus at night** -- 105 `highway=street_lamp` nodes with `lamp_mount`/`lamp_type`, and 603 ways tagged `lit=yes` / 156 `lit=no`. Every lamp is currently a `PROP_LAMP` box that emits nothing, so the night is uniformly moonlit. The cheap version is not a point-light budget at all: a lit surface with a higher albedo at night, per street, from the `lit` way tag. - #47 **Weather from Open-Meteo** -- free, no key, same reason the elevation source needs none. Cloud cover dims the directional light, which is a lighting question more than a weather one. - #48 **Rain and snow** -- and a snow line is a comparison against the `BakedTerrain` height field the bake already carries, which is a cheap feature for something that looks as good as it does. None of them are the revamp. They are the two things that decide what the revamped lighting has to cope with: a night that is actually dark, and a campus where parts of it are lit and parts are not.
sermuns added this to the Living campus milestone 2026-10-19 22:18:48 +00:00
Owner

#7 is still a wish, not a spec: "different lighting algorithm" + "sun moving" + "looks flat" are three separate changes, and #39 already scoped the night/street-lamp half. Before this can be worked it needs acceptance criteria and a decision on what replaces the current Blinn-Phong plus single shadow map. A moving sun also changes shadow-map invalidation, which the architecture currently assumes is static. I'd either close this in favour of concrete successors (#47/#48/#64) or rewrite it as a short list of measurable outcomes with one algorithm named.

#7 is still a wish, not a spec: "different lighting algorithm" + "sun moving" + "looks flat" are three separate changes, and #39 already scoped the night/street-lamp half. Before this can be worked it needs acceptance criteria and a decision on what replaces the current Blinn-Phong plus single shadow map. A moving sun also changes shadow-map invalidation, which the architecture currently assumes is static. I'd either close this in favour of concrete successors (#47/#48/#64) or rewrite it as a short list of measurable outcomes with one algorithm named.
Owner

Status check (2026-10-20): the flat lighting it complains about has been replaced. The renderer is Blinn-Phong with a Schlick fresnel, a PCF shadow map, per-fragment fog, ACES tonemap and server-global day/night. The part that is not implemented is a sun that moves with time of day: config::SUN_DIR is fixed and the shadow map is rebuilt only when the light direction changes. ARCHITECTURE.md currently keeps a fixed sun by design. So the algorithm half is done; the moving-sun half needs acceptance criteria and a decision on shadow invalidation, or this should close in favour of #47/#48/#64 as previously suggested.

Status check (2026-10-20): the flat lighting it complains about has been replaced. The renderer is Blinn-Phong with a Schlick fresnel, a PCF shadow map, per-fragment fog, ACES tonemap and server-global day/night. The part that is *not* implemented is a sun that moves with time of day: `config::SUN_DIR` is fixed and the shadow map is rebuilt only when the light direction changes. `ARCHITECTURE.md` currently keeps a fixed sun by design. So the algorithm half is done; the moving-sun half needs acceptance criteria and a decision on shadow invalidation, or this should close in favour of #47/#48/#64 as previously suggested.
Owner

Status, since the last check.

The lighting stack is further along than when this was last looked at: the sky is a real pipeline with a drifting cloud panorama, ambient carries a baked cavity term, and the day and night fade interpolates the light values and the sky instead of snapping between two presets (#79, #82, #92). The flat lighting this complained about is well past what it described.

What is still true is that config::SUN_DIR is fixed and the shadow map is rebuilt only when the light direction changes, so the moving-sun half is untouched, and shadow invalidation is the reason it has not been attempted.

The earlier note still stands, then: the algorithm half is done and the rest wants acceptance criteria and a decision on shadow invalidation. This looks like a candidate for closing in favour of #47, #48 and #64. I have left it open because the rewrite-versus-close choice is yours.

Status, since the last check. The lighting stack is further along than when this was last looked at: the sky is a real pipeline with a drifting cloud panorama, ambient carries a baked cavity term, and the day and night fade interpolates the light values and the sky instead of snapping between two presets (#79, #82, #92). The flat lighting this complained about is well past what it described. What is still true is that `config::SUN_DIR` is fixed and the shadow map is rebuilt only when the light direction changes, so the moving-sun half is untouched, and shadow invalidation is the reason it has not been attempted. The earlier note still stands, then: the algorithm half is done and the rest wants acceptance criteria and a decision on shadow invalidation. This looks like a candidate for closing in favour of #47, #48 and #64. I have left it open because the rewrite-versus-close choice is yours.
Sign in to join this conversation.
No description provided.