Problem with flickering shadows in Unreal Engine 5 when using global illumination not in Lumen mode

I’m using UE version 5.3.2 and I’m seeing a problem with flickering when shading small objects such as grass and also object junctions where Ambient Occlusion usually works

In the video I have demonstrated how this flicker is severe in the “Photo Studio” template as well as in my own project on grass and other objects. This flicker is amplified at a certain angle and at a certain distance.
It is not only in this scene, this scene demonstrates this flaw clearly, I also observe this effect in static grid view.

But this flaw disappears when I activate global illumination mode to Lumen or disable the Distance Field Ambient Occlusion display (Show > Lighting Features > Distance Field Ambient Occlusion)

I looked into this further and noticed that if I turn off Generate Mesh Distance Fields in the project settings, the problem goes away, but I also lose all Ambient Occlusion. Which is not a solution to the problem, because in UE4 I didn’t have a problem with this setting

I ran Unreal Engine 4 and created a new scene there, I didn’t have this problem there. I also downloaded Unreal Engine 5.2.1 and created a new “Photo Studio” scene there. In this version of the engine, the problem was less noticeable compared to UE 5.3.2 (shown in the video)

And it is really annoying when working in Unreal Engine 5, if you have any ideas to solve this problem I will be insanely grateful, as I faced it from the first launch of UE 5.

I am using a Palit GeForce GeForce RTX 3060 Ti Dual GDDR6X graphics card
I have used different dravers for the video card, updated them and for a long time checked if the problem disappeared, but it did not disappear

I have a video on YouTube demonstrating this problem: https://youtu.be/U25HdxYJkms






I searched for a solution to this problem and found the cause, it might be a UE5 bug, but if you switch the Skylight actor mode to Stationary, the problem should go away.

But I’m not sure if this is an absolute solution to the problem, because as I noticed not all users have this problem with shadows if they use Global illumination = none

This is not a solution, as in Unreal engine 4 I had no such problems when using movable mode.

The only way I found that doesn’t solve the problem but hides it, I change my skylight settings to (SkyLight > Distance Field Ambient Occlison > Min Occlusion = 1). And the shadows become less they stop flickering, but then there are artifacts when you look closely, I showed in the screenshot below



The problem also disappears when I create a raytraced project and set the shadows value in the skylight component to raytraced shadows. But my fps drops, and this is not a solution to the problem, because Unreal engine 5 should display normal shadows by default

At this point I realized that the problem is “Generate Mesh Distance Fields”, but this option is also in UE4, but then what is the problem? (This problem does not occur in UE4).

UE5 uses a new technology called Lumen which works through Software Ray Tracing which was not present in UE4, it looks like Epic Games decided to combine Generate Mesh Distance Fields with Lumen, that’s why the shadows are generated so horribly. The Generate Mesh Distance Fields option is now under Software Ray Tracing, not Lightning as it was in Unreal engine 4.

Generating occlusion this way happens when you use the Skylight actor on your scene in Movable mode, don’t try to switch the Skylight mode to another to solve the problem because you will lose the quality of the dynamic shadows on some objects, most of the guides for setting the light mode builds on Movable. And the Env. light mixer window uses movable mode by default

The only thing Epic Games should do is give the optional Generate Mesh Distance Fields that was in Unreal Engine 4 and refine the current technology.

The only thing I have come up with so far is to disable Generate Mesh Distance Fields and use in its place Ambient Oclussion which is in the PostProcessing component of the scene, increase its intensity to minimize the difference, with this approach you will also slightly improve performance.

I’ve spent over 25 hours analyzing this problem and I’m exhausted to be honest



Update: It’s better not to disable this technology, as it affects other aspects, you just need to disable Distance field AO using the command: r.distanceFieldAO = 0

This is how you save Distance Field shadows in the project

But this is also not a solution to the problem. In Unreal Engine 4, all these technologies worked without problems.

This is just a way to avoid the problem

Car on screenshot have shadows if you dont turn off “Generate Mesh Distance Fields” in project settings:


So, this problem is very rare, I talked to no more than 8 people who had it and none of them solved it. No matter what we change, nothing changes, and if there are changes, it is a victim of global settings. Surprisingly, this problem manifests itself at the beginning of any project, as if the reason is not in UE5 but in the system itself, but again not. Me, you and many people have updated the drivers for the graphics card and also updated Windows. But there are no changes, and there are no problems in the games either.

To be honest, I’m at a dead end, I don’t understand where the problem is coming from, and I don’t even understand how to contact support, because there’s nothing to explain. I’ll ask my friend to turn on the same scene on his laptop and see the result.


And yes, in the usual “Blank” level of Product Design, surprisingly, the problem with flashing light is removed by simply disabling Lumen in the Post process and adding SkyLight to the scene. And the advice that you wrote above with disabling AO will really work, but not to the end, and for obvious reasons this is not the correct solution to this error. I’ll attach a video when I turned off AO, is that the same for you? It also seems to me that this problem is not always the same, but it is always impossible to fix. There is almost no such problem in other projects, although the settings are the same there. One such project is a simple blank that I took from an upcoming tutorial from pwnisher https://www.youtube.com/watch?v=uHqINLAi-1k&t=2s

Then you and I have a very different memory of UE4, because this has always been an issue with DFAO.

The reason switching your skylight to stationary works is because DFAO is only applied to shadowcasting moveable skylights. The same applies to disabling mesh distance fields, DFAO will not render if there are no mesh distance fields and thus the problem goes away.

Cool, thanks, but what to do with these artifacts? They can be influenced through Screen Space Reflections, and then not to the full extent. Similar artifacts appear on the screen when there are objects in the frame
777

I didn’t think it was encountered in UE4, please describe in detail your problem with DFAO in UE4. You are right, mesh distance fields are directly related to DFAO

You can make a bug report on the official Unreal Engine site, there you will need to specify the log files of your project, I have already made a detailed bug report with this problem.

If you suddenly find people with the same problem, then draw their attention to this post, maybe we will find a solution to the problem together, or write their own bug reports to attract the attention of the creators of the engine

If you mean the weird shadow under the car, I’ve encountered something similar.
Could you share a picture where you have flickering shadows on the same scene?

In Screen Space Global Illumination mode i have the same artifacts.


Experiment with these sliders in the screen space reflection settings in the post processing component

It’s the same issue you originally posted. It has always existed, even in UE4. It may have looked different because the distance field representation in UE5 is sparse and higher resolution, but it has always been there

It’s typically most noticeable on foliage but it can happen to anything.

Yes of course, here are my flikers)

My friend also showed his scene, and he has exactly the same problem! Although he used to work on UE4 and about 2 weeks ago he switched to version 5.

I was also advised to render or assemble a build and see what happens.

Wow, your flickers are exactly like mine!

Thank you for bringing this scene to other people’s attention and asking them to test it out for themselves, it would be cool if you also write a detailed bug report to epicgames, and maybe we can influence this in future updates

I tried creating a build of the project, but in the build my flickering problem persisted

Just because I socialize and see people who have the same problem as me doesn’t give me a reason to be discouraged, I’m not the only one

1 Like

Alright, the problem partially disappeared with the advent of version 5.4, it is interesting that now when you remove the Lumen method in PostProcess, everything becomes the same as before. But unfortunately, artifacts in reflections and on meshes at a certain angle have not gone away. I also sent a detailed bug report. Let’s keep experimenting!

1 Like

I also investigated the ue5.4 preview version and the problem still persists. I think this is the best time to submit a bug report, because epicgames will be working on UE5.4 now

2 Likes

I had a maybe related issue: have you tried disabling shadows denoiser? And/or reflections denoiser?

I don’t think I’ve disabled it and I don’t really know how, but I don’t use ray tracing. And I noticed that in UE4 I have the same problem) So apparently the problem is not with Lumen