Astronomical Radiative Transfer and Video Games:
A Match Made in the Sun
Chris Osborne
University of Glasgow
And how does it connect to this?
Physics!
\begin{align*}
(\hat{\omega} \cdot \nabla) L(\vec{p}, \hat{\omega}) = &-\chi(\vec{p}, \hat{\omega}) L(\vec{p}, \hat{\omega}) \\
&+ \eta(\vec{p}, \hat{\omega}) \\
&+ \sigma_s(\vec{p}, \hat{\omega}) \oint_{\mathbb{S}^2} p(\vec{p}, \hat{\omega}^\prime, \hat{\omega}) L(\vec{p}, \hat{\omega}^\prime)\, d\hat{\omega}^\prime
\end{align*}
This hybrid notation will probably make everyone mad!
- L radiance,
- \eta emission coefficient,
- \chi absorption coefficient,
- \sigma_s scattering coefficient,
- p phase function.
Key takeaway: this is a recursive integro-differential equation!
Non-LTE Radiative Transfer
- Coupling between radiation field and atomic transitions.
- Extremely computationally demanding, but necessary for many spectral lines.
- Also, ionisation.
Most Important Quantities
- Radiative rates depend on intensity.
- Intensity depends on radiative rates.
\begin{align*}
J_\nu(\vec{p}) &= \frac{1}{4\pi}\oint_\mathbb{S^2} I_\nu(\vec{p},\hat{\omega}) \mathop{d \hat{\omega} } \\
&\vec{p} \in \mathbb{R}^2, \hat{\omega} \in \mathbb{S}^2\\
\end{align*}
- Specific intensity and its first moment.
- 3 and 5 dimensional functions! (+ wavelength…)
- Recursive component solved by fixed-point iteration in the atomic populations.
Ray Effects
Desired Result
Tricky Radiation
- In the steady-state solution of radiative transfer coupling is global.
- This hinders parallelisation (and SC imposes its own additional dependencies even within a patch).
- Monte Carlo approaches have poor convergence rates.
- Spectroscopy has very high anisotropy requirements.
- Is there some middle ground?
- Video games are now solving an adjacent problem at reasonable resolutions hundreds of times a second on single workstations…
Radiance Cascades: Observations
- Linear light source and blocker:
\begin{cases}
A < B,\\
\alpha > \beta.
\end{cases}
with some small angles approximations…
\begin{cases}
\Delta_s < F(D) \propto D\quad&\mathrm{(spatial)}\\
\Delta_\omega < G(1/D) \propto 1/D\quad&\mathrm{(angular)}
\end{cases}
- We can exploit this!
- Represent contributions from different shells separately.
How do we use this?
- Encode radiance field as a set of cascades, each describing I_\nu in annuli around \vec{p}.
- If penumbra criterion is satisfied, cascade is linearly interpolateable!
- Serves as Nyquist criterion
- The cascades sparsely encode the radiation field throughout the domain…
- But not in a form we can use directly.
- Solution:
Interpolation. But with minimal error.
- Interpolation leads to reuse of rays in upper cascades and the effective construction of exponentially more rays than computed directly.
Further Optimisations
- GPU-first design (has achieved 40\times perf/Watt vs CPU).
- Use a performance-portability library – no ifs, no buts – especially for small teams.
- We use Kokkos with some additional layers.
- Python pre/postprocessing.
- First solar non-LTE code to exploit atmospheric sparsity.
Mipmaps & Ray Acceleration
- Lower resolution proxies for distant rays: mipmaps (recursive spatial averaging) with directionality and adaptive error bounds (variance of log emissivity and opacity)
![]()
- In practice, upper cascades (longer rays) sample upper MIPs (fewer texels) when variance is low enough.
- Store data in Morton order as much as possible.
- Inspired by OpenVDB.
Outlook
- Performance Portability libraries are a force multiplier for small teams.
- Radiance cascades provide the first meaningful change to solar non-LTE RT in 30 years and it came from outside the field.
- There are equivalent/adjacent problems in other fields, and it’s worth our time to seek them out.
- e.g. radiance cascades can be repurposed for cosmological self-gravity
Thanks!
Christopher.Osborne@glasgow.ac.uk
Paper
Ly β COCOPLOT (Donné & Keppens)
1.5D Comparison – Prominence
1.5D Comparison – Filament