I upgraded my project from 5.5 to 5.7 and noticed the lighting seems kind of broken now. If I disable megalights it’s fine but I had megalights enabled in 5.5 and it looked good, see comparisons.
Also noticing weird artifacts / blue lines popping with megalights on:
I’m using the exact same lights, materials, settings (for the actors and the project settings). I’m not sure what’s going on, would greatly appreciate some help. Thank you!
Submitted a bug report. You can test the issue yourself:
Create a blank project in UE5.7, enable megalights, add a sphere with point light inside it (set intensity to 160cd).
Create a translucent material with two sided enabled and surface forward shading. Set opacity to 0.5.
Apply the material to the sphere, the sphere won’t be lit properly by the light inside it. Disable megalights and it will work. This worked fine in UE5.5 with megalights enabled.
Same issue with the blue noise/blue lines artifacts with megalights on. UE 5.6 was working fine with megalights on the same project. perhaps a setting thats no longer compatible?
We’re now investigating that blue lines bug. It seems to happen only on NV 50x0 series with specific drivers, so it took us some time to notice it.
As for the translucency, previously translucency wasn’t handled by MegaLights at all, but it was falling back to something else (I guess unshadowed translucency). And yes, shadowing quality is poor for using this on stuff like glass. Something to improve in the future.
Thank you very much for the reply. I’m currently running an RTX 4090 and the latest driver 581.80 if that info is worth something. Blue lines artifact happening. I’m also messing with some Cvars to work around as: r.MegaLight.DownSampleFactor to 0. it seems to help but im not quite sure how expensive it could be or if it’s setting off megalights performance purpose.
That’s weird, I have RTX 4080 with the latest 581.80 driver and I can’t reproduce it. The bug is due to shader compiler not respecting INVARIANT in upscaling shaders, which is unlikely to be different between 4080 and 4090. Is this something what can repro on your side without any special settings? E.g. just in the default Third Person Template if you enable MegaLights and add a local light? I wonder what could be different between our machines.
DownsampleFactor 1 is fine if you intend to run it only on 4090, that GPU is a beast and MegaLights is designed for like a x10 slower GPUs.
I just tried to reproduce it from scratch using the Third Person template in 5.7. I managed to get the issue with a single point light, megalights activated in the project settings and also in the post process volume and some Nanite foliage painted with the Foliage tool. I’ve figured foliage could trigger it faster as is where I got it the most on my project.
The problem only showed up for a minute while I was still tweaking things, and I couldn’t get it to appear again long enough to grab a screenshot. Same on my project, sometimes I have it, sometimes I don’t.
This screenshot is from the same setup, just without the bug, but it shows how I managed to trigger it earlier.
Thank you for your response. For information, I’m on an RTX3080 10GB.
For the translucency, will this behavior be fixed in the future or are there any workarounds? I can’t imagine the light not illuminating the sphere (as shown in my 2nd post) at all is the intended behavior (or else it would mean non-megalights rendering is incorrect)
At the moment MegaLights supports only lighting through a translucency volume, which averages incoming lighting and stores it in a pretty large cells (froxels). With MegaLights on/off it should look exactly the same if you use Surface TranslucencyVolume or similar Lighting Modes in your translucent material.
If you’re using Surface ForwardShading then toggling MegaLights on/off will look different, as this mode evaluate lighting per pixel (through it doesn’t e.g. support local light shadows).
If a light doesn’t affect that translucency at all with MegaLights enabled then it would an unexpected bug, but if affects it in an approximate fashion then it’s a current limitation, which we would like to address in the future.
FYI - I get the blue lines too (it pretty much just looks like a drawn lines grid, I see them intersecting quite often) - not sure if its the same thing. Running AMD 9700 XT. Note it was not occurring in 5.7 preview (5.6.1 was also fine) but in 5.7 release it has been doing it (only thing i did change from preview to release was turn on “generate ray tracing proxy meshes for nanite”. I pretty much get it straight away when turning on megalights, and it resolves when turning off. And you see it straight on landscape (non-nanite). Only tracing against certain meshes seems to do it (or its just more intermittent) (these meshes were ok 5.6 and 5.7 prev) - if i replace said below with a basic cone, or a different plant mesh example (haven’t tried a huge amount of different meshes) - it is all ok, enabling and disabling nanite doesn’t change anything.
No translucency, all standard default lit opaque materials.
Just standard expo height fog (enabled\disabled)
enabling and disabling high quality translucent reflections/refractions in project settings does nothing. Dark black one is (sky light and direction light with “affect world” off, the black is just the landscape below.) Green is just landscape texture for my personal debug.
For the moment i am not using Megalights in this level\setup (one pass pro is fine for the moment)
Thank you, Surface TranslucencyVolume does look the same with Megalights on/off (unfortunately not how I want it to look but it’s good to know Surface ForwardShading behavior might be improved in the future). In the meantime I’ll just use an emissive material on my glass material to try and mimic the look.
Keeping this thread unresolved due to the blue lines bug.
Another thing that seems to affect it is r.MegaLights.LightingDataFormat 1. Setting it to 1 (Float16 RGBA) or 2 (Float32 RGBA) seems to remove the artifacts and r.MegaLights.DownsampleMode 1` works without issue.
Hmm, we tried r.MegaLights.LightingDataFormat 1 but it doesn’t fix those blue lines on our end. Possible it’s some kind of a different issue, but I’ve never seen any other complaints about it. If you have some *simple* repro we would take a look.
I discovered the issue goes away when disabling r.MegaLights.DirectionalLights 0which I acknowledge was marked experimental. I didn’t spot the issue when I first enabled it plus the symptoms are unusual so I didn’t think to check it.
edit: I spoke too soon. Disabling r.MegaLights.DirectionalLights does not fix it.
I noticed other weird artifacts with`r.MegaLights.LightingDataFormat 1` on a vanilla empty level with basic env lights, see below.
This is with antialiasing disabled so the glitter effects are more pronounced.