Perfect Master Glass Shader for all situtaions

Recently I’ve been obsessed with creating a perfect Master Glass Shader that will suit all situations, regardless of using separate technique for specific situation. Early on I’d just slap a default glass material on every kinds of glass and call it day. Then gradually I’ve been noticing unsatisfactory results in my final renders. For ex: I’ve a scene with old tungsten bulb and using default glass was not giving me that realistic look. Similarly, when I used glass panels for windows, there wasn’t enough light coming into room. The solution was a technique with Light path that ignores shadow ray and reflection into a math mode and setting the mode to maximum.

For few moments I thought, that was it. Then while working on one of the client’s project there was a solid of glass sculpture with light inside it and both of the techniques were inefficient. And that’s is what made me come up with this fairly simple node setup to create that Master Glass Shader that fits in all situations without having to switch between materials and fiddle with values.

And here’s the comparison in different situations.


So, what did I have to understand when it comes to glass and it’s physical properties. All the glass seems to be very clear and without flaws. No glass is perfect. They will always have some impurities, distortions, surface imperfections, angular reflections, light refractions and absorptions.

Let me know if you guys are interested to try this shader.
Here’s the link for blend file

1 Like

I think because in every real glass has its own physical properties like weight, height, thickness, relief or something like this. But we, CG artists, are not take this properties to our transparented(glass) objects and I really know we can create realistic glass with Cycles (E-Cycles in my way) if we understand “math” properly.