<p>I have a spectral power distribution (SPD, 5 nm steps) for all light sources in the scene and SPDs for the reflectance of all surfaces under any light / viewer angle in question.</p>

<p>I'm going to calculate in floating point precision and not clamp any values. Except for pathological cases like monochromatic light or special things like dispersion effects, does it make a difference whether I render using the spectrum, XYZ color space or linear RGB color space? Note that I will convert the result to sRGB as a last step in any case.</p>

<p>Specifically, is it invariant at which point (before or after multiplication of surface BRDF with light intensity) I integrate to convert spectrum to XYZ? Does the introduction of reference white in XYZ / RGB distort the colors when working with light sources of a different color / SPD?</p>

CC BY-SA 3.0
2015-11-05T11:37:42.180Z
@Rahul True. I changed the question to reflect that I'm less interested in these kind of contrived cases and more in the usual, real-world (somewhat) continuous spectra.
David Kuri
CC BY-SA 3.0
2015-11-05T12:43:04.497Z
I understand that there are "Effects for which the path of a ray is dependent on its wavelength", and I've explicitly excluded those. I also understand that there are "Colours that the human eye can detect that cannot be displayed in RGB". Since I will end up in sRGB anyway, I can't change that. The question holds: do the intermediate calculations yield the same results _in common cases_ (no sodium lamps, no delta functions, just wide-range-of-frequencies stuff)?
David Kuri
CC BY-SA 3.0
2015-11-05T13:08:26.880Z
There will almost always be a difference in intermediate results when rendering using a three-component color space rather than the full spectrum. The pathological cases presented here just take that difference to an extreme. You say you don't care about sodium lamps, but you do care about wide-range-of-frequencies stuff - this makes this question very vague. Unless we know where your threshold is, we won't be able to answer this question.
Benedikt Bitterli
CC BY-SA 3.0
2015-11-05T13:18:27.120Z
@BenediktBitterli I'd be happy about some mathematical formulation of how to quantify the error, or a detailed description of the sources of error. Is early integration the only source, or does the inclusion of a reference illuminant pose a problem itself?
David Kuri
CC BY-SA 4.0
2018-12-25T22:00:08.073Z
Do you have materials that can change the frequency? i.e. the outgoing radiance at frequency f1 depends on incoming radiance at a *dfferent* frequency f2? Because if you do, reducing the spectrum to 3 values may significantly reduce the quality of that effect.
CygnusX1
CC BY-SA 4.0
2020-05-20T14:34:33.403Z
That's a really good question. So what's the answer? Is there any reference that has comparison between rendered images using xyz and rgb?
ali
CC BY-SA 4.0
2020-05-21T12:08:31.543Z
would this paper help? https://radiance-online.org:447/radiance-workshop1/cd/Ward/PicturePerfect.pdf
ali
<rendering><physically-based><mathematics>
How correct is rendering in XYZ / linear RGB space?
David Kuri
# How correct is rendering in XYZ / linear RGB space?

(Asked by: username_0 on 2015-11-05)

I have a spectral power distribution (SPD, 5 nm steps) for all light sources in the scene and SPDs for the reflectance of all surfaces under any light / viewer angle in question.

I'm going to calculate in floating point precision and not clamp any values. Except for pathological cases like monochromatic light or special things like dispersion effects, does it make a difference whether I render using the spectrum, XYZ color space or linear RGB color space? Note that I will convert the result to sRGB as a last step in any case.

Specifically, is it invariant at which point (before or after multiplication of surface BRDF with light intensity) I integrate to convert spectrum to XYZ? Does the introduction of reference white in XYZ / RGB distort the colors when working with light sources of a different color / SPD?

**Tags:** rendering, physically-based, mathematics

> **Comments:**
> **username_0**: @Rahul True. I changed the question to reflect that I'm less interested in these kind of contrived cases and more in the usual, real-world (somewhat) continuous spectra.  
> **username_0**: I understand that there are "Effects for which the path of a ray is dependent on its wavelength", and I've explicitly excluded those. I also understand that there are "Colours that the human eye can detect that cannot be displayed in RGB". Since I will end up in sRGB anyway, I can't change that. The question holds: do the intermediate calculations yield the same results _in common cases_ (no sodium lamps, no delta functions, just wide-range-of-frequencies stuff)?  
> **username_1**: There will almost always be a difference in intermediate results when rendering using a three-component color space rather than the full spectrum. The pathological cases presented here just take that difference to an extreme. You say you don't care about sodium lamps, but you do care about wide-range-of-frequencies stuff - this makes this question very vague. Unless we know where your threshold is, we won't be able to answer this question.  
> **username_0**: @username_1 I'd be happy about some mathematical formulation of how to quantify the error, or a detailed description of the sources of error. Is early integration the only source, or does the inclusion of a reference illuminant pose a problem itself?  
> **username_2**: Do you have materials that can change the frequency? i.e. the outgoing radiance at frequency f1 depends on incoming radiance at a *dfferent* frequency f2? Because if you do, reducing the spectrum to 3 values may significantly reduce the quality of that effect.  
> **username_3**: That's a really good question. So what's the answer? Is there any reference that has comparison between rendered images using xyz and rgb?  
> **username_3**: would this paper help? https://radiance-online.org:447/radiance-workshop1/cd/Ward/PicturePerfect.pdf  

---

## 0 answers

