Modelling the sky from the ground
Light pollution maps usually describe the brightness of the sky directly overhead. For astronomers, this is a useful starting point, but observing conditions can vary considerably across the celestial hemisphere.
A site with a dark zenith may still suffer from extensive urban skyglow along its southern horizon. A distant city may be prominent in one direction but almost imperceptible in another. Terrain, atmospheric clarity, source distance and the distribution of artificial lighting all influence the result.
The DarkSkySites APEX simulator was developed to investigate these directional effects.
APEX uses satellite observations of artificial light to construct a three-dimensional model of the illuminated atmosphere around a selected observing location. It calculates how light from the ground is scattered and attenuated as it travels through the air, then renders the resulting skyglow from the observer's position.
The simulator combines established radiative-transfer physics with GPU-accelerated numerical methods, allowing a computationally demanding atmospheric problem to be explored interactively in a web browser.
Its purpose is practical: to provide a useful estimate of where artificial skyglow will appear, how it will be distributed across the sky, and which parts of the horizon are likely to be most affected.
1. From satellite observations to ground emission
APEX begins with night-time radiance measurements from the Visible Infrared Imaging Radiometer Suite (VIIRS), carried aboard Earth-observing satellites.
The instrument's Day/Night Band detects visible and near-infrared light escaping into space from cities, roads, industrial facilities, ports and other illuminated areas.
DarkSkySites processes these observations through its own geospatial pipeline, using NASA data products to maintain a geographical record of artificial lighting.
When an observing location is selected, APEX retrieves a local radiance field from the available processed dataset. The field contains the geographical distribution and relative intensity of artificial light sources surrounding the observer.
Low-level background signals and potential non-emission artefacts are screened before the remaining radiance is introduced into the atmospheric model.
Satellite radiance cannot provide a complete description of lighting on the ground. VIIRS observes light travelling upwards through the atmosphere, with a limited spectral response and without knowing the precise direction in which individual lamps originally emitted their light.
APEX must therefore estimate the original emission field using a combination of satellite measurements and parameterised emission geometry.
Once prepared, this field becomes the source of illumination for the atmospheric calculation.
2. Building a three-dimensional atmosphere
The central component of APEX is a volumetric representation of the atmosphere surrounding the observer.
The engine divides the modelled region into a three-dimensional grid of cells, known as voxels. Each cell represents a small volume of air, with atmospheric properties determined by its position and altitude.
The renderer supports several resolution presets, including an ultra-resolution grid of up to 128 × 128 × 96 voxels.
The model represents two principal scattering components:
Molecular scattering, described by Rayleigh theory, accounts for the interaction of light with atmospheric molecules. Molecular density decreases with altitude and is represented using an exponential atmospheric profile.
Aerosol scattering, approximated through Mie-type behaviour, accounts for the effects of suspended particles including dust, haze, smoke and atmospheric pollution. Aerosols are generally concentrated in the lower atmosphere, although their distribution varies with weather and geographical conditions.
Each component has its own vertical density profile, scattering coefficient and angular behaviour.
The resulting atmosphere provides a spatial framework through which light can be transported, scattered and attenuated.
Why atmospheric structure matters
The vertical distribution of air and aerosols strongly influences the shape of artificial skyglow.
Light travelling through dense lower-atmospheric layers experiences different scattering and extinction from light passing through the thinner air at higher altitudes.
A distant city can illuminate a substantial volume of atmosphere while contributing comparatively little light directly along the line of sight to an observer. Some of its emissions reach higher atmospheric layers, where scattering redirects a portion of that light towards the ground.
The apparent height and extent of a light dome therefore depend on the three-dimensional distribution of illuminated air, the viewing angle and the atmospheric conditions.
APEX calculates these effects within its voxel field before rendering the final sky image.
3. Calculating how light propagates
Artificial skyglow is an atmospheric radiative-transfer problem.
As light travels through the air, some continues in its original direction, some is absorbed, and some is redirected by molecules and aerosols. The light reaching an observer represents the accumulated contribution of many emission sources and scattering events along the viewing path.
The radiative transfer equation describes this process in terms of the radiance entering and leaving each region of the atmosphere.
A complete numerical solution would require extremely detailed information about the angular and spectral distribution of light throughout the entire atmospheric volume, including repeated scattering between different regions.
Such calculations are possible using specialised offline solvers, but their computational cost is substantial.
APEX uses an approximate solution designed for interactive rendering. It retains the dominant physical processes, including source geometry, atmospheric density, scattering phase functions, optical extinction and higher-order scattering, while precomputing the most expensive parts of the calculation.
First-order scattering
The first major compute stage estimates how light emitted from the ground contributes to the surrounding atmospheric volume.
For each atmospheric cell, the engine integrates contributions from the geographical distribution of artificial light sources.
The calculation considers the distance between emitter and atmospheric cell, the distribution of upward emission, atmospheric density along the path, and the attenuation experienced before the light reaches its destination.
Scattering is evaluated using molecular and aerosol coefficients.
This produces the first-order atmospheric illumination field, describing light contributed by the original ground emissions.
The spatial extent of the sources is important. A major metropolitan area contains a large, distributed population of emitters, and its combined contribution to the surrounding atmosphere can extend over considerable distances.
APEX accumulates these contributions within the atmospheric volume, preserving their geographical relationship to the observer.
Rayleigh scattering
Rayleigh scattering describes the interaction of electromagnetic radiation with particles much smaller than its wavelength, principally atmospheric molecules.
Its scattering strength varies approximately with the inverse fourth power of wavelength, making shorter wavelengths considerably more susceptible to scattering than longer ones.
The angular distribution follows the familiar Rayleigh phase function, with scattering favoured in the forward and backward directions relative to perpendicular directions.
APEX represents molecular scattering using an altitude-dependent density profile and the corresponding scattering behaviour.
This component contributes to the redistribution of artificial light throughout the atmosphere, particularly along paths that extend above the more aerosol-rich lower layers.
Mie scattering and aerosols
Atmospheric aerosols introduce a different scattering regime.
Their sizes may be comparable to or larger than visible wavelengths, producing scattering that is often strongly concentrated in the forward direction.
This has a significant influence on artificial skyglow, particularly near the horizon, where light may travel long distances through aerosol-rich air.
APEX uses a Henyey–Greenstein phase function to approximate the angular behaviour of aerosol scattering. Its asymmetry parameter controls the degree of forward scattering.
The renderer also applies a separate aerosol density profile, typically more concentrated near the ground than the molecular atmosphere.
Together, these properties allow the simulator to represent some of the characteristic effects of haze and atmospheric pollution on distant light domes.
Actual aerosol scattering depends on particle size, composition, concentration and wavelength. The Henyey–Greenstein formulation provides a computationally efficient approximation suitable for the renderer's atmospheric model.
4. Optical depth and atmospheric extinction
Scattering increases the amount of light arriving from some directions while reducing the light continuing along others.
APEX accounts for this attenuation through optical depth.
Optical depth represents the accumulated extinction along a path through the atmosphere. The corresponding transmission can be expressed as:
where T is transmission and τ is the integrated optical depth.
The engine evaluates atmospheric transmission along relevant light paths, accounting for their length and the variation in molecular and aerosol density.
This is particularly important when modelling distant sources.
A light source 100 kilometres away is observed through a substantially different atmospheric path from a source 10 kilometres away. The longer path generally encounters more scattering material, and the light reaching the observer has undergone greater attenuation and redistribution.
The geometry becomes especially important near the horizon, where viewing rays pass through extended regions of the lower atmosphere.
APEX incorporates these transmission calculations into both the atmospheric illumination field and the final view integration.
5. Approximating multiple scattering
A single scattering event cannot explain every feature of artificial skyglow.
Light initially scattered from ground emissions may encounter additional molecules or aerosol particles and be redirected again before reaching the observer. Under sufficiently hazy conditions, these higher-order contributions can influence the brightness and spatial extent of the illuminated atmosphere.
APEX approximates multiple scattering through a sequence of GPU compute passes.
Following the initial calculation of direct source contributions, the engine propagates light through neighbouring atmospheric cells. These iterative passes estimate additional redistribution of energy within the volume.
A subsequent longer-range scattering calculation accounts for contributions that extend beyond the immediate neighbourhood of each cell.
The results are accumulated into a precomputed atmospheric light field.
This approach preserves a useful representation of higher-order illumination without requiring the renderer to calculate every possible sequence of scattering events.
The approximation has limitations, particularly in optically dense conditions or where highly anisotropic scattering dominates. It nevertheless provides a practical basis for modelling extended skyglow in real time.
6. Precomputation and GPU rendering
The primary performance advantage of APEX comes from separating atmospheric propagation from the final sky rendering.
Calculating every visible sky direction independently against every ground emitter would require an enormous amount of repeated work.
Instead, APEX performs the source integration and scattering calculations in advance, storing the resulting illumination and directional information in a three-dimensional field.
The rendering stage can then reuse this field for different views of the same atmosphere.
The process is organised into several stages:
- Source preparation: retrieve and prepare the local VIIRS-derived emission field.
- Atmospheric construction: initialise the voxel volume using molecular and aerosol density profiles.
- First-order transport: calculate the contribution of ground emissions to the atmospheric cells.
- Higher-order scattering: propagate and accumulate additional scattered illumination.
- View integration: trace rays through the completed atmospheric field to calculate the observer's sky.
- Display composition: combine the calculated artificial skyglow with terrain, astronomical context and the selected visualisation settings.
These operations are implemented using GPU-accelerated compute and rendering methods.
The atmospheric volume requires a substantial initial calculation, after which the view can be explored interactively. The amount of work depends on the selected resolution, geographical source distribution and capabilities of the user's hardware.
Rendering the observer's sky
During the final rendering stage, APEX determines the viewing direction associated with each pixel in the selected projection.
It then traces that direction through the atmospheric volume, sampling the precomputed light field at successive points along the ray.
The sampled contributions are integrated along the path, with appropriate attenuation between the scattering location and the observer.
The resulting radiance describes the estimated artificial skyglow arriving from that direction.
Because the same atmospheric volume can be sampled repeatedly, the viewer can look around, change the projection and examine different parts of the sky without rebuilding the complete scattering solution for every frame.
The process is commonly called volumetric raymarching.
It is used extensively in scientific visualisation and computer graphics to render participating media such as fog, clouds and atmospheric haze.
In APEX, the underlying illumination is derived from geographically distributed satellite observations and a physical scattering model.
7. Earth curvature and distant light domes
The curvature of the Earth affects the geometry of long-range skyglow.
Over distances of tens or hundreds of kilometres, the ground surface departs significantly from the observer's local tangent plane. This changes the relationship between distant emitters, illuminated atmospheric regions and the visible horizon.
A distant city's ground-level emissions may lie below the geometric horizon while portions of the atmosphere illuminated by that city remain visible.
This is one reason large urban regions can produce low, extended glow domes that remain detectable from considerable distances.
APEX incorporates Earth-curvature-aware geometry into its atmospheric path calculations.
The model also includes parameterised treatment of low-altitude dominance, vertical falloff and distant-dome structure, helping represent the characteristic compression and flattening of skyglow near the horizon.
These parameters are part of the renderer's approximate treatment of a complex physical problem. Their purpose is to produce plausible directional behaviour within the limits of an interactive solver.
8. Terrain and local horizon geometry
Elevation can substantially alter the apparent distribution of skyglow.
An observing site surrounded by mountains may have a relatively unobstructed zenith while being shielded from artificial lighting in neighbouring valleys. Conversely, an elevated site may have a clear view of distant urban regions that would be hidden from lower ground.
APEX uses digital elevation model (DEM) data to construct a local horizon profile around the observer.
The renderer samples surrounding terrain and calculates the maximum apparent elevation of the landscape in 720 azimuthal bins, providing an angular sampling interval of half a degree.
This profile is used to determine which portions of the simulated sky are hidden by the local topography.
The horizon calculation takes the observer's geographical position and elevation into account, allowing the skyline to change as the selected location moves.
Terrain shielding in the wider DarkSkySites system
Terrain is also considered within the global DarkSkySites propagation system.
LUMIX, the engine responsible for the global light pollution map, incorporates Fast Terrain Occlusion (FTO) to approximate the shielding of relevant propagation paths by intervening topography.
This addresses terrain effects during the geographical propagation calculation.
APEX's DEM-derived horizon profile performs a related but distinct function in the sky renderer, determining the visible local skyline.
The distinction matters for light scattered above a mountain range. The mountain may block a direct view of the city, while higher atmospheric layers illuminated by that city remain visible above the ridge.
Terrain screening and atmospheric scattering therefore need to be interpreted together.
9. Sky projections and directional brightness
APEX supports several ways of examining the calculated sky.
All projections use the same underlying atmospheric field, with different mappings between image coordinates and viewing directions.
Perspective view
The first-person perspective presents the sky from the selected observing position.
The viewer can rotate through the horizon and examine the estimated glow in different compass directions. Terrain, cardinal bearings and elevation indicators provide geographical context.
This view is particularly useful when investigating individual urban light domes or determining which horizon directions are likely to be affected at a proposed observing site.
Fisheye projection
The fisheye view displays the visible celestial hemisphere in a circular all-sky image.
The zenith appears at the centre, with the horizon around the circumference.
This provides an immediate overview of the directional distribution of skyglow. Brightness structures that may be difficult to compare in a perspective view become easier to examine when the complete sky is presented together.
Hammer–Aitoff projection
The Hammer–Aitoff projection provides an equal-area representation of the sky, allowing the complete azimuthal distribution to be examined in a single continuous image.
It is useful for comparing observing locations, generating analytical sky charts and studying extended glow structures across the horizon.
Altitude and azimuth
Every direction in APEX can be described by two angular coordinates.
Azimuth gives the compass bearing, measured around the horizon.
Altitude gives the elevation above the horizon, from 0° at the horizon to 90° at the zenith.
This makes it possible to estimate artificial sky brightness towards a specific astronomical target rather than relying exclusively on an overhead SQM reading.
For example, an observer planning to image a galaxy can examine the predicted background brightness as the target rises, approaches culmination and descends towards the opposite horizon.
The same approach can be used to investigate the passage of the Milky Way through areas affected by regional light pollution.
APEX's directional evaluation capabilities also form the basis of the advanced DarkSkySites API, which can calculate selected viewing directions from a shared atmospheric field without generating a complete sky image.
10. SQM, visual appearance and analytical rendering
The artificial skyglow field represents the modelled contribution of human lighting to the atmosphere.
To produce an intelligible night-sky image, APEX combines this information with a representation of the natural astronomical background.
This includes a procedural star field, the Milky Way and natural sky brightness. Star visibility and background presentation are informed by the site's estimated sky quality.
Sky Quality Meter readings are expressed in magnitudes per square arcsecond, with higher values indicating darker skies.
The DarkSkySites platform uses empirical SQM observations through its Local Light Field Calibration (LLFC) framework to evaluate and refine the underlying global brightness model.
This calibration provides an important reference for the brightness estimates used across the system, although directional skyglow remains subject to additional uncertainty in the local atmospheric simulation.
Visual and analytical modes
APEX provides controls for examining both the appearance and calculated structure of the sky.
Natural-colour rendering offers an intuitive representation of how artificial light may affect the observer's view.
Analytical and enhanced-contrast modes make weaker atmospheric structures easier to distinguish, including faint glow extending above the horizon or overlapping contributions from several distant sources.
Exposure, gamma and glow amplification affect the displayed image. They should be understood as visualisation controls, particularly when the goal is to reveal low-contrast structure.
An amplified image may expose physically calculated variations in radiance that would be difficult to perceive with the unaided eye.
The brightness seen on a monitor also depends on display calibration, ambient light, tone mapping and viewing conditions.
For quantitative comparisons, numerical brightness estimates provide a more reliable reference than screen appearance alone.
11. Atmospheric data and ongoing calibration
The accuracy of a skyglow simulation depends heavily on the atmospheric conditions represented by its model.
Molecular density is relatively predictable, but aerosols vary considerably across locations and over time.
DarkSkySites integrates atmospheric information from the Copernicus Atmosphere Monitoring Service (CAMS), including aerosol-loading data that can inform the propagation model.
Within the wider LUMIX processing system, updated aerosol conditions can be used to adjust model parameters and selectively regenerate affected geographical regions.
This allows atmospheric changes to be incorporated into the global brightness model without always recomputing the entire planet.
APEX draws on the same broader scientific framework, although an individual browser simulation remains an approximation based on the dataset and atmospheric configuration being evaluated.
The platform's LLFC system provides a complementary empirical reference, comparing predicted sky brightness with ground-based observations.
Together, these mechanisms support continued refinement of the relationship between satellite-observed emissions, atmospheric propagation and observed sky conditions.
12. How APEX differs from conventional light pollution visualisations
Many light pollution maps display a geographically distributed brightness estimate, usually as a coloured overlay.
The underlying calculations vary considerably between services. Some models employ rigorous physically derived propagation functions, while simpler implementations use fixed convolution kernels to distribute brightness around satellite-observed sources.
These methods can produce useful estimates of regional sky brightness, but a two-dimensional map does not contain enough information to reproduce the appearance of an illuminated atmospheric volume from every observing location.
APEX calculates a local atmospheric field from the distribution of ground emissions and evaluates it from the observer's position.
This allows several effects to emerge from the model:
- Distant cities produce light domes whose apparent elevation and extent depend on distance, scattering conditions and Earth curvature.
- Nearby sources can contribute to brightness over a wider range of sky altitudes.
- Large urban regions create extended atmospheric illumination through the combined contribution of their many emitters.
- Molecular and aerosol density profiles influence how light is distributed vertically.
- Terrain changes the visible skyline and can obscure portions of the atmospheric glow.
- The position of the observer determines the apparent bearing and structure of each source's contribution.
A useful consequence is that two observing sites with similar zenith SQM values may have markedly different directional skyglow.
APEX makes these differences accessible through an interactive representation of the entire sky.
13. Practical applications
The simulator was developed primarily for observational astronomy, although the underlying directional modelling has broader uses.
Selecting an observing site
Dark-sky locations are often assessed using zenith brightness alone.
APEX allows observers to examine the complete horizon, identifying directions affected by urban light domes, distant settlements or industrial illumination.
This is especially valuable when comparing sites with similar map-based brightness classifications.
Planning astrophotography targets
The direction and altitude of an object can substantially affect image quality.
APEX can help identify parts of the sky where artificial background brightness is predicted to be lower, making it useful for selecting targets, planning observing windows and assessing the likely effect of nearby cities.
Directional SQM evaluation can also support software that calculates target positions throughout the night.
Assessing terrain protection
Mountains and ridgelines can provide useful shielding from nearby artificial lighting.
By combining the atmospheric model with local elevation data, the simulator allows observers to investigate how different sites within the same region may benefit from surrounding terrain.
Studying the distribution of skyglow
The analytical projections are useful for examining the geographical structure of artificial light pollution.
Urban light domes, overlapping sources and differences between observing locations can be compared visually.
Combined with historical satellite datasets and the wider DarkSkySites modelling system, these tools can assist investigations into the changing distribution of artificial light.
Education and public communication
Skyglow is difficult to explain using a conventional map because the physical effect occurs throughout the atmosphere.
APEX provides a visual means of examining how ground emissions interact with air, distance and geography, making it useful for demonstrating the consequences of artificial lighting to audiences unfamiliar with atmospheric optics.
14. Limitations and interpretation
APEX is a physically based approximation of atmospheric light transport. Its calculations are designed to be useful and computationally practical, but they cannot reproduce every condition affecting the real night sky.
Several limitations should be considered when interpreting the results.
Satellite observations. VIIRS measures upward radiance within its instrument's spectral response. It cannot directly establish the complete spectral and angular emission characteristics of ground lighting. Changes in lamp technology and shielding can therefore affect actual skyglow in ways that are imperfectly represented by the satellite data.
Atmospheric variability. Aerosol loading, humidity, haze and local weather can change rapidly. The model's parameterised atmosphere will not necessarily reproduce conditions on a particular night.
Higher-order scattering. APEX approximates multiple scattering through iterative propagation and accumulated light fields. These calculations do not constitute a complete solution of the radiative transfer equation.
Terrain resolution. The accuracy of the horizon depends on the available elevation data. Buildings, trees and small geographical features may not be resolved.
Natural sky brightness. Airglow, lunar illumination, zodiacal light and other natural sources can influence observations. Their appearance may vary independently of the artificial-light calculations.
Visual perception. Human night vision depends on dark adaptation, contrast, colour sensitivity and individual observing conditions. A display cannot reproduce these properties exactly.
Local lighting. Nearby lamps, vehicles, illuminated buildings and other sources below the resolution of the satellite-derived emission field may have a substantial effect on an observer's experience.
The simulation is consequently best used for comparative analysis, directional planning and understanding the general structure of artificial skyglow.
It should not be interpreted as a guaranteed prediction of the exact appearance or measured brightness of the sky on a particular night.
15. APEX within the DarkSkySites platform
APEX is one part of the wider DarkSkySites atmospheric modelling system.
The platform brings together several complementary components.
LUMIX calculates the geographical propagation of artificial light, producing the global sky-brightness datasets used by the map.
LLFC provides an empirical calibration framework, allowing observations from SQM instruments to constrain and improve the model.
APEX uses satellite-derived emission data and volumetric atmospheric calculations to evaluate the directional distribution of skyglow from selected observing locations.
The shared data infrastructure manages NASA satellite observations, processed radiance datasets, terrain information, atmospheric parameters and historical model versions.
These results are made available through the interactive map, sky simulator and developer API.
The benefit of this architecture is consistency. Geographical brightness estimates, directional sky simulations and ground-based measurements can be examined within a common modelling framework.
The system continues to evolve as the numerical methods are refined, additional measurements become available and new atmospheric datasets are incorporated.
Our ongoing work focuses on improving the relationship between modelled and observed sky brightness, particularly the behaviour of extended urban sources, aerosol-dependent scattering and terrain-related effects.
The aim is to provide increasingly useful predictions of artificial skyglow while keeping the underlying calculations accessible, reproducible and open to empirical testing.
Explore the simulator
The APEX simulator is available from observing locations on the DarkSkySites map.
Select a location, allow the atmospheric field to calculate, and choose a projection to explore the predicted skyglow.
For site comparisons, the fisheye and Hammer–Aitoff projections provide a useful overview. Perspective mode is better suited to examining individual horizon directions and the apparent structure of distant light domes.
Technical glossary
VIIRS: Visible Infrared Imaging Radiometer Suite. A satellite instrument used by DarkSkySites to obtain night-time radiance observations.
Radiance: Radiant power measured per unit projected area and solid angle, with wavelength dependence included when expressed spectrally.
Skyglow: Diffuse illumination of the night sky produced when natural or artificial light is scattered through the atmosphere.
Voxel: A three-dimensional grid cell representing a small region of the modelled atmosphere.
Radiative transfer: The physical description of how radiation travels through, is absorbed by and is scattered within a medium.
Rayleigh scattering: The scattering of light by particles much smaller than its wavelength, particularly atmospheric molecules.
Mie scattering: The scattering of electromagnetic radiation by particles of sizes comparable to or larger than the wavelength, including atmospheric aerosols.
Phase function: A mathematical description of the probability that light will scatter through a particular angle.
Henyey–Greenstein function: A parameterised scattering phase function commonly used to approximate the angular behaviour of aerosol scattering.
Optical depth: The integrated attenuation coefficient along a light path through the atmosphere.
Extinction: The reduction of radiance along a path through scattering and absorption.
Multiple scattering: The contribution of light that has undergone more than one scattering event.
Raymarching: A numerical rendering method that samples successive points along a viewing ray through a volumetric field.
DEM: Digital Elevation Model. Geographical elevation data used to calculate terrain geometry and observer horizon profiles.
SQM: Sky Quality Meter. An instrument used to measure night-sky brightness, conventionally expressed in magnitudes per square arcsecond.
Scientific foundations
The atmospheric modelling methods used by DarkSkySites draw on established research in light pollution propagation, radiative transfer and numerical atmospheric optics.
Relevant foundations include:
- Garstang, R. H. (1986). Model for artificial night-sky illumination.
- Falchi, F. et al. (2016). The new world atlas of artificial night sky brightness.
- NASA VIIRS night-time lights products
- Copernicus Atmosphere Monitoring Service (CAMS)
The APEX renderer is independently developed as part of DarkSkySites. Its numerical methods and calibration procedures remain under active development.