Skip to content

Lens Chromatic Aberration

Brian Wandell edited this page Feb 5, 2021 · 1 revision

Chromatic aberration

The PBRT container represents surfaces and lights at 31 wavelengths between 400 and 700 nm, and this is the wavelength sampling of the calculated retinal irradiance. Because of the high computational cost, we often trace a subset of wavelengths through the lens. Tracing each wavelength sample separately makes the rendering approximately 31 times slower.

It is important to sample enough wavelengths to model chromatic aberration accurately. The index of refraction is a slowly varying function of wavelength, and thus a 450 nm ray follows a very similar path through the lens as, say, a 460 nm ray. Hence, we assume that a certain “band” of wavelengths will follow the same path through the lens.

By rendering a slanted edge through the eye while varying the number of bands, we have found that between 8 to 16 bands are enough to accurately capture chromatic aberration effects at the resolution of the cone mosaic. This seems to be a good rule of thumb for reducing rendering time but still maintaining accurate chromatic aberration effects.

We specify the number wavelengths "bands" used for calculating passage through the lens using

thisR.set('chromatic aberration',val)

If val is true, then chromatic aberration is enabled and measured using 8 bands between 400 and 700nm. If val is a numeric, say 4, then chromatic aberration is evaluated for val bands. To turn off chromatic aberration set val to false. Turning on chromatic aberration slows down the calculation.

Setting the number of wavebands to 0 or 1 uses only 1 waveband, and thus no chromatic aberration. Setting to 2 or more wavebands starts to produce chromatic aberration results.

Once the rays begin interacting with the surfaces and lights, all calculations are interpolated to the 31 wavelength sampling density. Even if we use a small number of bands for the chromatic aberration calculation, we always return 31 wavelength bands in the optical image.

Clone this wiki locally