Black Streaks after switching to Forward Rendering.

Hi guys.

I’m experiencing some weird issue after changing the renderer to forward shading.

While the visuals overall have gotten much closer to what I’m looking for, the lighting in my Subway level is now creating some weird artifacts on the ceiling but especially on the floor.

After some tests, I was able to narrow it down to the lighting itself. If Im using stationary spot lights and to a much lesser degree point lights, I get black streaks that show up in the editor and the pie window. They appear randomly for half a second and then disappear.

When using only static lights though, the issue disappears. Ive tried many other things, using fewer lights, changing the position and attentuation. I recompiled all shaders. Nothing worked.

Does anybody have an idea what I could try to remedy these streaks?

The last image is my player flashlight, which is a simple dynamic spotlight without shadows. That also creates some weird shading around the cone, all which I didn’t have when using the deferred renderer. Not sure what’s going on there.

Hello there @ut20040x0r!

Checking around the community, I think the main problem here is that you are clashing with a hard limit from the engine. UE5 allows four stationary lights max in a given area, and when going for the fifth, that one gets turned into a dynamic light. That overlap may result in glitches, like the line artifacts you are seeing.

To confirm if your lights’ radius are overlapping, open the View dropdown, go to Optimization Viewmodes, and enable Stationary Light Overlap:

And if you have too many light, it should look like this, with the excess sources marked with an X:

Now, let’s cover a few ways to resolve the problem. First of all, try reducing shadow casting on lights that don’t need it, or are not generating a big impact in your scene. Do this by selecting a light, search for “Cast Shadows” in the details, and uncheck it:

image

Next, play around with the light’s attenuation radius. All lights in your scene have a sphere of influence, and that is the critical part that should not overlap with others. On details again, look for Attenuation Radius, and reduce it’s value:

image

Finally, if any of your lights is more like an ambien fill, and it’s not meant to cast hard shadows on the hallway, switch those lights to Static, so they just bake into the lightmap, and don’t count towards your shadow budget.

Hope this helps, and good luck!

1 Like

Hi there @brs-sebascova
Thank you for the tips, sorry about the late reply

I managed to get rid of the streaks, with reducing the amount of lights in the scene.

The weird black cone of the player spotlight however remains, but I found out what is causing it. I’m using a movable spotlight as the player flashlight with a light function that has a simple flash light texture in it. This light function is causing this weird blackening of the cone. When I remove the light function, the light works as intended.
The issue only happens when I activate the light when looking at the level darkness, in parts of my level where there is no skybox or geometry yet and then move the player character with the activated light into the lit part of my level. It works fine when I’m only using the light in the lit parts.

Could it be that this will simply go away as I build my level further and remove any of the level darkness? It is only happening in this one level, where there are some openings, so I suspect this is the case.

Anyway thank you for your tips, the streaks were really bad but they’re gone now.

Hello again! Glad that the main issue is solved!

As for the spotlight’s strange behaviour, I think you nailed the answer already. Since the issue triggers specifically on a level that still has open geo and not fully enclosed, the light can reach a point where it has no surface to project, generating the black effect on the cone. I’m sure that once you get that level fully closed, the issue will dissapear on it’s own.

Yes, closing the level off with geometry fixed my issue. Everything’s fixed now.

Thank you so much for help @brs-sebascova

1 Like