<blockquote>
<p>When an object is illuminated by the sun, how does the reflected spectrum change? Does each surface has an own reflection spectrum? where each photon &quot;checks&quot; its wavelength and &quot;decides&quot; to reflect or absorb?</p>
</blockquote>
<p>Yes, this is more or less correct. But when dealing with very many photons, striking very many different atoms/molecules mixed together into one material, we observe that some <em>fraction</em>, or percentage if you like, of the photons are reflected. So, the spectrum is made up not of yes-or-no, but that fraction, for each wavelength. This is called the surface's <a href="https://en.wikipedia.org/wiki/Reflectance" rel="nofollow noreferrer">reflectance spectrum</a>. You may also hear “diffuse reflectance” or “albedo”.</p>
<p>(“Diffuse” means the reflection happens at a random angle, usually due to roughness or translucency of the material; its opposite is “specular”, mirror-like reflection. When an object gleams and sparkles, that is specular reflection. Most objects exhibit some of both, and the specular reflectance can have a different color/spectrum than the diffuse — usually whiter.)</p>
<p>Then, as you have thought, we usually consider this only in 3 different wavelengths/bands since that is sufficient to reproduce <em>most</em>, but not all effects that human vision can observe. For an example of phenomena that require more than 3 bands, see <a href="https://en.wikipedia.org/wiki/Color_rendering_index" rel="nofollow noreferrer">color rendering index</a>, a measurement of how well the spectrum of a light source, after interacting with the reflectance spectrum of illuminated objects, simulates broad-spectrum illumination such as sunlight. You cannot simulate this without simulating more components of the spectrum than just RGB. For more examples, see this other question: <a href="https://computergraphics.stackexchange.com/questions/203/are-there-common-materials-that-arent-represented-well-by-rgb">Are there common materials that aren&#39;t represented well by RGB?</a></p>
<blockquote>
<p>Lets imagine having a ray tracer setup with the sun as illumination, a few objects with different colors and a physical simulated camera with 3 color channels, where each color channel has a very small bandwidth of 10nm (see Figure2).</p>
</blockquote>
<p>Computing using the RGB approximation does not generally think about wavelength bands at all — we just pick 3 precise wavelengths for our R, G, and B <a href="https://en.wikipedia.org/wiki/Primary_color" rel="nofollow noreferrer">primaries</a> and express all other colors in terms of mixes of those primaries, which are identical as seen by the (typical) human eye to more complex spectra.</p>
<p>Any such choice of primaries will constrain the <a href="https://en.wikipedia.org/wiki/Gamut" rel="nofollow noreferrer">gamut</a> of colors that can be represented — some highly saturated colors will be excluded, unless the color components are allowed to go negative to express the most extreme monochromatic (or purple) colors. This is usually an acceptable limitation, because RGB monitors are <em>physically</em> limited to emit only specific wavelengths based on the color of their LED emitters, LCD color filters, or CRT phosphors.</p>
<p>(Note that in <em>printed</em> graphics, the situation is more complex because instead of a display device emitting only R+G+B light, we produce an object with its own reflectance spectrum based on the pigments/dyes used. That's why 4-component “CMYK” color is used — it's a better match for the actual behavior of the pigments. In some cases, “spot colors” may be used, identifying a specific pigment to be laid down in a certain area, to produce precise colors or special effects such as shininess.)</p>
<blockquote>
<p>In case the ray is intersecting an object, can I scale the three values by the objects material reflection spectrum with respect to the 3 camera wavelength and bandwidth?</p>
</blockquote>
<p>Yes, you should multiply each wavelength/color-component of the incoming light by the object's reflectance for that color. The bandwidth need not be explicitly modeled — if changing the bandwidth makes any difference, then it is equivalent to changing the choice of primaries, i.e. working in a different <a href="https://en.wikipedia.org/wiki/Color_space" rel="nofollow noreferrer">color space</a>. You can always convert a color from one RGB color space to another (when it is in the gamut of both) with a little bit of arithmetic.</p>
<hr />
<p>Again, all of what I've said above is true <em>when you are working in RGB</em>. This does have limitations; if you want to precisely simulate the effects of monochromatic lights or color filters, you will need to use more color channels than just RGB. The more channels you use, the better your discrete approximation of the continuous spectra in real physics. However, this is rarely done in rendering — most computer graphics you have ever seen in your life were probably only calculated using RGB.</p>

CC BY-SA 4.0
2022-11-11T15:04:47.833Z
thanks a lot! This answer is very detailed, which I very mush like :). I am trying to simulate different physical sensors, e.g. infra red camera as well. So my next step is to store whole material spectra (diffuse and specular) of all wavelength of all materials used in the scenario. After camera settings are read from config file, I'll decode the material spectrum into camera spectrum bands, so that the material will be rendered nearly correct. +1!
Thomas
CC BY-SA 4.0
2022-11-11T15:24:11.533Z
@Thomas Then you may be interested in the field of [multispectral imaging](https://en.wikipedia.org/wiki/Multispectral_imaging) — but I'm not aware of any particular useful links on _simulating_ (rendering) colors beyond RGB. In principle it's just "use color-vectors that have more than 3 components of RGB", but I'm sure there are additional considerations that arise.
Kevin Reid
CC BY-SA 4.0
2022-11-10T20:41:42.383Z
2022-11-24T15:38:15.537Z
2022-11-24T15:38:15.537Z
Kevin Reid
<p>I would like to know how material works with respect to light.</p>
<p>first of all, I've a lightsource e.g. the sun. The sun has a spectrum like figure1</p>
<p><strong>Figure1</strong></p>
<p><a href="https://i.sstatic.net/joLQY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/joLQY.png" alt="enter image description here" /></a></p>
<p>When an object is illuminated by the sun, how does the reflected spectrum change? Does each surface has an own reflection spectrum? where each photon &quot;checks&quot; its wavelength and &quot;decides&quot; to reflect or absorb?</p>
<p>for example a green object would absorb all wavelength except a small bandwidth of green?</p>
<p>Lets do a small example:
Lets imagine having a ray tracer setup with the sun as illumination, a few objects with different colors and a physical simulated camera with 3 color channels, where each color channel has a very small bandwidth of 10nm (see Figure2).</p>
<p><strong>Figure2</strong></p>
<p><a href="https://i.sstatic.net/OpnuC.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OpnuC.png" alt="enter image description here" /></a></p>
<p>Then we can say, that we change the sun spectrum so that only the 10nm bandwidth of the camera channels are stored into 3 watt values. The same with each material reflection spectrum.</p>
<p>Each simulated ray holds the three values of the sun spectrum.
In case the ray is intersecting an object, can I scale the three values by the objects material reflection spectrum with respect to the 3 camera wavelength and bandwidth?</p>
<p>Or did I understand it completely wrong?</p>

<reflection><light>
light spectrum reflection / absorbation?
Thomas
# light spectrum reflection / absorbation?

(Asked by: username_0 on 2022-11-09)

I would like to know how material works with respect to light.

first of all, I've a lightsource e.g. the sun. The sun has a spectrum like figure1

**Figure1**

[![enter image description here](https://i.sstatic.net/joLQY.png)](https://i.sstatic.net/joLQY.png)

When an object is illuminated by the sun, how does the reflected spectrum change? Does each surface has an own reflection spectrum? where each photon "checks" its wavelength and "decides" to reflect or absorb?

for example a green object would absorb all wavelength except a small bandwidth of green?

Lets do a small example:
Lets imagine having a ray tracer setup with the sun as illumination, a few objects with different colors and a physical simulated camera with 3 color channels, where each color channel has a very small bandwidth of 10nm (see Figure2).

**Figure2**

[![enter image description here](https://i.sstatic.net/OpnuC.png)](https://i.sstatic.net/OpnuC.png)

Then we can say, that we change the sun spectrum so that only the 10nm bandwidth of the camera channels are stored into 3 watt values. The same with each material reflection spectrum.

Each simulated ray holds the three values of the sun spectrum.
In case the ray is intersecting an object, can I scale the three values by the objects material reflection spectrum with respect to the 3 camera wavelength and bandwidth?

Or did I understand it completely wrong?

**Tags:** reflection, light


---

## 1 answers

### Answer by username_1 on 2022-11-10. Score: 3 | Accepted answer

> When an object is illuminated by the sun, how does the reflected spectrum change? Does each surface has an own reflection spectrum? where each photon "checks" its wavelength and "decides" to reflect or absorb?

Yes, this is more or less correct. But when dealing with very many photons, striking very many different atoms/molecules mixed together into one material, we observe that some *fraction*, or percentage if you like, of the photons are reflected. So, the spectrum is made up not of yes-or-no, but that fraction, for each wavelength. This is called the surface's [reflectance spectrum](https://en.wikipedia.org/wiki/Reflectance). You may also hear “diffuse reflectance” or “albedo”.

(“Diffuse” means the reflection happens at a random angle, usually due to roughness or translucency of the material; its opposite is “specular”, mirror-like reflection. When an object gleams and sparkles, that is specular reflection. Most objects exhibit some of both, and the specular reflectance can have a different color/spectrum than the diffuse — usually whiter.)

Then, as you have thought, we usually consider this only in 3 different wavelengths/bands since that is sufficient to reproduce *most*, but not all effects that human vision can observe. For an example of phenomena that require more than 3 bands, see [color rendering index](https://en.wikipedia.org/wiki/Color_rendering_index), a measurement of how well the spectrum of a light source, after interacting with the reflectance spectrum of illuminated objects, simulates broad-spectrum illumination such as sunlight. You cannot simulate this without simulating more components of the spectrum than just RGB. For more examples, see this other question: [Are there common materials that aren't represented well by RGB?](https://computergraphics.stackexchange.com/questions/203/are-there-common-materials-that-arent-represented-well-by-rgb)

> Lets imagine having a ray tracer setup with the sun as illumination, a few objects with different colors and a physical simulated camera with 3 color channels, where each color channel has a very small bandwidth of 10nm (see Figure2).

Computing using the RGB approximation does not generally think about wavelength bands at all — we just pick 3 precise wavelengths for our R, G, and B [primaries](https://en.wikipedia.org/wiki/Primary_color) and express all other colors in terms of mixes of those primaries, which are identical as seen by the (typical) human eye to more complex spectra.

Any such choice of primaries will constrain the [gamut](https://en.wikipedia.org/wiki/Gamut) of colors that can be represented — some highly saturated colors will be excluded, unless the color components are allowed to go negative to express the most extreme monochromatic (or purple) colors. This is usually an acceptable limitation, because RGB monitors are *physically* limited to emit only specific wavelengths based on the color of their LED emitters, LCD color filters, or CRT phosphors.

(Note that in *printed* graphics, the situation is more complex because instead of a display device emitting only R+G+B light, we produce an object with its own reflectance spectrum based on the pigments/dyes used. That's why 4-component “CMYK” color is used — it's a better match for the actual behavior of the pigments. In some cases, “spot colors” may be used, identifying a specific pigment to be laid down in a certain area, to produce precise colors or special effects such as shininess.)

> In case the ray is intersecting an object, can I scale the three values by the objects material reflection spectrum with respect to the 3 camera wavelength and bandwidth?

Yes, you should multiply each wavelength/color-component of the incoming light by the object's reflectance for that color. The bandwidth need not be explicitly modeled — if changing the bandwidth makes any difference, then it is equivalent to changing the choice of primaries, i.e. working in a different [color space](https://en.wikipedia.org/wiki/Color_space). You can always convert a color from one RGB color space to another (when it is in the gamut of both) with a little bit of arithmetic.

---

Again, all of what I've said above is true *when you are working in RGB*. This does have limitations; if you want to precisely simulate the effects of monochromatic lights or color filters, you will need to use more color channels than just RGB. The more channels you use, the better your discrete approximation of the continuous spectra in real physics. However, this is rarely done in rendering — most computer graphics you have ever seen in your life were probably only calculated using RGB.

> **Comments:**
> **username_0**: thanks a lot! This answer is very detailed, which I very mush like :). I am trying to simulate different physical sensors, e.g. infra red camera as well. So my next step is to store whole material spectra (diffuse and specular) of all wavelength of all materials used in the scenario. After camera settings are read from config file, I'll decode the material spectrum into camera spectrum bands, so that the material will be rendered nearly correct. +1!  
> **username_1**: @username_0 Then you may be interested in the field of [multispectral imaging](https://en.wikipedia.org/wiki/Multispectral_imaging) — but I'm not aware of any particular useful links on _simulating_ (rendering) colors beyond RGB. In principle it's just "use color-vectors that have more than 3 components of RGB", but I'm sure there are additional considerations that arise.  

---

