# MegaLights feedback thread

**URL:** <https://forums.unrealengine.com/t/megalights-feedback-thread/2051575>\
**Category:** Rendering\
**Tags:** unreal-engine, MegaLights, Rendering, Lighting\
**Created:** [October 3, 2024, 3:36pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575 "2024-10-03T15:36:16Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![ToesK1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/toesk1/32/467115_2.png) [@ToesK1](https://forums.unrealengine.com/u/ToesK1)\
**Post date:** [October 17, 2024, 4:43pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/62 "2024-10-17T16:43:02Z")

</div>

Thank you so much this is really valuable information, I was checking the console commands right after I wrote the last message when I realized that you already put these things in the `r.MegaLights.DefaultShadowMethod` cvar. Thanks again, I will keep testing megalights but atm I’m having a lot of fun 😃

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/f/43f907aa1cefbc4c24567cbbbc19e8e82652b420.png)

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [October 17, 2024, 5:15pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/63 "2024-10-17T17:15:23Z")

</div>

Enabling Megalights from the post process volume with the light complexity viewmode enabled crashes the editor (works fine if you switch _then_ enable the viewmode)

I’m curious how we should be interpreting the light complexity viewmode with megalights. It seems attenuation radius is a lot less important than light intensity, with more intense lighting increasing complexity, but it also increases with specular highlights. Complexity also doesn’t seem to increase on backfaces or shadowed regions.

The specular cost in particular is pretty interesting, as it leads to high complexity on “bowl shaped” surfaces even when they’re only affected by one light…

I guess what I would ask is; How well does the new complexity viewmode actually map to the performance cost of megalights? Are cases with lots of specular highlights or high intensity lights something we need to be concerned about?

Also not sure if it has been mentioned but masked RT shadows, hope this is planned for the future:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/1/1d10e7ed4b120f05320bbaf5b3e80a20c2a15e47.jpeg)

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [October 17, 2024, 6:57pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/64 "2024-10-17T18:57:58Z")

</div>

it does masked materials to some degree using screen traces, like decals, works for close range, like hair cards and things. the screen trace distance is adjustable. does not change much for big scale models, tho. it’s screen space. worldspace traces just hit geometry in the bvh or mesh distance fields. it does not sample the textures (yet).

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/f/fcf87175de5d8824d6aae6bdcd39d5420d74d3a3.jpeg)

this may come at some point tho. cause foliage in the sun (or moon) looks great. but… at night in the city it does not look too good with just polygon shadows, well… yet. i’ll not throw the test screenshot, there. not nice.

---

<div class="post-metadata">

**Author:** ![jblackwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jblackwell](https://forums.unrealengine.com/u/jblackwell)\
**Post date:** [October 17, 2024, 8:00pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/65 "2024-10-17T20:00:40Z")

</div>

I feel like I saw a CVar somewhere that enabled calling the anyHit shader for MegaLights, but it was disabled by default due to the obvious cost increases. (maybe I’m thinking of RT shadows?)

Tangent: do you think it would ever be feasible to create a baking tool that turns alpha-tested geo into a pure geometric representation? E.G feed it a plane with a grass alpha texture and it would output a mesh that just captures the grass. Given the significant performance hits I’m seeing from both nanite alpha-test and the AnyHit shader in RT, I feel like it would be a stellar performance optimization tool.

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [October 17, 2024, 8:25pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/66 "2024-10-17T20:25:07Z")

</div>

a rabbit hole? hmm… well… a bvh programaticly is a tree structure of bounding boxes. you run/trace thru that. at some point you hit a polygon and it’s data or you hit distance field volume data.

on a polygon the uv coordinates could be present and sampled and you need a texture id (memory address) to figure out what alpha texture is on it. then you could use those coordinates to sample it at the hit point. that’s how i imagine it. not accurately developed. just pseudo coding. getting that level of direct metal languange is not hlsl tho.

converting a texture into geometry seems like a mundane task. just create a grid of specified density and don’t generate the polygons below alpha threshold, in the masked material case. lil optimization to merge and smooth continous faces and compact the data. hmm…

---

<div class="post-metadata">

**Author:** ![Arkiras](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arkiras/32/1008648_2.png) [@Arkiras](https://forums.unrealengine.com/u/Arkiras)\
**Post date:** [October 17, 2024, 8:52pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/67 "2024-10-17T20:52:41Z")

</div>

I’ve seen a couple of tools that will do this but they only work on flat axis aligned flat quads.

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [October 17, 2024, 9:19pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/68 "2024-10-17T21:19:49Z")

</div>

hmm… a good modelling pipeline is usually all quads. you gotta do it at the authoring stage then. bake the shadow polygons in maya and deform and split them to look like or fit triangle topo. quads are a lil cheaper interchange format for sure. 4 points, not 6. but pc rasters triangles. and it has kinks. hmm…

(and that’s me dabbling on the nds, which actually renders quads on scanline. crunchy lil machine. :))

anyway… i think we’re over the threshold. is this feedback? or random ideas? not that it hurts…

---

<div class="post-metadata">

**Author:** ![jblackwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jblackwell](https://forums.unrealengine.com/u/jblackwell)\
**Post date:** [October 17, 2024, 10:21pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/69 "2024-10-17T22:21:09Z")

</div>

I think we’ve crossed into random ideas territory, or at least should start putting the conversation in hidden blocks so as not to derail things (we save that for the lumen thread 🙂 ).

That said, the core of this conversation is very relevent: alpha-tested geometry is no longer a performance win, for ray-tracing or visibility-buffer renderers like nanite; if someone on Epic’s tools team could make a conversion tool like they have for nanite displacement, it would make it a lot easier to use things like MegaLights without either content or performance issues

---

<div class="post-metadata">

**Author:** ![jblackwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jblackwell](https://forums.unrealengine.com/u/jblackwell)\
**Post date:** [October 18, 2024, 1:21am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/70 "2024-10-18T01:21:44Z")

</div>

Major lighting bug @Krzysztof.N : In the 5.5 preview build, significant screen-space artifacts exist around POM-enabled materials (same platform as lumen thread):

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/6/1865de23bf27cc654b5704d7ee1f4118291878eb.jpeg)  
They get progressively worse the closer you get to the POM surface, eventually enveloping the whole screen (western pack assets in case you want to replicate):  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/e/55ea08de7be2f8aa9933bad0e12a00aac4672af2.jpeg)

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [October 18, 2024, 5:04am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/71 "2024-10-18T05:04:13Z")

</div>

POM seems to be working mostly fine for me. The ray traced screen traces can actually deal with pixel depth offset (like a better version of contact shadows, which could also do the same) and look great as long as the light source is on the screen…

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/c/e9c72a39f74dd0cb6f3f3b9d87fa3ddf867c3383.jpeg)  
Once the light source is off screen, the usual self shadowing issues arise where rays miss. (or an occluder can cause missed rays too)

Is that perhaps the artifact you’re experiencing?

It would be nice if we could enable an object to cast _only_ screen traced shadows with megalights maybe - just like you can with normal screen space contact shadows.  
Could be useful for POM/PDO and small objects like animated foliage we maybe don’t want in the BVH but might still want these screen space shadows on.

---

<div class="post-metadata">

**Author:** ![oossoonngg](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/oossoonngg/32/915149_2.png) [@oossoonngg](https://forums.unrealengine.com/u/oossoonngg)\
**Post date:** [October 18, 2024, 9:49am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/72 "2024-10-18T09:49:50Z")

</div>

greetings!  
i am interested in the supported platforms: i presume it will work somewhat reliably on recommended Linux (Ubuntu). what about Macs?  
thanks for the hard work, fiddling with it on win currently, future definitely looks bright

---

<div class="post-metadata">

**Author:** ![Krzysztof.N](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Krzysztof.N](https://forums.unrealengine.com/u/Krzysztof.N)\
**Post date:** [October 18, 2024, 3:28pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/73 "2024-10-18T15:28:00Z")

</div>

> [@x-man\_0097](#):
>
> I am getting a bug using megalights with metahumans. When i turn on megalights in post process, the textures on metahuman turn white. It is very weird, the light is working, the indirecty light shows textures on the metahuman correctly but the direct light renders it completely white. Is there a known limitation or issue with megalights with metahumans?

The only known limitation is that MegaLights doesn’t support strand based hair.

Seems to work on my end. For some reason MetaHuman has missing arms in RT BVH, so no shadows from arms, but otherwise works fine. Any specific repro steps?

 ![ScreenShot00009](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/4/2646d15360f4dc0ca34852945a5591f9802ea581.jpeg)

> [@Arkiras](#):
>
> Enabling Megalights from the post process volume with the light complexity viewmode enabled crashes the editor (works fine if you switch _then_ enable the viewmode)

Didn’t crash on my end, so I guess this is either already fixed bug with MegaLights crashing when Lumen is disabled.

> [@Arkiras](#):
>
> I’m curious how we should be interpreting the light complexity viewmode with megalights.

It doesn’t work correctly, so I wouldn’t read much into it.

---

<div class="post-metadata">

**Author:** ![haohahabu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haohahabu/32/1032257_2.png) [@haohahabu](https://forums.unrealengine.com/u/haohahabu)\
**Post date:** [October 23, 2024, 6:36am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/74 "2024-10-23T06:36:50Z")

</div>

In the current test, more than 4096 lights in the cone will appear light loss, is there any parameter that can extend this upper limit, which is important for the night scene of super cities, if not, will the future consider expanding the number of lights to support more?  
The above text is from the translator

---

<div class="post-metadata">

**Author:** ![Krzysztof.N](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Krzysztof.N](https://forums.unrealengine.com/u/Krzysztof.N)\
**Post date:** [October 23, 2024, 2:00pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/75 "2024-10-23T14:00:50Z")

</div>

Yes, at the moment there’s a 4095 hardcoded light limit **in camera**. There’s no parameter to extend it, but it’s a relatively simple change in code, so we will increase it for 5.6. I just didn’t expect that anyone will reach that limit :).

Now I’m curious how many would you realistically need? Specifically how many **in camera**? And how many **in scene**?

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [October 23, 2024, 11:12pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/76 "2024-10-23T23:12:54Z")

</div>

Any thoughts on the possibility of allowing casting screen traced shadows only as an option? I was really impressed by how they compared to the old fashion contact shadows and it may be able to fill a similar role.

---

<div class="post-metadata">

**Author:** ![haohahabu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/haohahabu/32/1032257_2.png) [@haohahabu](https://forums.unrealengine.com/u/haohahabu)\
**Post date:** [October 24, 2024, 3:15am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/77 "2024-10-24T03:15:29Z")

</div>

8.3k in camera ,15.8k in scene. make some trick for lights, used too much time,megalights is very important for this

---

<div class="post-metadata">

**Author:** ![Miguel1900](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/miguel1900/32/1010694_2.png) [@Miguel1900](https://forums.unrealengine.com/u/Miguel1900)\
**Post date:** [October 24, 2024, 5:55pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/78 "2024-10-24T17:55:55Z")

</div>

Oh, is this still happening? I [reported it long time ago](https://forums.unrealengine.com/t/lumen-gi-and-reflections-feedback-thread/501108/1588) and it looks like an important thing.

Stunning work, btw @Krzysztof.N ! Thank you very much for making this possible.

PS: Megalights num samples per pixel doesn’t allow a value of 8? I don’t notice any visual nor performance difference between 4 and 8.

Noticed too some silhoutte artifacts in some unknown situations, depending on angle (using new megascan unfinished building):

Fine:

 ![Captura de pantalla 2024-10-24 201035](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/b/54b562205650f7df1c8e41643a3ac7538f440fe7.png)

Artifact (just a slight angle difference). The effect can be even much more noticiable/longer than in this screenshot:

 ![Captura de pantalla 2024-10-24 201015](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/e/08ebbf0c3adb48b73afe6d2b12bf7e18f69d47b2.png)

I think it’s related to Nanite Tessellation behind. It also happens at some screen edges.

---

<div class="post-metadata">

**Author:** ![Krzysztof.N](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Krzysztof.N](https://forums.unrealengine.com/u/Krzysztof.N)\
**Post date:** [October 30, 2024, 3:06pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/79 "2024-10-30T15:06:28Z")

</div>

[MegaLights docs](https://dev.epicgames.com/documentation/en-us/unreal-engine/megalights-in-unreal-engine) are now online.

> [@Miguel1900](#):
>
> PS: Megalights num samples per pixel doesn’t allow a value of 8? I don’t notice any visual nor performance difference between 4 and 8.

No, at the moment it’s limited to a few values which are listed when you enter that cvar without any value.

> [@Miguel1900](#):
>
> I think it’s related to Nanite Tessellation behind. It also happens at some screen edges.

That sounds like your RT representation mismatches raster, and when screen space traces fail you see shadow from that RT representation. Either need to adjust the Nanite fallback mesh or it’s due to displacement which isn’t supported by RT.

---

<div class="post-metadata">

**Author:** ![AntoineD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AntoineD](https://forums.unrealengine.com/u/AntoineD)\
**Post date:** [October 30, 2024, 5:01pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/80 "2024-10-30T17:01:42Z")

</div>

Was so excited for this for an upcoming project at our studio, then discovered it doesn’t support strand based grooms and hair. I hope they get support in the future.

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [October 30, 2024, 5:15pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/81 "2024-10-30T17:15:56Z")

</div>

i’ve not worked with grooms yet. are the strands full cylinder geo or screen aligned/“billboarded” loops with a gradient? aka some sort of “line” geo.

cylinders are lot of geometry to cut into small pieces for the bvh. not gonna be performant. screen aligned i imagine could happen at some point. haircards - while noted to avoid masked materials - are the way for now. hmm…

[Previous page](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575.md?page=3)

[Next page](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575.md?page=5)
