Spectral Primaries

High-Level Motivation and Context

3D models have reflectances, typically stored as sRGB textures. For example, consider a sRGB diffuse albedo: when illuminated under a white environment light, the sRGB color rendered onto the screen must be exactly the sRGB albedo. In a spectral renderer, which traces individual wavelengths, the sRGB albedo must be "upsampled" to a reflectance spectrum before the light is reflected.

Doing this without introducing color shifts was considered to be a hard problem (indeed, until [Jakob and Hanika 2019] scooped our work by a month or two, it was thought impossible). However, we show that the difficulty is largely due to incorrectly using Illuminant E instead of Standard Illuminant D65. In-fact, when the correct illuminant is used, sRGB can be upsampled using nothing more than a linear combination of three basis spectra.

Compared to [Jakob and Hanika 2019], our work is much simpler to implement and requires no preprocess or additional texture memory. However, it pays for those advantages with additional constant memory and pretty-bad-quality spectra. As an algorithm, our work has complementary features to [Jakob and Hanika 2019]: each approach has features and deficiencies corresponding mostly to the deficiencies and features of the other. However, we see our work as more a theoretical note on spectral bases and spectral upsampling than a production algorithm.

Additionally, we provide a complete reference implementation.


Spectral Primary Decomposition for Rendering with sRGB Reflectance

Ian Mallett ,   Cem Yuksel

EGSR '19 Proceedings of the 30th Eurographics Symposium on Rendering, 2019


Spectral Primaries basis. A linear combination of these three spectra can reproduce any sRGB triple when illuminated with D65.

Abstract

Spectral renderers, as-compared to RGB renderers, are able to simulate light transport that is closer to reality, capturing light behavior that is impossible to simulate with any three-primary decomposition. However, spectral rendering requires spectral scene data (e.g. textures and material properties), which is not widely available, severely limiting the practicality of spectral rendering. Unfortunately, producing a physically valid reflectance spectrum from a given sRGB triple has been a challenging problem, and indeed until very recently constructing a spectrum without colorimetric round-trip error was thought to be impossible. In this paper, we introduce a new procedure for efficiently generating a reflectance spectrum from any given sRGB input data. We show for the first time that it is possible to create any sRGB reflectance spectrum as a linear combination of three separate spectra, each directly corresponding to one of the BT.709 primaries. Our approach produces consistent results, such that the input sRGB value is perfectly reproduced by the corresponding reflectance spectrum under D65 illumination, bounded only by Monte Carlo and numerical error. We provide a complete implementation, including precomputed spectral bases, and discuss important optimizations and generalization to other RGB spaces.

Resources

Preprint
Slides
Supplemental Materials
Primaries Visualization (included in supplemental materials)