Translucent lighting random flickering artifacts

Hello folks

Since we updated to 5.5 we are experimenting random flickering artifacts when lighting big translucent fog planes.

We are currently using 5.6.1, we use nanite, lumen and virtual shadow maps.

We are struggling to narrow the problem down because it’s not easy to reproduce the issue.

We think that the problem comes from the translucent lighting volume because the flickering dissapears when the volume is disabled (r.TranslucentLightingVolume 0).

I found this question that could be related to our problem

[Content removed]

https://issues.unrealengine.com/issue/UE-230633

I don’t know why but I can’t check the contents of the CL 38513097 in p4 to see if we have the changes in 5.6.1

Could you please help us?

Update: if we disable virtual shadow maps (r.shadow.virtual.enable 0) the flickering disappears

Thanks

[Attachment Removed]

Hello,

CL 38513097 is for a different stream, the corresponding CL in //UE5/Main is

CL#38513105 Fixed bad world position for lighting for the translucency lighting volume.

That change is in both 5.6 and 5.6.1.

Is this something that you may be able to reproduce in a template project and share with me? Then I can investigate or escalate this as a bug for further engineering attention.

Otherwise, if a repro isn’t possible, if there’s any way you can provide PIX captures (including draw events and ideally shader symbols if possible, please see “Graphics Issues” in [Content removed] for guidance), that would also be a big help in debugging the issue.

[Attachment Removed]

Hello Alex

Unfortunately I was not able to reproduce the issue in PIX a single time.

I have been trying to do that for the last couple of days without success.

I will continue investigating and let you know what I find.

Thanks

[Attachment Removed]

I was still not able to reproduce it in PIX but I found something interesting.

The flickering can be fixed by disabling the batching (r.TranslucencyLightingVolume.Batch 0).

I will keep investigating.

[Attachment Removed]

The flickering can be fixed by disabling the batching (r.TranslucencyLightingVolume.Batch 0).

That’s interesting, that would narrow the scope to the small portion of code affected by batching in FTranslucentLightInjectionCollector::AddLightForInjection(). Can you add some basic logging in this area or logic to see if the lights or BatchedLocalLights bits are rapidly changing when batching is enabled?

It may also be able to visualize the volume with r.TranslucencyLightingVolume.Debug=1.

I was still not able to reproduce it in PIX but I found something interesting.

Are you unable to catch it when capturing multiple consecutive frames with PIX?

There is a known limitation with VSM shadows cast on translucent materials where flickering that can occur because the translucency volume is low resolution so if there is any movement it can result in a large change in the voxel light levels in the volume.

What CVAR settings are you using for translucency volumes?

[Attachment Removed]

Can you add some basic logging in this area or logic to see if the lights or BatchedLocalLights bits are rapidly changing when batching is enabled?

When it happens, there are 3 local lights, the bits are always the same. One of the local lights is using a light function. I tried to enable/disable light functions and/or enable/disable the light function atlas and the flickering is still there.

There is something really strange about the flickering behaviour. If you just wait some minutes in the same location/same camera eventually the flickering will stop.

Are you unable to catch it when capturing multiple consecutive frames with PIX?

I was never able to reproduce the flickering in PIX. I didn’t have the opportunity to capture consecutive frames with/without the flickering.

This is the reason why it is being so hard to fix the issue. I have been several hours trying to capture the issue without success.

I thought it could be related to -DisableAsyncCompute (PIX is not very stable when async compute is running, I am using PIX 2501.30), but I was able to reproduce the flickering even with DisableAsyncCompute outside PIX.

What CVAR settings are you using for translucency volumes?

r.TranslucencyLightingVolumeDim=32

r.TranslucencyVolumeBlur=0

r.TranslucencyLightingVolumeOuterDistance=5000

r.TranslucencyLightingVolumeInnerDistance=1500

r.TranslucencyLightingVolume.Temporal=0

r.TranslucencyLightingVolume.MarkVoxels=0

r.TranslucencyLightingVolume.AccurateRecLights=1

r.TranslucencyLightingVolume.AdaptToPerspective=0

[Attachment Removed]

Update: I was also able to fix the flickering by disabling the light function in the directional light.

Still trying to reproduce and capture the issue in PIX.

[Attachment Removed]

There was a fix in 5.5 related to a race condition with light functions involving Lumen that might provide some clues as to where those conditions can occur:

CL#36854191 LightFunctionAtlas - fix for flickering light function in lumen due to race condition between GatherAndSortLights and LumenGatherLights tasks.

And this is a change the fixed an issue with directional lights that occurred only on certain AMD cards

CL#30259864 Fix for directional light function resulting in wrong clipping on some hardware due to super large sphere bound.

[Attachment Removed]

Thanks for sharing the changesets Alex.

I will check them.

[Attachment Removed]

We have both fixes. I was able to reproduce the issue without lumen (r.lumenscene.directlighting 0) so I don’t think that Lumen can be creating the issue here.

I have written custom engine changes to ignore the light function of the directional light in the translucency lighting volume injection pass as workaround.

I will continue investigating the issue as soon as possible.

[Attachment Removed]

Unfortunately my fix seems to be not enough. I was able to reproduce the flickering artifacts again.

[Attachment Removed]

Hello,

Sorry to hear the flickering is back. Have you been able to reproduce the issue in a template project and if so, can you share that with me? Then I can also investigate.

[Attachment Removed]

Hello Alex

Unfortunately I didn’t have time to reproduce the issue in a template project. I am a little bit busy trying to take care of other issues. So far what it seems to fix the issue always is to disable the translucency lighting batch optimization (r.TranslucencyLightingVolume.Batch 0).

[Attachment Removed]

We’re seeing this problem as well on our project. We’re investigating, including adding a debug render view for the TranslucencyLightingVolume textures.

[Attachment Removed]

Hey [mention removed]​

Did the same workaround ((r.TranslucencyLightingVolume.Batch 0) fix the issue in your case?

[Attachment Removed]

I got a mail message to notify me that this support request has been closed. This issue is still a problem in our case.

[Attachment Removed]

Hello,

Apologies for the delay. Without a way to reproduce this issue there isn’t much we can do to assist. The UE 5.7 changes in this area don’t look like they would affect this issue. Have you tried enabling r.TranslucencyVolumeBlur=1 and/or r.TranslucencyLightingVolume.Temporal=1 with r.TranslucencyLightingVolume.Batch=1?

[Attachment Removed]

Hello Alex

I can reproduce the issue with r.TranslucencyVolumeBlur=1 and/or r.TranslucencyLightingVolume.Temporal=1.

We will use r.TranslucencyLightingVolume.Batch=0 until we find the problem.

Thanks

[Attachment Removed]

If you are unable to reproduce the issue in simple template project that you can send to us, can you give us access to a development build so we can to try investigate?

[Attachment Removed]

I think so, let me talk with production and with [mention removed]​.

[Attachment Removed]