UE 5.4 crazy shadow flicker in lumen

Hi guys,
I’m having some shadow glitches in my project and I don’t know why
I’m using Hardware raytracing and virtual shadow map and nanite and tsr AA
is anyone can help me?

the glitches are more visible during playmode

What’s your system specs?

AMD ryzen 9 5950x 16 core
32 GB of Ram
RTX 3090

and thank you very much to answer my post. I 'm felling quite exhausted to find a solution just me alone, it’s been more than a week that i tried to solve this issue before ask help :slight_smile:

guys still in trouble,
disabling the hardware shadow help a bit but i don’t have clue
the assets are all from megascans in virtual texture all scattered in PCG.
no crazy BP or anything in particular
I tried to disabled the GI but it’s not coming from there , looks all coming from the shadows and just in play mode
I’ve got 34/30 FPS in full res without DLSS so the gpu still can handle it decently
same problem in 5.3 and 5.4
I tried also to redownload all the assets and rebuild the pcg in a new level… nothing

Yikes! I have not seen that one before.

It looks like you already tried disabling Lumen. Can you try and disable TSR as well or just switch to TAA? And this happens only in Play? Is this Virtual Shadow Maps? If so can you try and increase r.Shadow.Virtual.MaxPhysicalPages as a test?

Hey Shaun
Thanks to looking on it

i tried already to increase it,
in this video I disable hardware shadow raytracing is slighly better but crazy anw
try to disable tsr still there,
If I use DLSS is covered by the AA but still there.

yes I’m using virtual shadow map

increasing the GI quality, nothing

delete any post process… nothing.

it’s not just in the foliages, it’s everywhere!
yes there are a lot of asset instanced in PCG but fps are still high
I notice if i incerase the rendertarget of my water sim it’s get worst b

man… I’m desperate ,A whole island fully detailed , months of works …useless
in this video it’s just one direct light

I really need help

Ok so if you have Lumen disabled and just one light with VSMs it happens but only in Play? I am trying to figure out if this is a Lumen issue or a VSM issue.

Does this still show up if you visualize the VSM “shadow mask”?
Does it still happen at 100% custom scaling in the viewport?
Does it still happen with r.shadow.virtual.smrt.adaptiveraycount 0
Can you try and switch to RT shadows rather than VSM as a test and see if it still happens?

Thanks Shaun

i’m not sure How can i do it during the play mode… sorry

Does it still happen at 100% custom scaling in the viewport?

less but it’s there

Does it still happen with *r.shadow.virtual.smrt.adaptiveraycount 0
unfortunately still there

Can you try and switch to RT shadows rather than VSM as a test and see if it still happens?

still there,

it looks like a mix of occlusion and indirect diffuse bounce, I’ve got it in a simple cube in the level
I’ve got an FFT render target in the scene for simulate the wave at the coast line, reducing to a 32 px help a lot but it’s still persistence, almost if something prevent to the lighting to resolve during the tick time

Shadow Mask is in the VirtualShadowMask viewmode.

But I am still confused as to where it is being introduced.

It’s not VSMs or RT shadows that would have solved it.
Have you been able to rule out Lumen? Does it persist when you completely disable Lumen?
If you eject that wave render target from your scene does the problem still persist?

Thanks Shaun
sorry for the late reply, we removed the FFT and it was almost gone, we did some test with the tracing and there is some tick event every one frame per second in the SphereOverlapComponent that cause this delay in the lumen, , could be some box collision overlap component in the scene?

oh man, found the issue and maybe a bug , if a PCG blueprint use a spline and it’s partitioned , unreal create multiple pcg worldActor portion with duplicate the instances overlapping!, if the pcg is not partitioned the instances numbers are correct
for instance a pcg blueprint with a spline generate 1000 instances when it’s not partitioned
if the pcg is partitioned, will create based on the size of the grid N number of pcworldActor with the same amount of instance,
let’s say for example 6 pcworld actor with each actor with 1000 instances for a total of 6000 instead of 1000 and since they are all identical each instances overlapping eachother

that means it’s not possible use partitioned pcg in a contained spline in open world , the partition works just with pcg box volume, if you use spline you could have millions of instances instead of hundreds
do you think it’s a bug or we shouldn’t use splines with pcg blueprint?

Ok so I just posted about this in the one of the internal channels. One of the devs responded.

We had an issue with caching and splines in partitioned setups that is in 5.4.3 (not released yet), so that might be it, but I’m not sure about the duplication aspect of it.
It could also be user error here if they don’t properly partition their data - which is possible here. (i.e. if every partition actor takes the same spline and does something on the spline, then of course it will be duplicated. We have options for this already)

thanks Shaun to take care of this,I really appreciated
I did a test in 5.2, 5.3 and 5.4.2 same result
this pcg are pretty basic so if there is something wrong should be easy to spot from you or one of your dev team

I made an extremely simple blueprint example :

this is a super basic spline pcg

it spawn 33 cubes not partitioned:

if I use the partition option, I’ve got 2 pcgPartitionActors with 33 cubes overlapping each other for a total of 66 cubes

we’ve got this behaviour if we use any type of data spline (self,parent or tag with or without overlapping)
this is not happen of course if I use a simple a Box in the blueprint. the duplication happen just with spline
I looked around in documentation and in internet and this is the most basic workflow I don’t know how we could have a spline and partitioned actor not duplicated

Okay, so it sounds like the thing we’ve fixed in 5.4.3. The workaround until then is to add a get actor data node (with self) and use that for the bounding shape going in the spline sampler, and that should work.

morning Shaun
is that correct?

the pcg partitioned is not generated any point in this way.

NON partitioned PCG works but as stand alone actor not as pcgWorldActorPartition … but we back to square : non partitioned PCG is not suitable for world partition level due they are not generate HLOD. no HLOd means no streaming, :frowning:
and hlods supports just pcgWorldActorPartition (which give duplicate instances :frowning: )

only way I think could works is create several massive PCGVolumes big like your world, rebuild the pcg graph that point to a separated blueprints and let the massive PCGvolumes handle the partitions and create the HLOD :slight_smile:
this way we can fix the duplicate instances but the PCG will not read any blueprint parameters and will not have any custom actor parameter l, bit of a big limitations.