Something is wrong with my shadows.

I’ve been having trouble with shadows for a while now. I thought it would be a matter of light exposure but I have touched everything that occurred to me and there has been no difference. You can also see a trace of pixels with the movements of the moths.
I am attaching a file because a video is worth more than a thousand words.

What am I doing wrong?

What am I doing wrong?

Its the Anti-Aliasing Method. Your using a temporal one either TSR or TAA. Both blend past frames together which is why you’re flickering light’s shadows keep blending into scene(that why they look so bad). That’s also why the moths are ghosting.

TSR and TAA are also used to hide artifacts like hair and Lumen…But they have their own artifacts like blurring the entire image unless the camera is still, and ghosting artifacts(you’re moths).

These methods, including dlss(another temporal filter) have ruined games. Epic Games, Nvidia, pretty much every big studio has basically stated that this is the industry standard.

It’s up to us to make sure that doesn’t happen. Ever heard of Forced TAA?
Use cinematic fxaa. Yeah, you’ll get some shimmering but its why better then idiotic Temporal crap.

1 Like

Ignore Solid Snake, it’s most likely your light actor is too close to geometry, try moving it 5-10 cm further away.

1 Like

I am afraid moving the light actor doesn’t helped. Also, there are interiors where this kind of solution could not be possible.

Same as for as Solid_Snake said. But something did happen when I changed the Anti-Aliasing method.

This happens when an object moves. Even if it is the Player.

Thank you both for responding so quickly.

This light flickering is deliberate for the environmental atmosphere. But the shadows…this happens even if the light is static and the player moves.

You were right. It all was due to the Anti-Aliasing settings. At first it seemed that it wasn’t that but I just didn’t restarted the engine. Once that was done with the new settings ¡Voila! No more bad looking shadows. Thanks!

Ignore Solid Snake

Lmao. Screw Temporal filters and any feature in realtime rendering that dependents on it.

@Idaeus I’m still a little interested in what’s happening with the shadows?

  1. Are you using Lumen and what kind of light is flickering(movable point light?, stationary spot light? etc)?

  2. Are you using distance field/cascade shadows or Virtual Shadow maps? The reason I ask is both have issue depending on how you are rendering you’re meshes(3. see below)

  3. LODs or Nanite? Virtual Shadow maps have issues with Lower poly meshes and/or LOD/non-Nanite meshes

3 Likes

Of course I will answer you, my friend. Maybe you can explain better what was happening.

1- I am using Lumen. If you ask about the flickering light it came from a “Damaged streetlamp blueprint” with a simple randomized emissive material. The flickering shadows appeared with static lights(Some where spotlights, others point lights(It matters?)). Now they no longer exist. You know, they were some kind of pixelated shadows that changed exposure differently.

2- I’m using the first selectable shadow map in the shadow map picker. On Project settings > Rendering. Also, I didn’t mention it but it is important: I’m using 5.1.1

3-LOD’s. Nanite somehow lowered my FPS. I guess I don’t know how to use it correctly.

Thank you once more. Since I changed to MSAA, those problems are part of the past.w

I am using Lumen.

Alrightly. I’ll lay out it all for anyone in the future reading. You know how I mentioned temporal filters? Lumen by itself is temporal but only in the lighting scene.

A more in depth explanation how lumen works and why the lighting is so slow

You can see what I mean when you lower r.Lumen.ScreenProbeGather.Temporal.MaxFramesAccumulated from the default from 10.0 to 2.0 or 1.0.
When at 1.0, its blending VERY few frames together which is why the GI flickers to much.

As for 10.0, it flickers less but still has flickering without a temporal filter like TAA, DLSS, TSR etc. I’m pretty sure Epic Games exspects most people to slap on a temporal filter to hide the 10.0 flickering. I instead bump it up to 25.0 which is the bare minimum on a complex scene to get rid of flickering. But 25.0 does have issues when and object is moving and or rotation. The background lighting will smudge on that rotating mesh. But imo it’s still better than having the whole image blurred.

NOTE: When changing r.Lumen.ScreenProbeGather.Temporal.MaxFramesAccumulated use the console variable plugin and watch the output log because I have typed in the command and the console will react the 25 value resulting in no change.

So because it’s temporal, quick flashing lights will never go from completely off to on. Its always gradual.

a simple randomized emissive material

Ah, Emmisives, especially small and/or bright ones apparently have consistency problems with lumen. You have to keep them dim and large or artifacts will appear.(Lumen documentation and feedback thread).

first selectable shadow map

Okay, that’s fine as long at you have the Distance field shadows replacing the Shadow Maps after they cull from extremely large camera distances. Or that might not matter for you’re project.

-LOD’s. Nanite somehow lowered my FPS. I guess I don’t know how to use it correctly.

Lol, yeah I did a whole post on the performance comparisons. Nanite performance is not better than LODS [TEST RESULTS]. Fix your documentation Epic. You're ruining games. -Anyone reading this needs to see this comparison.

Since I changed to MSAA

If you are not in forward rendering(which you are not since you are using Lumen). MSAA will default to no AA FXAA, TAA and TSR are your only options. And FXAA/cinematic is 30x cheaper than TAA(so free). It will get rid of jaggies. MSAA isn’t doing anything.

2 Likes

Maybe I claimed victory too soon. I switched to FXAA as you said and tried if it worked. However, the bugged shadow returned. So I switched back to MSAA and realized that in the editor everything looks fine until you play the game. I have played with the console commands you provided and saw no apparent change. I tried switching to Screen Space. When playing they reappeared. I’m afraid it’s not resolved yet.

I have played with the console commands

If you saw no difference with a value of 1.0 in the Lumen, then the console didn’t respond. Did the output log ever have “r.Lumen.ScreenProbeGather.Temporal.MaxFramesAccumulated=25” show in green?

Because you are using deferred rendering. Setting the Anti-Aliasing Method to MSAA defaults back to no AA. Only none, FXAA, TAA, and TSR will work. Use FXAA. No AA looks pretty rough which is what 'MSAA" is giving you.

What does your lumen scene look like? Give me a screenshot of the Lumen overview. And what GPU you are using.
Emissive can’t cast shadows so what light can you mark as “invisible” that gets rid of the shadow? Play in editor and go to the outliners and click on the Eye icon on different objects to see what stops those shadows.

EDIT

r.Lumen.ScreenProbeGather.Temporal.MaxFramesAccumulated=25” show in green?

You used the Console Variables plugin to change it right? That will change it for sure.

1 Like

I am sorry for the delay. Thank you for your patience.

I think we are not understanding each other well.
The problem I’m having is with shadows in general. If there is not enough light and it is completely static, strange things happen. A very painful pixelation is formed in sight.
Example in interiors:

Here I have increased the light:

These shadows appear when there is low light and the player is moving. But also with other moving objects. Like for example the moths that I put in the city at night under the street light. See the first video I uploaded.

Selecting FXAA hasn’t changed anything at all. Apparently in the editor there is no longer that error but when you press “Play” it appears again as if nothing had happened.
What makes those shadows disappear is a lot of static light that makes it so that there is no shadow. But in the night level I need shadows and eventually some movement. Like the “broken lamppost light”, to give it more atmosphere.
The streetlight is a simple blueprint:


When I change to FXAA and restar the engine, at first it seems to be solved. But when I play…

I am sure I am doing many things wrong. Also, the Build Light Only option is dissabled with FXAA?

Nvidia RTX 3070 drivers studio updated.

Nope at first. Then I used it and nothing changed.

There’s no point in looking at building light. You’re using Lumen.

I don’t think Lumen will ever play well with flashing lights, because it just doesn’t have enough time to refresh.

I think the only way you’ll get that flashing area working is by turn the GI level right down using a PP volume. By ‘right down’, I mean

sg.GlobalIlluminationQuality 0 ( or 1 )

Basically Lumen is off then, but you still have some screen space GI.

As far as the lighting problems inside go, I must admit, I don’t see anything. You will get some artifacts if you wiggle the camera about a lot :slight_smile:

2 Likes

Yep. I think all your problems are related to Lumen temporal accumulation. Noise, for sure, but maybe also that strange cut flickering (didn’t see before).

Lumen… Is this. You could try lot of cvars, but there are so many. You can try disabling TSR and enabling TAA instead, setting the resolution to Manual an 100% in project settings, and you could also increse the scalability settings to cinematic and enable the editor vsync from cavrs (something like r.vsync.editor 1, I can’t remember exactly).

Oh, and you should increase Lumen speed from post process volume.

1 Like

So far everything I’ve tried has been unworkable.
Even if I turn off Lumen and use Screen Space or None, the shadows still do something weird.
For now I give up, I will turn off the light and I will continue learning. Maybe in the future I will understand why this happened.

2 Likes

For the shadows I would enable ray traced ones. Are you using virtual shadowmaps?

Have you tried disabling shadows on that particular light? Also spotlights are apparently way cheaper.

Thank you all for your response.

What I did is change the blueprint of the flickering material. This way:

Or deleting the Random node and lowering the value to 10 o less.

Now the blink time is slower. so the shadows don’t look as bad as before. It seems that the engine has more time to calculate the lighting and therefore there are fewer anomalies.

But even with this, I’ll dispense with the flicker in the hope of suffering no more issues.
Looked cool but It is not really necessary for the environment.
I will mark this threat as Solved, even if the solution is not exactly what I expected.

Once again, thanks to everyone, especially SÓLíD_SNÁKÉ. I learned some interesting things that I didn’t think of.

1 Like

Also, I noticed that the site where I uploaded the videos deleted them. Next time I will search a better host.

I’ll add some screenshots of what the shadows looked like if anyone has the same problem.


Note that the resolution is 100%, not lowered.

It almost looks like bit depth problems…