<p>The most common way I saw is to have photons of several different wavelengths. One then renders with each wavelength and blends the results into the final image.</p>

<p>"Existing work": <a href="http://psychopath.io/spectral-rendering/" rel="nofollow">Psychopath Renderer</a> and <a href="http://benedikt-bitterli.me/tantalum/" rel="nofollow">The Secret Life of Photons</a>.</p>

CC BY-SA 3.0
2016-01-06T20:48:37.160Z
2016-01-06T20:48:37.160Z
Ecir Hana
<p>One hacky method I've seen in real time raytracers / ray marching is to cast a ray per color channel (rgb) and do things Iike have different refraction indices per color channel.</p>

CC BY-SA 3.0
2016-01-05T09:11:27.457Z
Interesting. Could you point us to any sources, examples or results of this approach?
David Kuri
CC BY-SA 3.0
2016-01-05T12:30:40.763Z
I'm on my phone so can't take a screenshot, but this shadertoy uses the method and looks pretty decent: https://www.shadertoy.com/view/ltfXDM
Alan Wolfe
CC BY-SA 3.0
2016-01-05T15:19:28.693Z
POV-Ray is an open-source ray-tracer that uses a similar method to simulate dispersion. It's not a ray per channel: you can configure how many rays are used, spread equally across the spectrum.
Dan Hulme
CC BY-SA 3.0
2016-01-05T01:14:34.330Z
2016-01-05T01:14:34.330Z
Alan Wolfe
<p>Is all <a href="https://en.wikipedia.org/wiki/Spectral_rendering">spectral rendering</a> handled as simulation?  Are there technique more tailored to 'consumer' rendering, such as for real-time or even just 'realistic looking without solving full physical equations'?</p>

<p>I'd like to understand how we handle the rendering of spectral effects.  It seems like a photon needs to be described as a range of wavelengths, and incidence with a surface either </p>

<ul>
<li>replaces the original, and resolves multiple new photons across the spectral function, each with their own new vector </li>
<li>maintains the original (or marginally modified) photon, given a threshold</li>
</ul>

<p>I would prefer to be pointed in the direction of existing work, but appreciate any <em>coloring</em> of this topic.</p>

CC BY-SA 3.0
2016-01-05T15:20:30.733Z
I feel like this question is way too broad as it stands. Whole books have been written on the subject. Perhaps you could narrow it down to a specific question that's not covered by existing resources?
Dan Hulme
CC BY-SA 3.0
2016-01-05T16:17:38.973Z
I can see this being answered along the lines of "There are hundreds of ways, each of which falls into one of the following N broad categories. If you want to know specific detail about one of these categories you can ask a new question."
trichoplax is on Codidact now
<lighting><photo-realistic><color-science>
How is spectral rendering handled?
New Alexandria
# How is spectral rendering handled?

(Asked by: username_0 on 2015-12-29)

Is all [spectral rendering](https://en.wikipedia.org/wiki/Spectral_rendering) handled as simulation? Are there technique more tailored to 'consumer' rendering, such as for real-time or even just 'realistic looking without solving full physical equations'?

I'd like to understand how we handle the rendering of spectral effects. It seems like a photon needs to be described as a range of wavelengths, and incidence with a surface either

* replaces the original, and resolves multiple new photons across the spectral function, each with their own new vector
* maintains the original (or marginally modified) photon, given a threshold

I would prefer to be pointed in the direction of existing work, but appreciate any *coloring* of this topic.

**Tags:** lighting, photo-realistic, color-science

> **Comments:**
> **username_1**: I feel like this question is way too broad as it stands. Whole books have been written on the subject. Perhaps you could narrow it down to a specific question that's not covered by existing resources?  
> **username_2**: I can see this being answered along the lines of "There are hundreds of ways, each of which falls into one of the following N broad categories. If you want to know specific detail about one of these categories you can ask a new question."  

---

## 2 answers

### Answer by username_3 on 2016-01-06. Score: 2

The most common way I saw is to have photons of several different wavelengths. One then renders with each wavelength and blends the results into the final image.

"Existing work": [Psychopath Renderer](http://psychopath.io/spectral-rendering/) and [The Secret Life of Photons](http://benedikt-bitterli.me/tantalum/).


---

### Answer by username_4 on 2016-01-05. Score: 1

One hacky method I've seen in real time raytracers / ray marching is to cast a ray per color channel (rgb) and do things Iike have different refraction indices per color channel.

> **Comments:**
> **username_5**: Interesting. Could you point us to any sources, examples or results of this approach?  
> **username_4**: I'm on my phone so can't take a screenshot, but this shadertoy uses the method and looks pretty decent: https://www.shadertoy.com/view/ltfXDM  
> **username_1**: POV-Ray is an open-source ray-tracer that uses a similar method to simulate dispersion. It's not a ray per channel: you can configure how many rays are used, spread equally across the spectrum.  

---

