Is there any way to cast shadows for glass with lumen

One of the solutions I saw was to

1-make a duplicate of the object,
2-use a non translucent shader on the copy
3-make it not render in game
4-in lighting section select cast hidden shadow

I tried it yesterday but unfortunetly it didn’t work, there were no duplicates during rendering but those dup’s shadows were also missing, am I forgetting something ?

1 Like

It seems that the hidden shadow option is not working, I have the same problem, did you ever solve this problem?

  1. Place your asset in a scene.
  2. Select the static mesh.
  3. Go to the details panel and search for vol.
  4. Check on: Volumetric Translucent Shadow.
  5. Profit.

For completion, and to not let a wrong answer stand on its own, as described here, VTS is not yet supported in Lumen.

My workaround was to turn on Ray Traced Shadows in the project settings (might not be for every project)
Ray Traced Shadows OFF


Ray Traced Shadows ON

Comparison with Path Tracing for reference.

The thing is that with Lumen + ray traced shadow, the shadow stays as dark regardless of the opacity value. In path tracing the opacity of the glass influences the shadow as expected

2 Likes

You can also enable “cast shadows as masked” in the material. Alone, this will make a fully opaque shadow. But you can use the dot product of the light vector and normals to dither the shadow mask, so that the shadow is more opaque at glancing angles where the fresnel effect will cause less light to transmit and brighter at the core, where more light passes through.

3 Likes

Any chance you could show how you’d hook that up in the material graph BanableOffense? Thanks for the insights!

How would one get the dot product of the light vector? The light vector node alone cannot be used in any material that isn’t a deferred decal or light function…

Use the “Atmosphere Sun Light Vector” node instead.

I didn’t see anyone mention my preferred method.

Use the shadow pass switch node before opacity, you can really fine tune the strength of the shadows and works well even with masked shadows if you add the dither temporal aa.