Raytrace light leeks

Hello I have a problem with leeking light with raytrace distance field shadows.
I want to render scene from inside of closed coffin, then it will be opened, but the light leeks inside the closed coffin.
The upper lit is other mesh but there are no holes to let the light in.
Here are some screenshots:

The outside of coffin.

Light leeks inside coffin

Visualisation of Distance field mesh (inside the coffin)

Hello JaroMast,

I have a bit more information I would like to gather from you and I have a few troubleshoots you can try.

1.) What is the lightmap resolution set to for the coffin? You can find this by double clicking on your mesh in your content browser to bring up it’s details panel. On the right hand side there is a section called Static Mesh Settings. In that section there is a tab labeled light map resolution. Try setting the resolution on the coffin to something like 512.

2.) Check to make sure you are calling on the right lightmap channel.

I am linking you to our documentation on lightmap resolution and how to Unwrap lightmaps for UE4. There is a wealth of material covering different issues when it comes to lightmaps.

Please follow these troubleshoots and look through our documentation. If you are still having issue after following these steps then please post here with any further questions.

Hi Jaro,

When using Distance Fields for shadowing you may need to increase the resolution of your mesh so that it can have better resolution for it’s Mesh Distance Field. You can see this in this documentation here: Distance Field Ambient Occlusion in Unreal Engine | Unreal Engine 5.1 Documentation

I made a simple asset like a coffin and this tried tweaking some values, but it can be difficult to get something like this to have 100% completely accurate shadowing. I had a little bit of light leak in mine and this can be remedied to a certain point, but not completely by increasing the DF resolution scale.

In your example above, the light leak at the top looks like it’s partly caused by the overlapping of the top part of the coffin with the lower half. So that part can probably be reduced by just making sure that there is no overlap happening quite like that.

I hope this helps clear up some of the issues you may be seeing.

Tim