Light through glass materials, Raytrace?

Hi, I am new to unreal. About two weeks into the program. I am an interior designer and am working in 4.42 and using the ray trace functionality (not light baking). I have been trying to figure out why I can not get the sunlight or any light to pass through my glass/translucent materials. I use the sunlight all the time for rendering effects in my interiors (shadows etc) in vray. I have tried setting up a sun and a directional light… and when I turn the window layer OFF the sun comes through and gives me the desired results… but I don’t want to have to turn the window off as I want the refractions. Also, it looks like the same thing is happening in my shower glass… I have lights in the shower but I can not see them from outside the shower. I have tried using several different glass materials and even created a whole new one… with no luck. I noticed that when I have ray trace off, the light does indeed pass through… but when I turn on ray trace, it is blocked. I have turned on and off all the translucency and ray tracing items in post-processing and tried every configuration I can imagine… I am obviously missing something??? I have sunlight, a skylight and am using an HDRI backdrop (have tried turning each of these off with the same results). Thanks so much for your help… I am going nuts trying to figure this out.

Could you please post your glass material graphs, and their main settings (lower right of the material editor). Are all the translucency options in Project Settings and World Settings, and in the major lights of the scene set to support translucency? There’s a number of things that could be causing it, or one of numerous.

Have you tried Lightmass Portals? Place them around the windows and area where light is to be let in. Don’t know if they need to be on the outside, within the target area, or inside the room and surrounding geometry. But size them to approximately a bit larger than the receiving area (such as the window, a bit wider and higher than the window).

Thanks, no i haven’t tried that. Let me try now! I will get back in a bit.

How’d it go? There’s a doc page on portals too. Best to read through it and understand some of it to use them effectively and without having to guess as much about how they work and such.

Is the scene baked lighting, dynamic lighting, or a combination of both? I’m asking because translucency, like other things in Unreal Engine, works in certain ways depending on whether the light(s) involved are baked or dynamic…or both.

I am having the same problem and I did try the portal and it didn’t work.
Did you figure it out how to fix it?

I am having exactly the same problem.
I tried the lightmass portal and it didn’t work for me.
Did you find a solution?
If so, can you please share

The closest fix that I have found is disabling cast shadows on the mesh. This will only work if the glass is a separate mesh than the window or whatever is housing it, which obviously will have its limitations. If anyone else has found a fix please share.

1 Like

I know this thread is old, but at least in 5.1 one way to fix this is to disable Cast Ray Traced Shadows in the master material’s Material settings. The downside to this is, obviously, it won’t cast a shadow, which can look strange in some situations.

2 Likes

Thanks a lot man! I just was looking for a way to fix this the last few hours. Your post had a great timing :slight_smile: This seems to be the best solution for now! Now I can finally have a pretty good glass implementation in UE for my ArchViz stuff!

No problem! I think I remember reading somewhere that making raytraced glass a lot better is coming on the roadmap somewhere in the near future, though I can’t remember where. Another limitation of raytraced glass to keep note of are that refractions using raytracing don’t take into account the shadowed skylight OR global illumination, which can lead to things viewed through a glass object looking super washed out and flat.

A while back there was a cool UE4 build that had some AMAZING real-time caustics for raytraced glass: Generating Ray-Traced Caustic Effects in Unreal Engine 4, Part 1 | NVIDIA Technical Blog. This makes me optimistic for raytraced glass in future versions of Unreal.