Super Fly Coloured Glass
-
Hi,
I'm using the Tricky Glass cycles setup for clear glass (mix of transparent and glass depending on ray type.) If I add a colour to the glass and or transparent BSDF nodes all looks okay except the reflections are coloured which I know is not right. Anyone any ideas?
-
There's a thread somewhere in which I posted proper tricky glass, with volume coloring.
Hang on...
-
Dang it. It was at Runtimedna and it's gone.
Guess I'll have to post all the work again. (That and 10,000 other articles and shaders)
Sigh.
-
Here ya go. This is the proper way to do colored tricky glass. You apply the color to the volume, not the surfaces.
-
Note also the version you had, where you tricky into use transparent for reflection rays, is wrong.
The trick is only for shadow rays - nothing else. Otherwise you lose the glass quality of the glass and it just looks like a gas when reflected by other things, like a mirror.
-
@amethystpendant have you tried my free shader for this yet?
http://www.sharecg.com/v/86231/browse/7/Material-and-Shader/Poser-11-Superfly-Uber-Shader-1
-
-
@bagginsbill said in Super Fly Coloured Glass:
Here ya go. This is the proper way to do colored tricky glass. You apply the color to the volume, not the surfaces.
That is just so elegant, like an equation, simple but profound.
I feel your pain about RDNA there was so much there that just evaporated, really, really sad.
But thank you so much for this! Off to make my bottles look right!
Amanda
-
@ghostship said in Super Fly Coloured Glass:
@amethystpendant have you tried my free shader for this yet?
http://www.sharecg.com/v/86231/browse/7/Material-and-Shader/Poser-11-Superfly-Uber-Shader-1
Hi @ghostship, I certainly have and use it all the time! Wasn't sure what settings to use for coloured glass though which is why I asked here.
BTW if you are doing another version could you add inputs to your bump settings so we can easily change the weave density etc, I know I can do it by opening the compound node, but I'm lazy ;)
Amanda
-
@amethystpendant just set refract to 1 and choose a color for "refract color." it does not have volume absorption like BB's shader so go with his if that's what you need.
I guess I could expand the bump plug-in node to have more options...
-
In case somebody is reading this and doesn't grasp the significance of "Tricky" Glass, nor the significance of Volume attenuation, here's a comparison.
On the left, using colored Refraction (in fact, this is GhostShip's Uber shader).
On the right, tricky glass combining volume color attenuation and transparency for light passing through.The shadow with Tricky Glass is not black - instead it adopts the volume coloring and so some light goes through. This is not exactly correct as a true caustic calculation, but it's WAY cheaper for render time and it's certainly much better than black. You don't have to enable caustics and wait 48 hours for convergence. Unless you're making a render that is all about the caustics, you don't need caustics. Few would notice.
The other thing to notice is that the deepness of the color depends on how thick the volume is. For the thinner parts, the glass is closer to clear than the thick parts. That's the Beer-Lambert law in action. Google it for details.
You can also see the Beer-Lambert back-lighting effect here:
-
@bagginsbill Stunning! A great demonstration
Amanda
-
Sorry tried to edit my last post but couldn't :(
Do you have to have Volume Bounces and Samples set for your coloured tricky glass to work?
-
@amethystpendant said in Super Fly Coloured Glass:
Do you have to have Volume Bounces and Samples set for your coloured tricky glass to work?
I believe you don't. Volume bounces and samples affect volume scattering, not volume attenuation.
Scattering involves aborting an internal ray passing through the volume as if a particle got in the way.
Attenuation is an effect that happens based only on distance traveled in the volume, which can be calculated without introducing more samples along the way. A straight line will do.
The AbsorptionVolume node is calculating attenuation.
-
@bagginsbill yep. Your glass is better and is even casting a colored shadow.
-
@bagginsbill Yes, that's exactly what I was wondering. Thanks for the explanation.
-
@bagginsbill I used your material on two primitives (ball cone and open cylinder) with a single spotlight and a backdrop. It seems to me that, although the transparent shadow is fine, the glass itself looks way too dark.
These are my render settings. Anything wrong with that?
-
@oldenburg adjust the density on the absorption node to taste.
-
Your max bounces is 3. It takes 4 bounces to get all the way through both walls of a cylinder or glass. It takes more than that to get through other more complicated shapes and angles, like a glass Andy figure.
-
Here I render with your settings on the bounces.
Now I change Max Bounces to 16 to agree with your Transmission Bounces.