If you’re looking for a shader that simulates the kind of glass you find used in sculptures, crystal balls or other solid shapes then look no further. This beautiful shader gives you fine control over parameters such as transmission colour, reflection colour, curvature, refraction, chromatic abberation, opacity, specular and roughness.
Including four common and hideous art glass creations, the Advanced Glass Shader is the perfect addition to archviz, fantasy and sci-fi settings.
This shader is not intended for planar glass surfaces. Please use the default Unreal Engine translucency for objects just as windows. Requires at least one SceneCaptureCube component for reflection/refraction.
The new shader consists of a post-process filter and an example glass material. This shader will work with existing glass materials from Unreal Engine, with a few adjustments in the material details.
This shader is appropriate for archviz and gaming applications.
Three post-processing slots are provided for different blur behaviours and includes chromatic aberration for accurate hardened glass simulation such as coffee tables.
https://i.imgur.com/VRjREA1.png
https://i.imgur.com/ht4K6rZ.png
https://i.imgur.com/R5jfyV9.png
Instructions
Setup
Enable “Custom Depth with Stencil” in your project settings
Enable “Render after DoF” and “Custom Depth Writes” in your glass material details
Add post-process material and add “BlurGlassPost” as a material post-processing effect
For the highest quality glass set your glass materials to “Surface forward shading”, but this is optional
Add a normal map to your glass material to match the blur parameters, e.g. frosted glass. This will help with specular behaviour.
Applying in world:
Select your glass objects and check “Render custom depth” under “Render” in the details panel.
Set their “CustomDepth stencil value” to between 1 and 3.
Adjust the values for each stencil in the post-processing material instance as demonstrated in the screenshots above.
I’ve just spent an hour trying to load the glass shader into projects that I had it already in there so i could get axcess to the blurred glass and it keeps deleting files I had in there like the map and the mat_glass and nothing in the blurred glass . Tried this on 2 computers in multiple projects - half the time it says it can’t load over some of the assets then the mat_glass dissappears and they no longer work ??? any ideas
projects that do not have it in it and not all loads - no blurred glass no mat_glass no map - ///4.17
deleted off hard drive and aded to project from marketplace as well
For the first issue, try deleting the old version of the asset from your project (but keep your presets), then re-inject it into the project from the launcher. If this keeps failing Epic are the ones to talk to as the launcher is rubbish when it comes to deploying assets. The more we complain the faster it’ll get fixed. You could also try injecting them into a new project and then migrating them over to your existing project.
It’s strange that you’re not getting blurred glass on a new project. Are the new glass windows present next to the vases in the overview map? If not then you’re not getting the new content. If they are and they’re just not blurring make sure you’ve followed the steps in the post above this one.
There seems to be a lack of good caustics available in UE right now, so I’ve fixed that. Coming in the next update: caustics.
The effect is decal-based and the update includes adjustable decal material, water surface material and water volume material. It’s best viewed in motion: