Path Tracer - Noise in interior scenes

Hi,

We discovered increased noise in interior scenes when using the Path Tracer. After investigating the issue, we identified the cause and implemented a potential fix.

I created a small PR that adds a console variable which can significantly reduce this noise in many cases. I believe this improvement could be useful for other users as well.

PR: https://github.com/EpicGames/UnrealEngine/pull/14503

Thanks for the PR! I am curious if you can comment on the performance with and without your change? I’m assuming any perf hit when the method is in used easily pays for itself in terms of improved convergence.

Did you observe any overhead when the method is not in use? Adding an additional TraceRay call causes the driver to reorganize how the code is emitted - which can have hard to predict effects on performance.

We are currently exploring other improvements to how we loop over lights in the path tracer. While this PR will help with strongly occluded directional and sky lights - it is possible to construct other cases that can also show strong noise. We’re hoping to address some of these other scenarios as well, but the strongly occluded case is definitely something we want to improve.

Thanks! Keep me posted.

Thanks for these detailed tests! I will be taking a close look at your PR …

Hi Chris,

I did some local tests and the performance is pretty much the same. But over the weekend i will put more jobs with and without the change on the farm to test it and I will let you know.

Josef

Hi,

I apologize for the delayed response. I discovered that modifying the shader code in this way leads to burned-out pixels. The issue is that **LightPickingCdf** is used later in the code, so after selecting a light, it needs to retain its original values. I’ve updated the pull request accordingly.

Regarding render time: adding an extra TraceRay call increases render time by approximately 1–2%. Using the Directional Light Only option results in a 3–5% slowdown. Enabling the All Lights option has a much more significant impact—typically around 30%, depending on the number of lights in the scene. In most cases, using all lights is unnecessary; it’s only beneficial in rare situations, such as when a strong local light is occluded by a large object.

Here are the results from one of our renders:

```

Original average frame time: 5.7795311734567285 seconds

Disabled (0) average frame time: 5.84347692735834 seconds

Directional Light Only (1) average frame time: 5.964287265453463 seconds

All Lights (3) average frame time: 7.458792349352037 seconds

Disabled (0) is slower by 1.11%

Directional Light Only (1) is slower by 3.20%

All Lights (3) is slower by 29.06%

```