How to solve light bleed

Heya and thanks for checking this out. I’m not a lighting specialist but I need to wear this hat for a second. I’ve run into an issue with light seeming to shine through walls and coagulate in corners. I honestly have no idea why and was hoping someone could point me in the right direction. The walls are around 20mm thick.

image

1 Like

Hi thanks for the reply.
Is there some way around this without altering geometry? The game is a armored vehicle simulator so it’s impossible for us to simply make the walls thicker unless we scale up the entire scene to something like 10x.
Posted this before reading so forgive me if something in the document covers that.

Edit: Ok I’m going to try hardware ray tracing like the document suggests. Do you by any chance know what the performance difference is? Or compatibility for that matter.

It’s very dependent on the scene geometry, a couple years ago when UE5 was in early access Epic stated that they typically find hardware raytracing is 50% more expensive than software raytracing. It has likely improved since then though as Epic is trying to reach performance parity with software raytracing (not there yet but… thats the goal). If your scene is just one big mesh, or if you’re overlapping meshes a lot then it can get quite a lot more expensive.

Hardware raytracing is accelerated by a bounding volume hierarchy, and it has to test all the meshes with overlapping bounds. If you’re on 5.3+ then it has an instance overlap debug view you can use to find problem areas:

The more your instance overlap (shown in red) the more costly you can expect the raytracing to be. This is from the Electric Dreams demo and is a particularly egregious example, mostly because it is kitbashed and full of foliage.

Lumen itself also has its own debug views but these are for troubleshooting lighting issues, not performance.

Thank you that was very helpful. Sadly the it didn’t solve the issue, and even if it did the overlap performance implications might make hardware raytracing prohibitive for us. No easy answers it seems. We have large open world type maps with a lot of foliage.

Screenshot for posterity

No chance you can make out something I’m doing horribly wrong here?

Not sure sorry.

My guess would be it is still the walls not being thick enough. Even with hardware raytracing, lighting will still leak through the walls if the wall becomes thinner than the texels in the surface cache.

Here’s a video illustrating this:

The wall is a 1m cube rescaled, it starts at 0.02 scale (20mm) and is leaking like crazy in the corners. Gradually increasing the thickness shows the leaking disappearing.

At the end of the day… Lumen just requires thicker walls.

Hi, thanks again for the continued helpfulness. Is there by any chance a way to change the texel size / would that help resolve the issue?

Not that I’m aware of

Shame, thanks anyways, I’ve taken all the time I can on this, another team member has been passed the torch so I can get back to my regular work.

I skimmed through all of this, so I may have missed this suggestion, but have you tried using Hidden Shadows?

The mesh is invisible, but it still casts a shadow.

Unsure if this technique will work for your case, but it’s worth a try.

(To be clear, you set the mesh as “Hidden In Game”, then you check “Hidden Shadow?” as TRUE)

Another team member found a solution, half by accident if you believe the luck of that. It’s similar to what you’ve described. We built a shell around the tank with cutouts for windows. The shell is just a 0% opacity mask. For some reason this stops the light leak. It’s not a perfect solution but we can work around it by disabling the shell mesh based on whether the player is sticking their head out the tank.
I will try you suggestion though Leomerya, just in case it helps cut down on the overdraw slightly.