<p>The choice of various tristimulus color spaces or spectral rendering matters when you're doing <em>multiplicative</em> color operations, like multiplying a light source color by a material reflectance. For these operations, the spectral approach is most accurate, and multiplying tristimulus color values is a pretty coarse approximation (and also depends a lot on the color space).</p>
<p>However, for <em>linear</em> color operations like adding, scaling, and averaging it shouldn't matter which color space you're in or whether you do it on the full spectrum or not. The operations of converting between color spaces, or reducing a spectrum to a tristimulus color space like XYZ, are all linear operations, so they distribute over linear color operations.</p>
<p>In other words, averaging a bunch of spectra and then converting to XYZ should give the exact same results (up to numerical precision) as converting all the spectra to XYZ and then averaging.</p>

CC BY-SA 4.0
2021-06-30T22:35:15.947Z
Nice answer! Just to add my two cents: The "correct" way to multiply colors is to calculate the product of two colors at enough distinct wavelengths (usually much more then 3) so as to generate an accurate result, where as adding and averaging tristimulus produce accurate results due to Grassmann's law.
pmw1234
CC BY-SA 4.0
2021-06-28T18:10:38.067Z
2021-06-28T18:10:38.067Z
Nathan Reed
<blockquote>
<p>How accurate it is to estimate rendering equation using wavelengths</p>
</blockquote>
<p>This is probably as accurate as it gets if you are using with the full form of Fresnel equation.</p>
<blockquote>
<p>then convert result to CIE XYZ</p>
</blockquote>
<p>This brings in two problems with respect to accuracy.</p>
<p>If the spectral distribution of your illuminant is different from the one that is used by CIE, you would need to interpolate your illuminant's spd to that of CIE. This would probably give you a consistent result whether you average it over time or not, but your values would not be accurate due to the interpolation.</p>
<p>If you are going to use the same spd for illuminants, then your accuracy depend on how you generate the wavelength. If you are sending wavelengths in same order at all times to your spectral distribution function, the final spectral curve would be the same at all times and converting that to XYZ and averaging it over time etc should not make much of a difference. However if you are generating wavelengths at random as it is mostly the case for reproducing real illuminant behavior, then your XYZ values might have slight variations due to variation of incoming wavelength over time. I am not sure if these variations are visually noticable though.</p>
<blockquote>
<p>to accumulate samples temporally by averaging them over time</p>
</blockquote>
<p>If you are using the same wavelength order, or anything that ensures that the spectral curve would be same at each time or that the spectral curve upon average would be the same, then it should be okay I guess.</p>

CC BY-SA 4.0
2021-06-28T09:26:55.440Z
2021-06-28T09:26:55.440Z
Kaan E.
<p>How accurate it is to estimate rendering equation using wavelengths and then convert result to CIE XYZ to accumulate samples temporally by averaging them over time?</p>

<colorspace><spectral>
Does CIE XYZ preserve spectral accuracy when used for progressive rendering?
Ocelot
# Does CIE XYZ preserve spectral accuracy when used for progressive rendering?

(Asked by: username_0 on 2021-06-27)

How accurate it is to estimate rendering equation using wavelengths and then convert result to CIE XYZ to accumulate samples temporally by averaging them over time?

**Tags:** colorspace, spectral


---

## 2 answers

### Answer by username_1 on 2021-06-28. Score: 3 | Accepted answer

The choice of various tristimulus color spaces or spectral rendering matters when you're doing *multiplicative* color operations, like multiplying a light source color by a material reflectance. For these operations, the spectral approach is most accurate, and multiplying tristimulus color values is a pretty coarse approximation (and also depends a lot on the color space).

However, for *linear* color operations like adding, scaling, and averaging it shouldn't matter which color space you're in or whether you do it on the full spectrum or not. The operations of converting between color spaces, or reducing a spectrum to a tristimulus color space like XYZ, are all linear operations, so they distribute over linear color operations.

In other words, averaging a bunch of spectra and then converting to XYZ should give the exact same results (up to numerical precision) as converting all the spectra to XYZ and then averaging.

> **Comments:**
> **username_2**: Nice answer! Just to add my two cents: The "correct" way to multiply colors is to calculate the product of two colors at enough distinct wavelengths (usually much more then 3) so as to generate an accurate result, where as adding and averaging tristimulus produce accurate results due to Grassmann's law.  

---

### Answer by username_3 on 2021-06-28. Score: 2

> How accurate it is to estimate rendering equation using wavelengths

This is probably as accurate as it gets if you are using with the full form of Fresnel equation.

> then convert result to CIE XYZ

This brings in two problems with respect to accuracy.

If the spectral distribution of your illuminant is different from the one that is used by CIE, you would need to interpolate your illuminant's spd to that of CIE. This would probably give you a consistent result whether you average it over time or not, but your values would not be accurate due to the interpolation.

If you are going to use the same spd for illuminants, then your accuracy depend on how you generate the wavelength. If you are sending wavelengths in same order at all times to your spectral distribution function, the final spectral curve would be the same at all times and converting that to XYZ and averaging it over time etc should not make much of a difference. However if you are generating wavelengths at random as it is mostly the case for reproducing real illuminant behavior, then your XYZ values might have slight variations due to variation of incoming wavelength over time. I am not sure if these variations are visually noticable though.

> to accumulate samples temporally by averaging them over time

If you are using the same wavelength order, or anything that ensures that the spectral curve would be same at each time or that the spectral curve upon average would be the same, then it should be okay I guess.


---

