Hello, I have noticed that my foliage has been doing this weird artifact only when the camera is still. If i begin to move the camera the blue glitching stops.
This is with megalights + nanite.
Any insights on how to fix it?
EDIT: I found out that this happens also with hair strands but the artifacts are bright white
Checking around the community, this issue has popped up from time to time, and it boils down to the way Megalights is operating.
The feature doesn’t calculate lighting on every single frame. Instead, it casts multiple rays, then stacks multiple frames together to smooth out the shadows. So, when your camera is perfectly still, UE will just keep stacking frames on top of each other. And since grass blades and hair strands are quite thin, lighting will tend to bounce wrong, and generate the artifacts you are seeing. Then, when you move, the engine discards the frames and starts over, making the blue stuff dissapear.
To fix the problem, there are a few parameters to test around:
Changing the lighting data format to either Float16 RGBA or Float32 RGBA, using r.MegaLights.LightingDataFormat 1 or 2
There’s also the option to adjust Megalights’ sample count, test with r.MegaLights.NumSamplesPerPixel 2
Outside of Megalights, it’s worth testing to adjust your scene’s current AA setting. Go to Project Settings > Rendering, and test with both TSR and TAA.
Thank you for the help. r.MegaLights.LightingDataFormatis not working to fix those. r.MegaLights.DownsampleMode at 0 is working but i want to leverage that cvar for scalability so it’s not a good solution for now r.MegaLights.NumSamplesPerPixelDoes not work.
I noticed that any screen percentage value that is not a multiple of 5 causes this issue, I will report that in the thread you have linked, thanks!
Nevermind i was trying on a 5.7.2 build, i read that it got fixed in 5.7.4. I will try to update and see if it is actually fixed. Thanks for the help