MegaLights feedback thread

I updated a project to 5.5 and Megalights is completely greyed out and untickable? I’ll just enable it in a new blank project and get the config out of the new project, but I think you guys should fix it to work with old projects, of explain the reasons why it might be greyed out?

Is it enabled in the project settings? I also found I had to run the command r.MegaLights.allowed 1 in order to make it work; there are also per-light and PPV settings that play a role.

While spotlight direct illumination is visible in mirror reflection, the rectangle light direct illumination isn’t visible in mirror reflection. Both of them megalights enable (default shadow)


rectangle lights seems do not lit the scene in reflections

This isn’t exactly MegaLights specific, more just general RT shadow related… but any chance to have distance field shadows with RT enabled - or is there something else in the works for distant shadows? One of my biggest issues with RT shadows is the lack of shadows on distant objects and terrain due to culling from the BVH.

Virtual shadow maps handle this case very well and I was quite pleased with having basically infinite shadow draw distance, and DF shadows can take over with VSM when dealing with non-nanite for example. Fortunately I can just use VSM on the directional light as this is a non issue for local lights, but if MegaLights is going to be handling the sun in the future too, there needs to be a solution for this imo.

1 Like

Thank you @Krzysztof.N , so anything to expect regarding that silhoutte issue? (I think it will be quite usual to have shadow casting actors placed on top of a tessellated surface).

Confirmed it’s due to the tessellation behind (the floor), but for me it looks like tessellation is supported by MegaLights (which realies on RT, if I’m not wrong), isn’t it?

Thanks

Infinite shadow draw distance was a phenomenal feature- everything in the scene handled without extra setup. Part of me was wondering what about RT shadows with a VSM fallback for maximum quality, baring in mind enormous expense. I’m happy megalights can use screen traces because it does a lot to disguise the limited BVH range, although some artifacts are simply impossible to fix.

Can it be confirmed whether or not the bug of Geometry Collections not casting shadows from megalights will be fixed for 5.5 release?

There’s r.MegaLights.HardwareRayTracing.EvaluateMaterialMode but turns out it was broken in 5.5. Just fixed it, but it’s already after 5.0 cutoff.

It was increased to 65.5k in ue5-main: https://github.com/EpicGames/UnrealEngine/commit/7c65424078817fa35acdeaf1ea80d83a37af3b52

The main issue is that they run their own deferred lighting pass, as strands are pretty thin and need higher resolution than main view. So we need to integrate MegaLights into that pass.

You need SM6 and ray tracing support to enable MegaLights, which is mentioned in the tooltip.

Hmm, I tried to place a rect light and seems to work fine in reflections. Maybe it’s too close to the ceiling or something? Do you have a simple repro, with like boxes and rect light so that we are looking at the same thing?

We plan to support Far Field in order to extend BVH distance at a low cost.

RT doesn’t support tesselation (even path tracer).

I see that it was fixed in ue5-main, but didn’t make it to 5.0. BTW if you disable Nanite then it hould work, as this is a Nanite specific bug.

3 Likes

so it’s gonna be in 5.5.1?!? okay. ima throw the cvar in my launch command tho.

We’re testing out this cool technology.

Currently, Megalights works even without hardware ray tracing support in my project settings.

Is it mandatory to use hardware ray tracing?

I am curious about the difference and structure between hardware ray tracing and software ray tracing.

software raytracing uses screentraces and distance field shadows. i’ve not tested it with many lights tho, so i’ve no idea about performance with lots of that.

welcome to the forum, btw. :wave:

Is MegaLights using the same tech as real-time path tracing?
if not then, Are there any plans for implementing this in the main branch because it seems impressive?
Realtime Path Tracing works really well even when there are a lot of moving lights in a close distance. which seems like a bad scenario with MegaLights.
Realtime Path Tracing also works well with small emissive surfaces. The emissive surface feels like real light source without any size limitation of the emissive surface.

Yes and no. They are very similar approaches executed slightly differently. They both handle direct lighting and shadows in essentially the same way. Nvidia’s path tracing also handles most GI (but not yet from the skylight so it looks kinda terrible outdoors) and some rough reflections, which megalights is falling back onto lumen for.

I bet the difference is mostly due to Nvidia using ray reconstruction for that demo and if that was off they’d behave very similarly with moving lights

And don’t think megalight handles emissive like Realtime path tracing.
On top of that, the real-time path tracing branch also has the option to fallback at lumen for some use cases.

You are comparing two different things. MegaLights only handle direct lighting/shadowing

1 Like

I am just curious to know if there is any chance for integration of real-time path tracing into lumen and megalights.

You can’t integrate path tracing into lumen and megalights because they are two ways of doing the same thing. Path tracing and lumen/megalights are fundamentally about integrating radiance within a scene, determining what lighting should look like from the system perspective. Path-tracing is totally accurate to real life, whereas lumen and megalights take some shortcuts. They aren’t systems that can eb added to each other.

To be clear, I don’t blame you for the confusion. There is so much noise out there in the lighting space nowadays. Think about virtual lighting like a spectrum: There is true, unbiased path tracing on one side, which no production renderer actually uses because it’s terribly slow. Then on the other end are shadowmaps and cubemaps and all that super hacky stuff, which runs super well but looks terrible. And in between you have techniques like lumen, which blend ray-traced radiance gathering with a ton of filtering and probes and magic tricks to create something that looks mostly like path-tracing but actually runs in real-time.

But in the Real-Time Path Tracing Unreal Fest 2024 video, they are making a comparison between “Lumen only” and “ReSTIR enhanced Lumen”.
At minute 16.

let me know if I am wrong but real-time Path Tracing seems superior compared to the lumen and MegaLights in following areas:

  1. “Realtime Path Tracing” can light a whole scene with just emissive material without any actual light source. And there is no emissive surface size limitation large or tiny.
  2. “Realtime Path Tracing” can support 1000s of moving lights very close to each other without compromising the performance. and there is no attenuation limit. so readius can be as large as we want.
  3. “Realtime Path Tracing” doesn’t produce shadow and reflection noise. So high quality shadows and reflections.