A Journey Through the Atmosphere

This post describes how to model the density of the atmosphere at different altitude. This is a critical step, since the atmospheric density is one of the parameters necessary to correctly calculate the Rayleigh scattering.

You can find all the post in this series here:

You can refer to the Atmospheric Scattering Cheatsheet for a complete reference of all the equations used.

You can download the Unity package for this tutorial at the bottom of the page.

Continue reading

The Mathematics of Rayleigh Scattering

This post introduces the Mathematics of Rayleigh Scattering, which is the optical phenomenon that causes the sky to appear blue. The equations derived in this tutorial will be translated into shader code in the next tutorial.

You can find all the post in this series here:

You can refer to the Atmospheric Scattering Cheatsheet for a complete reference of all the equations used.

You can download the Unity package for this tutorial at the bottom of the page.

Continue reading

The Theory Behind Atmospheric Scattering

This is the second part of the tutorial on volumetric atmospheric scattering. In this post we will start deriving the equations that govern this complex, yet beautiful optical phenomenon.

You can find all the post in this series here:

You can refer to the Atmospheric Scattering Cheatsheet for a complete reference of all the equations used.

You can download the Unity package for this tutorial at the bottom of the page.

Continue reading

Volumetric Atmospheric Scattering

If you have lived long enough on planet Earth, you might have wondered why the sky is usually blue, yet red at sunset. The optical phenomenon which is (mostly) responsible for that is called Rayleigh scattering. This tutorial will explain how to model atmospheric scattering to reproduce many of the visual effects that planets exhibit. And if you want to render physically accurate visuals for alien planets, this is definitely the tutorial you’ve been looking for.

You can find all the post in this series here:

You can refer to the Atmospheric Scattering Cheatsheet for a complete reference of all the equations used.

You can download the Unity package for this tutorial at the bottom of the page.

Continue reading

The Mathematics of Diffraction Grating

This post introduces the mathematics behind the optical phenomenon known as diffraction grating, which is responsible for iridescent reflections in many materials.

You can find the complete series here:

A link to download the Unity project used in this series is also provided at the end of the page.

Continue reading