I'm trying to achieve the effect where a beam of light sent through a prism or other refractive object, separates out into the light spectrum. (See image below)

enter image description here

This effect is especially useful to have when modeling gemstones, since the 'sparkle' of colors produced by this effect adds a lot of realism to the model.

It does not seem possible to get Cycles to produce this effect, since Cycles handles each ray of light as only a single, one-colored ray. Is there any way to coax Cycles (or any other render engine) into treating light as a full spectrum? Is this kind of treatment of light even possible in Blender?

  • $\begingroup$ I was about to ask this question myself, after looking all over for good techniques to get this effect.. :D $\endgroup$
    – gandalf3
    Commented Jul 2, 2013 at 19:45
  • $\begingroup$ There's a new Add-on "Prism" which should help you achieve exactly this effect. $\endgroup$
    – Samoth
    Commented Mar 21, 2016 at 19:58

3 Answers 3


It is fake-able to some extent in cycles, see some of these results:



One technique I know of is to use multiple Glass shaders with different IOR values

A quick setup:

enter image description here

Low sample result:
enter image description here
(Not that great, but the closest method I know of..)

Luxrender is an open source unbiased bi-directional rendering engine with blender integration (and GPU rendering support via OpenCL) and is capable of this.

Some examples:



Luxrender (technically SmallLuxGPU, an early version of luxrender with GPU support) https://www.youtube.com/watch?feature=player_detailpage&v=jk-N4f9ze4k#t=82s

Yafaray is another open source render engine with blender integration that supports both biased and unbiased techniques, and also seems to handle this well.

  • 1
    $\begingroup$ Just a note, since Cycles' caustics are still not very good, if you use that Cycles material setup in a low-light setting you end up needing about 10,000 samples to see anything reasonable. I ended up going with Luxrender for that reason, and I've gotten great results, thank you! $\endgroup$
    – Gwen
    Commented Jul 9, 2013 at 1:46
  • $\begingroup$ LuxRender and its associated website has since moved to luxcorerender.org and the old links in this post now lead to a random shop. $\endgroup$
    – ch4rl1e97
    Commented Feb 10, 2021 at 16:46
  • 1
    $\begingroup$ @ch4rl1e97 thanks for the heads up! $\endgroup$
    – gandalf3
    Commented Feb 11, 2021 at 7:40
  • $\begingroup$ Do you suggest any lights paths/rendering configuration to avoid noise? With high value of max bounces and 1000 samples is still noisy. $\endgroup$
    – Iván
    Commented Mar 24 at 0:40
  • 1
    $\begingroup$ @Iván unfortunately this is just an uphill battle for pure-forward path tracing, leaning on denoising and trying to make light sources larger are probably the two most fruitful things, outside of using an engine that supports bidirectional or metropolis sampling (e.g. luxcorerender). noisy at 1000 samples doesn't surprise me, in my experiments with caustics in cycles i usually have to do closer to 10000 $\endgroup$
    – gandalf3
    Commented Mar 26 at 6:11

Cycles only shoots rays from the camera:

diagram of the ray path
(source: blender.org)

For dispersion, support for bidirectional path tracing needs to be added. This is currently considered a low priority. There has been a community effort to get an additional developer to implement it.

  • 7
    $\begingroup$ Having myself written a unidirectional forward pathtracer supporting dispersion, I can say that requiring BDPT is incorrect. $\endgroup$
    – geometrian
    Commented Nov 16, 2014 at 23:25

I know this is old, but there's now a White Noise Texture added with 2.81. It generates a random value based on the input. So if you put something like Geometry > Position or a texture coordinate (as long as it's different depending on where the ray lands on it) it will be noisy at first (some pixels white/some black/some in between) because each iteration it actually samples ramdom trajectory within each pixel's cell.

All this is to say, you can actually use the white noise to randomize the IOR and the color. And because it's fully deterministic PRNG (same input = same output), if it generates 0.68274, it will use that number for the IOR & the hue of the color, effectively mimicking the property of certain wavelength refracted at certain degrees. Just make sure it's the same white noise node to randomize both.

All that bidirectional path tracing does is seemingly just randomize the wavelength and use that to determine the refraction IOR. It wasn't possible to randomize something per ray before, but now it actually is and you can, in fact, approximate dispersion very well in RGB. Bidirectional would just be slightly more accurate-looking.

  • 1
    $\begingroup$ I'm curious about your method, and I'd like to see this answer developed some more if you have the time. :) $\endgroup$ Commented Jun 25, 2021 at 4:34
  • $\begingroup$ This sounds interesting, but from what I'm reading in the answer I have no idea how to setup a material for this method... $\endgroup$ Commented Jun 25, 2021 at 8:46
  • $\begingroup$ I know this is a bit late, but I've finally elaborated on this here: $\endgroup$ Commented Jul 22, 2021 at 19:40
  • $\begingroup$ youtube.com/watch?v=lZuvwmqWjkk $\endgroup$ Commented Jul 26, 2021 at 5:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .