Live data from Hacker News

Show HN: Browser-based light pollution simulator using real photometric data

iesna.eu

1–10 of 22 posts

Show HN: Browser-based light pollution simulator using real photometric data

#1
Hi HN — author here. iesna.eu is a browser-based ecosystem for working with photometric data: parsing standard luminaire files (LDT/EULUMDAT, IES LM-63, Oxytech, ATLA-S001), running design calculations against EN 13201 / ANSI/IES RP-8 / CJJ 45 / IES-IDA MLO, and (the part I most want to show off here) rendering real urban scenes in Bevy with the photometric data driving actual streetlight behavior, including sky-glow contribution. The Skyglow Analysis demo loads a real LDT file into a Bevy scene (Khronos Bistro test asset). The luminaire's intensity distribution drives the streetlight rendering directly — no fudging — and the sky-glow grade updates live as you adjust the uplight percentage. Swap to a full-cutoff fixture and the sky goes from F (Severe) back to A (Excellent). You can see the difference on the buildings as well as in the sky. Stack: Rust core (eulumdat-rs and friends, ~20 crates handling photometric formats), Bevy for the 3D rendering, WASM for browser deployment. No backend; everything runs client-side. About a thousand lines of new code on top of the existing photometric library to make the Bevy integration work. Things I'd love feedback on:

The atmospheric scattering model is currently single-scattering Rayleigh+Mie. Is that defensible for the use case, or should I move toward multi-scattering? The Bistro test scene works well visually but isn't a controlled environment. Anyone know of a public urban geometry asset that's more typical of real road-lighting evaluation? The CJJ 45 implementation (China's national road lighting standard) is the only one I've had to reverse-engineer from translated PDFs. If anyone has primary-source experience with it, I'd value a sanity check.

Open-source on GitHub (eulumdat-rs and the related crates). Crates.io: eulumdat

Show HN: Browser-based light pollution simulator using real photometric data
iesna.eu

Re: Show HN: Browser-based light pollution simulator using real photometric data

#3
post #2

All I get is an empty, dark blue page after I hit Launch Demo. Perhaps that does look a bit like a night sky, but I don't think that's what you're going for :) Tested in Firefox/Brave/Chrome on Linux.

Thanks for the information, i should have mentioned, webgpu is explicitly used here, and this might be the issue! Bevy's usage of WebGL2 is not that mature, and i use Bindless rendering (from my own contribution)...

Re: Show HN: Browser-based light pollution simulator using real photometric data

#6
post #2

All I get is an empty, dark blue page after I hit Launch Demo. Perhaps that does look a bit like a night sky, but I don't think that's what you're going for :) Tested in Firefox/Brave/Chrome on Linux.

https://iesna.eu/?wasm=skyglow_demo&force=webgl2, tested on wsl2 ubuntu, sorry linux machine in the office :D

Re: Show HN: Browser-based light pollution simulator using real photometric data

#7
I love the idea, but it feels very un-serious as an attempt to educate people or reduce light pollution, which makes me very sad as someone who cares about reducing light pollution :'(

Why can't I create any light pollution no matter what I do? The stars wink out when the light pollution is 1000x less bright than the stars. It just feels completely disconnected from what I know light pollution feels like.

If I may make a technical suggestion, accurately representing the "qualia" of what both the presence and absence of colorful light feels like on a monitor requires compressing the color space a bit. Take a gander at this: https://brandonli.net/spectra/doc/

Re: Show HN: Browser-based light pollution simulator using real photometric data

#8

I love the idea, but it feels very un-serious as an attempt to educate people or reduce light pollution, which makes me very sad as someone who cares about reducing light pollution :'( Why can't I create any light pollution no matter what I do? The stars wink out when the light pollution is 1000x less bright than the stars. It just feels completely disconnected from what I know light pollution feels like. If I may ma…

[flagged]

Re: Show HN: Browser-based light pollution simulator using real photometric data

#9

I love the idea, but it feels very un-serious as an attempt to educate people or reduce light pollution, which makes me very sad as someone who cares about reducing light pollution :'( Why can't I create any light pollution no matter what I do? The stars wink out when the light pollution is 1000x less bright than the stars. It just feels completely disconnected from what I know light pollution feels like. If I may ma…

I suspect that another part of it is that you're accounting for the effect of the lights in the scene on the sky, but very few of the lights involved in light pollution will be lights that you can directly see -- the only evidence they exist will be from their upward scattering.

So here's the suggestion: there should be a "number of upward lights" slider which should influence an atmospheric light haze shader which, like real light pollution is brightest near the horizon. Then you could use a relatively real stellar skymap and give a sense of what it feels like to lose sight of the heavens, which is a kind of shocking thing to see, as well as what it might take to fix it.

Re: Show HN: Browser-based light pollution simulator using real photometric data

#10

I love the idea, but it feels very un-serious as an attempt to educate people or reduce light pollution, which makes me very sad as someone who cares about reducing light pollution :'( Why can't I create any light pollution no matter what I do? The stars wink out when the light pollution is 1000x less bright than the stars. It just feels completely disconnected from what I know light pollution feels like. If I may ma…

I suspect that another part of it is that you're accounting for the effect of the lights in the scene on the sky, but very few of the lights involved in light pollution will be lights that you can directly see -- the only evidence they exist will be from their upward scattering. So here's the suggestion: there should be a "number of upward lights" slider which should influence an atmospheric light haze shader which,…

That's the real good proposal. I must admit, my focus was on the street lights, which in general are already almost good, compared to what you mention Thanks a lot
Post reply on HN