Realistic Glass Shader

by Colin Behrens in Materials, Shaders, Textures

+++ 2.8 Users+++ I tested the shader with the official 2.80 release, everything works fine for me except a few values are interepreted different (for example caustics are a bit brighter) because the Cycles Renderer had some changes+++ I can not guarantee for Eeveecompability+++


Did you ever try to create some realistic looking glass renders in Blender?
If you compare the results you get with the default glass shader with reference images, you will probably notice that it is not possible to get completely photorealistic results this way. 


Why? Because the Cycles Render Engine does not use bidirectional rendering. This means it is not possible to get physically accurate caustics or dispersion.


But! Here is the solution:

With our Realistic Glass Shader you have full control over all parameters you could possibly need for creating awesome looking renders you would previously have used Blender's built-in glass shader for, e.g. diamonds, water or glass. Please note that the caustics are still faked because otherwise it is not possible with the Cycles Renderer, but who cares as long as the results are good?

You can turn off the reflective and refractive caustics under light paths in your render settings to reduce fireflies, we do not need this feature because we fake the caustics.



Main Features:

  • Dispersion
    • Separates the light into its primary colors
  • Caustic Amount
    • Customize the amount of caustics you want for your scene
  • Caustic Pattern & Noise
    • For more variation and details in your caustics adjust these values
  • Caustic Tint
    • Color your caustics independent of the glass's color.
    • If you leave it white (#FFFFFF) the caustics will automatically be generated
  • Caustics Dispersion Saturation
    • Have you ever seen these rainbow like lights on the ground when the sun is shining through your windows? With this slider you can chose how many colors are refracted to the ground
  • Volume Scatter Color
    • Choose which color should be scattered as the light passes through the glass
  • Volume Scatter Anisotropy
    • The anisotropy affects the direction in which the light is scattered
  • Volume Absorbtion
    • Choose which color should be absorbed as the light passes through the glass.
  • Raylength Absorbtion
    • A non volumetric absorbtion method for faster rendering but compared to volume absorbtion the caustic colors are less detailed.
  • Cracks
    • This feature is still being tested and developed; works for some objects.
  • Render Speed
    • You can choose if you either want to go for quality or render speed by using different outputs
  • Caustics Only
    • If you want only the caustics to be rendered select this ouput



The shader is composed of many nodes as you can see below; still it computes very fast!



If you buy the shader you will get a .blend file with a test scene, in which the shader is included.

You can install the shader by doing the following steps:

  1. Click on file
  2. Click on append
  3. Locate where you saved the .blend file
  4. Click on Materials
  5. Select Realistic Glass
  6. Click on Append from Library


You should now have the Shader in your scene.



The Shader was developed by Colin Behrens with the help of Gleb Alexandrov, if you have any questions feel free to message me.


Update:

1.1

I ungrouped all node groupes that were used in the Realistic Glass Shader so that you do not have any other group than the realistic glass Shader in your scene when you append from the file.

1.2

The official 2.8 support is here. Tested with Blender 2.80. I added the 2.8 version as an seperate file so that 2.79 users can still access the old one.
As the default setting I turned the dispersion strength down to 0.


+++For the lighting I used a free HDR from poliigon.com! Check it out!+++