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 Jul 2 '13 at 19:45
  • $\begingroup$ There's a new Add-on "Prism" which should help you achieve exactly this effect. $\endgroup$ – Samoth Mar 21 '16 at 19:58

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 is capable of this. (there is also a related project called Luxrays trying to get Luxrender fully integrated with the GPU)

Some examples:



SmallLuxGPU example (Luxrays)

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 Jul 9 '13 at 1:46

Cycles only shoots rays from the camera. diagram of the ray path

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.

  • 2
    $\begingroup$ Having myself written a unidirectional forward pathtracer supporting dispersion, I can say that requiring BDPT is incorrect. $\endgroup$ – imallett Nov 16 '14 at 23:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.