12
$\begingroup$

Is it possible to make an Opalescent shader in cycles?

From Wikipedia:

Opalescence is a type of dichroism seen in highly dispersed systems with little opacity. The material appears yellowish-red in transmitted light and blue in the scattered light perpendicular to the transmitted light. The phenomenon is named after the appearance of opals.
opalescence example from wikipedia

I attempted to do something similar by mixing to glass shaders with IsCamera ray as the factor:

enter image description here

However, the color of each glass shader is getting mixed, so the color of the object is not separate from the color of the caustics:

enter image description here

How can I make a shader with separate color inputs for the caustics and the object itself? Or if it's possible, make a more physically based opalescence shader?


Update: I managed to separate the caustics from the object with this node setup:

enter image description here

However, I can't seem to mix them. Here are results with the Factor of the last mix node at 0, .5 and 1:

mix factor of 0

mix factor of .5

mix factor of 1

I did not expect setting the factor to .5 to work, though I'm not sure why using an Add node blows it out:

With add node

I could composite these together, but I would prefer to have it work in one material if possible.

How can I accomplish this?

$\endgroup$
  • $\begingroup$ Can you change the title? Currently the title sounds like a tutorial request, but the question itself is more specific. $\endgroup$ – CharlesL Oct 19 '13 at 14:45
8
$\begingroup$

The Problem here is that you have to use two different shaders that both use refraction rays. That makes it difficult to find a separation that lets the one shader cast rays on other objects after doing refraction and the other rays casting rays into the camera after refraction but not cast rays onto other objects.

I found this node setup to work:

node setup

Result:

result

Of course this is not physically correct and somewhat a hack. But with a little extra work you should be able to simulate a rather good looking opalescent shader.

$\endgroup$
9
$\begingroup$

enter image description here

I combined a dark blue SSS shader and a white Glass shader with an add shader, and used an orange volume absorption to achieve this result.

enter image description here

$\endgroup$
  • 1
    $\begingroup$ you might want to add a picture of the nodes to your answer. $\endgroup$ – David Aug 19 '15 at 1:49

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.