← Back to Blogs
HN Story

Skyglow: A Browser-Based Light Pollution Simulator for Darkness Preservation

May 6, 2026

Skyglow: A Browser-Based Light Pollution Simulator for Darkness Preservation

Light pollution, the excessive or inappropriate use of artificial light, is a growing concern with significant impacts on nocturnal ecosystems, human health, and our ability to observe the night sky. Understanding and mitigating this issue requires effective tools for visualization and analysis. A new project, "Skyglow: Darkness Preservation Simulator," aims to address this by providing a browser-based, interactive platform for analyzing light pollution using real photometric data.

This simulator offers a novel approach to engaging with the complex topic of light pollution, allowing users to explore its effects in a simulated environment. By making such a tool accessible directly through a web browser, it lowers the barrier to entry for researchers, urban planners, and concerned citizens alike, fostering greater awareness and informed decision-making.

The Skyglow Simulator: An Overview

The "Skyglow: Darkness Preservation Simulator" is presented as an interactive light pollution analysis tool that utilizes photometric data. The demo features a "Bistro Exterior scene," which, at approximately 25 MB, provides a detailed environment for simulation. The core idea is to allow users to manipulate lighting scenarios and observe the resulting impact on skyglow, aiming to demonstrate the importance of preserving natural darkness.

Leveraging Photometric Data

A key aspect of the simulator is its use of real photometric data, specifically LDT/IES (Eulumdat/Illuminating Engineering Society) files. These files contain detailed information about how light fixtures distribute light, making the simulations grounded in real-world lighting characteristics. This commitment to using accurate data is crucial for the simulator's credibility and its potential as an educational and analytical tool.

Technical Implementation and Browser Compatibility

The simulator leverages modern web technologies to deliver its interactive experience. The primary rendering technology employed is WebGPU, a cutting-edge web standard that provides advanced graphics and compute capabilities directly in the browser.

WebGPU and Its Challenges

While WebGPU offers significant advantages, its adoption and stable implementation across all browsers are still evolving. The author, @holg, noted specific compatibility issues:

I should have mentioned: WebGPU is needed, on Safari there is a bug in the Bevy Overlay, so you only see flickering (very annoying!) This is an upstream issue (on to it) So FF and Chrome works fine (if WebGPU is enabled!)

This highlights the common challenges faced when deploying applications using nascent web technologies, where browser-specific bugs can impede the user experience. For optimal performance, users are advised to use Firefox or Chrome with WebGPU enabled.

The WebGL2 Fallback

Recognizing that not all users might have WebGPU enabled or supported, the author quickly implemented a fallback mechanism. A WebGL2 version was added to ensure broader accessibility, albeit with a potential degradation in quality:

Ok, even so the quality degrades a lot, i added the webgl2 version, it shall load as fallback, if webgpu is not enabled, but can as well be enforced, to see the difference: https://iesna.eu/?wasm=skyglow_demo&force=webgl2

This demonstrates a pragmatic approach to development, balancing cutting-edge features with practical accessibility for a wider audience.

Early User Feedback and Areas for Improvement

Initial user feedback, as is common with early demos, pointed to both technical hurdles and conceptual areas for refinement.

Initial Accessibility Hurdles

Some users encountered issues even before interacting with the simulation itself. For instance, one user reported:

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.

Such reports underscore the importance of robust error handling and clear user guidance, especially when dealing with varying browser configurations and hardware capabilities.

Representing the "Qualia" of Darkness

A more profound piece of feedback touched upon the simulator's ability to accurately convey the experience of light pollution and its absence. A user expressed concern about the simulator's perceived lack of seriousness in educating about light pollution:

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.

This critique highlights a crucial challenge in simulation: accurately representing subjective human perception, or "qualia." The user suggested a technical approach to improve this, recommending compression of the color space to better represent the visual impact of both light and its absence on a monitor. They pointed to resources like Brandon Li's work on spectra for guidance:

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/

This feedback offers a valuable pathway for future development, suggesting that beyond raw data accuracy, the perceptual fidelity of the simulation is key to its effectiveness as an educational tool.

Conclusion

The "Skyglow: Darkness Preservation Simulator" represents an ambitious and important step towards making light pollution analysis more accessible and interactive. By leveraging real photometric data and modern web technologies like WebGPU, it lays a strong foundation for a powerful educational and analytical tool. While early feedback points to technical challenges in browser compatibility and the nuanced task of accurately simulating human perception of light and darkness, the project's rapid iteration, such as the addition of a WebGL2 fallback, demonstrates a commitment to improvement. Addressing these areas will further enhance its utility and impact in the ongoing effort to preserve our night skies.

References

HN Stories