Inferno Creative Studio

Chapter summaries · The Complete Guide to Photorealism

06: Daylight

Reading guide to Chapter 6. One light source, and the filter that makes it interesting.

Reading: Eran Dinur, The Complete Guide to Photorealism for Visual Effects, Visualization and Games (Focal Press, 2022), Chapter 6, pages 69-81. This page is a guide to that chapter, not a substitute for it.

The premise

The premise

Earth is lit by one source, a G2V yellow dwarf 93 million miles away. That light is constant and unchanging. Everything varied about daylight - every sunset, every overcast afternoon, every blue distance - is produced by a thin layer of gas that emits nothing at all.

The atmosphere is a diffuser, a reflector and a filter working at once. Dinur's argument is that understanding the interaction between those two components is the key to plausible outdoor lighting.

↑ Contents

The sun

The sun

A sphere of plasma about 860,000 miles across, radiating in all directions like any other bulb. What makes it unique as a light source is distance.

Because we are so far away and so small relative to that distance, we receive an extremely narrow slice of the sun's output. The rays are not exactly parallel - the sun is enormous, so some arrive at slightly converging or diverging angles - but the deviation is under half a degree. For all practical and visual purposes, sunlight is parallel. Direct sunlight strikes every object in a view at the same angle, and its shadows are always parallel. Nothing else you will ever light with behaves like that.

The inverse-square law still applies to the sun as it does to any light. Mercury receives far more radiation than Mars, and the equator receives more than the poles. But over the distances a camera works across, the falloff is imperceptible: on a clear dry day there is no perceivable difference in sunlight intensity between an object beside the camera and one five miles away. The atmosphere does something over that distance, but the decay does not.

↑ Contents

What sunlight looks like unfiltered

What sunlight looks like unfiltered

To see raw sunlight you have to leave the atmosphere. Dinur points out how recent that view is: the first grainy photograph from space was taken on 24 October 1946, from a camera on a V2 rocket. Before that nobody had seen bright sunlight in a pitch black sky, or a knife-sharp horizon with no depth to it.

What seventy years of space photography shows:

  • Sunlight is white. The sun radiates across the spectrum, so unfiltered it is white, not the yellow or orange we experience on the ground.
  • Shadows are truly black where nothing bounces into them. With no scattered light, an occluded area is lit only by reflection from nearby surfaces. In the Apollo photographs the astronaut's shadow on the lunar ground is pitch black, while the occluded parts of his suit are relatively bright - because the ground bounces light up onto the suit, and there is nothing above the surface to bounce light back down into the ground shadow.
  • Contrast is extreme, shadows are sharp and well defined, and the light is consistent day in and day out.
  • Sunsets are dull - a plain transition from full illumination to darkness as the sun drops behind the horizon.
  • There are no distance cues. The horizon is always clear and hard-edged, which is what makes the moon photographs feel like a studio shot against a black screen.

↑ Contents

The atmosphere

The atmosphere

Mostly nitrogen and oxygen, about 1% argon, small traces of carbon dioxide, helium and methane, plus water vapour ranging from almost nothing in dry regions to about 5% in humid tropics. About three quarters of its mass sits in the first 6.8 miles, thinning gradually over several hundred more, so there is no precise height. Near the surface it also carries dust, pollen and particles from pollution.

Air molecules are far apart, but the layer is thick enough that collisions between molecules and photons are very likely. When a sunlight photon enters, three outcomes are possible - the same three as the previous chapter:

  • It is absorbed or reflected by atmospheric elements and never reaches the ground.
  • It passes through and arrives as direct sunlight.
  • It is scattered by air molecules or larger particles and arrives as multi-directional scattered light.

Daylight is the combination of all three.

Reflection and absorption

A little under half the sun's radiation never reaches the ground. Roughly a quarter is reflected back into space and about a fifth absorbed - most of that absorption in the ozone layer, affecting mostly ultraviolet, which is outside the visible range anyway.

Water droplets in clouds are highly reflective, and thick cloud reflects a lot of sunlight. This is why flying under a cloudy sky shows such a strong difference between the dim, attenuated light on the ground and the bright light above the clouds, augmented by the cloud layer acting as a reflector. Even the heaviest storm clouds are white seen from above; they look dark from below because most of the light has already been scattered and reflected in their upper reaches.

Dust, smoke and pollution reduce brightness further. And attenuation depends heavily on the sun's position. At the zenith, sunlight travels through the least atmosphere. Low on the horizon it travels a much longer path - which is why attenuation is so much stronger at sunrise and sunset, strong enough that when the sun is low you can look at it directly without harm.

↑ Contents

Atmospheric scattering

Atmospheric scattering

Scattering happens when a photon collides with a molecule or particle and is redirected while keeping most of its energy. Scattered light propagates widely with little attenuation and reaches the ground from every direction, zenith to horizon.

The effect is that the atmosphere becomes a giant diffuser - Dinur's word is softbox - turning direct sunlight into multi-directional diffused light. The result is called diffuse sky radiation, or just skylight. He flags that the second term is half accurate: the light does come from the sky, but the sky is not a source. It only propagates the sun's light. This is the same point he made about "ambient light" in the previous chapter.

Rayleigh scattering

The most transformative effect the atmosphere has. It happens when photons hit air molecules - mostly nitrogen and oxygen - that are smaller than the light's wavelength.

Rayleigh scattering is wavelength-dependent, affecting shorter wavelengths much more than longer ones. Blue and violet scatter considerably more than red and yellow. Two consequences follow:

  • The clear sky is blue, and diffuse sky radiation carries a bluish tint.
  • Because blue and violet have been stripped out of the direct beam, direct sunlight tints toward yellow.

At sunrise and sunset the light passes through far more atmosphere, so more short wavelengths are removed and the sunlight tints further toward orange and red.

Mie scattering

Mie scattering

Happens when photons hit particles larger than the wavelength - usually water droplets in humid air and clouds, but also dust, smoke and pollution.

The crucial difference: Mie scattering is not wavelength-dependent. All frequencies scatter equally, so sunlight color is unchanged in the process. Its perceived color is simply whatever color the sunlight already is. With the sun at the zenith, sunlight is near white, so clouds are white - or gray where attenuation happens. As the sun drops and Rayleigh scattering shifts sunlight toward orange and red, Mie scattering carries that color into clouds, humidity, dust and pollution.

Because water and dust particles sit mostly in the lowest layers, Mie scattering is far more visible at the horizon than at the zenith. In general the horizon appears brighter and more desaturated, but the color shift and the rate of gradation from zenith to horizon vary drastically - pale blue, white or gray at midday, yellow through orange to red at sunset.

The detail worth remembering: the air itself stays blue during sunset. It is the additional elements - clouds, humidity, dust, pollution - that turn red and produce a flaming sky. Some of the most spectacular sunsets happen when there are a lot of particles in the air.

Volumetric light

Volumetric light

A CG term covering any scenario where light beams are distinctly visible because of scattering: crepuscular rays (sun beams, god rays), shafts through a window, spotlight beams on a stage.

Two ingredients are required. Enough particles - humidity, fog, smoke, dust - and an obstacle that creates sharp separation between light and shadow. Slits in a blind, a pattern in a curtain, a crack in a wall, or for crepuscular rays a cloud formation with small well-defined gaps. It is that sharp contrast that makes scattered light read as distinct rays rather than a general glow.

Volumetric rays normally spread out from the source. The exceptions are laser beams and sunlight. God rays are actually parallel and only appear to fan out from a point because of perspective, the same way railway tracks converge.

↑ Contents

Aerial perspective

Aerial perspective

Dinur suggests, half seriously, that moon-landing conspiracy theories were partly fueled by the fact that in the Apollo photographs everything from nearby rocks to distant mountains appears equally close. The lack of atmospheric depth makes them look staged.

Aerial perspective is the usual term for atmospheric depth, and it is slightly misleading, because air is not the only factor.

The key idea: the atmosphere does not just sit above us, it engulfs us. Every interaction described so far affects not only incoming sunlight but the reflected light traveling from an object to the camera. On a clear dry day, light reflected from something 50 feet away does not pass through enough atmosphere to be affected, and the air reads as completely transparent. Light from something 5 miles away passes through 500 times more atmospheric volume - features soften, contrast and saturation drop, and the blacks lift.

He also corrects a common phrase. "Haze" technically refers only to dust and pollution, not air or humidity. The bluish hills on a hazy summer afternoon are mostly Rayleigh scattering from air molecules, not haze at all.

Air

Rayleigh scattering dominates. The further away the object, the more the reflected light scatters. In color terms the object does not get brighter or darker - the blacks are lifted toward the midtones, which reduces contrast and flattens the object, making features harder to distinguish. On a clear dry day with few clouds or aerosols, distant objects take on the classic bluish tint.

The point Dinur emphasizes: brightness is not squashed by clean air. A bright specular reflection on a lake or a metal surface can be just as bright viewed from miles away. It is the low end that is affected with distance, starting with the darkest blacks and creeping into the lower midtones. This is the single most useful sentence in the chapter for anyone grading a composite.

Water droplets

Humidity behaves similarly to air, but because Mie scattering does not tint the light, distant objects on an overcast or foggy day keep their hues while the blacks lift toward neutral gray. In most environments - except very dry deserts or high altitudes - there is some humidity in the lower atmosphere, which desaturates the horizon and shifts the deep blue of distant objects toward a more desaturated cyan or white.

Where air is always subtle, dense water droplets change the scale of aerial perspective dramatically. Heavy fog scatters reflected light so strongly that visibility drops from miles to feet.

Haze

Dry particles: dust, smoke, pollutants. Like fog, heavy haze compresses aerial perspective, but it has a stronger attenuation effect as well - it lifts blacks and reduces contrast, and it also reduces brightness, because light is heavily absorbed as well as scattered.

Haze color depends on the particles. Dust reads brownish-orange; smoke and pollution read gray or bluish. Lighter amounts in the lower atmosphere often form a yellow-gray band at the horizon and attenuate sunlight further when the sun is low.

↑ Contents

Terms from this chapter

  • Diffuse sky radiation / skylight - sunlight scattered by the atmosphere and arriving from all directions.
  • Rayleigh scattering - scattering by particles smaller than the wavelength. Wavelength-dependent. Makes the sky blue and the sun yellow.
  • Mie scattering - scattering by particles larger than the wavelength. Not wavelength-dependent. Colors clouds and haze with whatever color the sunlight already has.
  • Volumetric light - visibly scattered beams. Needs particles plus a sharp light/shadow edge.
  • Crepuscular rays - god rays. Parallel, only appearing to converge through perspective.
  • Aerial perspective - the effect of atmosphere on how distant objects look. Lifts blacks, reduces contrast and saturation, mostly leaves brightness alone.
  • Haze - strictly, the effect of dry particles: dust, smoke, pollution. Not humidity.

↑ Contents

Check yourself

  • Why are sunlight's rays effectively parallel, and what does that do to shadows?
  • What color is sunlight before it enters the atmosphere, and why does it look different on the ground?
  • Explain the blue sky and the yellow sun with the same mechanism.
  • Why are clouds white at midday and orange at sunset, if Mie scattering does not change color?
  • What two things must be present for a light beam to be visible in the air?
  • With distance, which part of the tonal range changes most - blacks, midtones or highlights?
  • Fog and haze both compress depth. What does haze do that fog does not?

↑ Contents