Is it possible to make an Opalescent shader in cycles?
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.
I attempted to do something similar by mixing to glass shaders with IsCamera ray as the factor:
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:
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:
However, I can't seem to mix them. Here are results with the Factor of the last mix node at
I did not expect setting the factor to
.5 to work, though I'm not sure why using an Add node blows it out:
I could composite these together, but I would prefer to have it work in one material if possible.
How can I accomplish this?