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 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 Jul 9 '13 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 Feb 10 at 16:46
  • 1
    $\begingroup$ @ch4rl1e97 thanks for the heads up! $\endgroup$ – gandalf3 Feb 11 at 7:40

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$ – imallett Nov 16 '14 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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