Any tips for faking realistic(ish) glass in Eevee?

I’ve seen a few tutorials referring to making realistic glass in Eevee, but so far they all seem to produce very unrealistic results.

I know Eevee isn’t a ray tracer and can’t compete for realism with the likes of Cycles, but I am just checking to see if anyone has found any hacks or workarounds to get something approximating believable glass in Eevee?

This is a Cycles render showing what I think of as realistic glass (lack of caustics notwithstanding).

And here’s the same scene rendered in Eevee.

I’d particularly like to get the edge distortion effect to show the thickness of the glass.

Check this topic:

check out the free shader at https://gum.co/cwGlass

It works pretty darn well and has been updated twice.

Thanks for the responses.

I had a look at the suggestions. They could be useful.

The ekGlass shader is certainly good at adjusting the reflection level in the glass. Unfortunately the tradeoff is the loss of refraction, which is something I would like to retain if possible. For glass objects in the background of a scene ekGlass would work well, but as a focal point of a scene I think the lack of refraction would be jarring. Of course, I may have not adjusted the shader correctly for the test scene I was using.

In trying various options to work around Eevee’s limitations, I did come across one possiblity that might be useful to someone, so I’ll post it here.

I created a standard Principled BSDF glass shader. Then I created a single user copy of it, and set the ‘Blend Mode’ of the copy to ‘Additive’. I then applied the Additive material to some of the external faces of the glass object, leaving the rest using the original material with the Blend Mode set to its default of Opaque.

This is a screenshot of a basic scene in Edit mode. The selected faces are the four outer faces of a very simple glass object; they’re the faces the Additive material was applied to:

This provided a delineation between the inner and outer faces of the object, while preserving at least some of the refractive distortion.

This is the default glass material being used in the same scene:

This is the same scene using the ekGlass shader:

And here is the same scene again using two materials applied to different faces:

The different materials seem to work well enough for such a simple object. They don’t work quite as well on a more complex object, using subdivisions and bevels, such as the scene I used in my first post above, but I think its better than the Eevee default:

Someone may find this solution useful, but ultimately Eevee - at present, at least - is not really suitable for glass objects that need realism.

Can you share this scene? I believe you have the shader settings incorrect.

Sure, no problem. Please let me know how it should be set up correctly. The more options we have available for Eevee, the better.

The scene uses a low-res HDRI environment image from HDRI Haven (https://hdrihaven.com/hdri/?h=aircraft_workshop_01) but I’ve packed it into the .blend file so there shouldn’t be any need to download it.

Note that I’ve separated the different material versions of the glass object into Blender 2.8 render layers, and set the render output to use only a single render layer via the compositing nodes window.

Also, I use a 3-monitor workspace, so you might want to disable the ‘Load UI’ option when you open the file in Blender.

It’s an 11.4 MiB file, so I couldn’t upload it here. You can download it from Google Drive at https://drive.google.com/uc?id=1GOKbxaecCSJxk2Cu1BUsJsQqNi1UQSTA&export=download

Some samples I was working with. It’s important to give glass something to reflect as well as something to see behind the glass. Here’s my samples:

Here are some renders using items from your scene. I just cut and pasted into my scene and added your HDRI and some walls.

Here’s the file:

https://filedn.com/lLMW4jXsJqxXkRYjd1UCoKL/temp/untitled4.blend

And here’s another pass by separating the inside and outside polys.

Link to file:
https://filedn.com/lLMW4jXsJqxXkRYjd1UCoKL/temp/untitled6.blend

Thanks for posting your renders.

They show that you can get refraction with your material, and you’re right it does look good when the scene is adjusted appropriately.

Using two materials with different blend modes does give a sense of the thickness of the sides, but at the risk of introducing other artifacts such as unrealistic refraction.