# 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:** 9

<div class="post-metadata">

**Author:** ![Maenavia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maenavia](https://forums.unrealengine.com/u/Maenavia)\
**Post date:** [December 9, 2024, 2:52am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/162 "2024-12-09T02:52:10Z")

</div>

@Krzysztof.N I saw that you are working on the main branch on supporting directional light with Megalight. Is there a plan to handle the WPO of foliage with Nanite meshes? This was something that was impossible with the “classic” ray-traced shadows.

---

<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:** [December 9, 2024, 3:41am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/163 "2024-12-09T03:41:50Z")

</div>

You needed to enable Evaluate WPO in the settings of the mesh.

---

<div class="post-metadata">

**Author:** ![Maenavia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maenavia](https://forums.unrealengine.com/u/Maenavia)\
**Post date:** [December 9, 2024, 3:55am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/164 "2024-12-09T03:55:36Z")

</div>

This option does not work at all with Nanite meshes, ray-traced shadows do not evaluate WPO with Nanite meshes, even with this option enabled. It only works on “normal” static meshes (non-Nanite).

---

<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:** [December 9, 2024, 4:27am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/165 "2024-12-09T04:27:22Z")

</div>

Oh, yeah, I think I faced that issue before. Sorry, didn’t remember!

---

<div class="post-metadata">

**Author:** ![TiagoCostaUE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TiagoCostaUE](https://forums.unrealengine.com/u/TiagoCostaUE)\
**Post date:** [December 9, 2024, 8:32pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/166 "2024-12-09T20:32:48Z")

</div>

Support for WPO evaluation on Nanite fallback meshes was submitted last week to UE5/Main branch and will be included in 5.6 ([https://github.com/EpicGames/UnrealEngine/commit/6eabc9b07a5a9887411ec6ac87d3c2039124af6f](https://github.com/EpicGames/UnrealEngine/commit/6eabc9b07a5a9887411ec6ac87d3c2039124af6f))

---

<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:** [December 9, 2024, 8:46pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/167 "2024-12-09T20:46:39Z")

</div>

will this work for “lowpoly” instanced static meshes too?

j/k. the instance hbv build times are a lot. hmm. i’m thinking/wonder if the wpo displacement could be computed at the hit point. maybe with a fixed world seed. sync the shaders in frame. this gonna take another performance hit tho, i guess.

yeh… wip. 🙂

---

<div class="post-metadata">

**Author:** ![Maenavia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maenavia](https://forums.unrealengine.com/u/Maenavia)\
**Post date:** [December 10, 2024, 1:35am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/168 "2024-12-10T01:35:17Z")

</div>

Awesome! I saw the push on GitHub this afternoon, and I’m really excited to test it 🙂

---

<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:** [December 10, 2024, 2:17am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/169 "2024-12-10T02:17:42Z")

</div>

I assume screen traces should (hopefully) dramatically reduce the cost of having skinned/dynamic meshes like foliage when on screen since I think that should mean that even with evaluate WPO in RT off, they should look correct while on screen. You can probably get away with evaluating WPO only for large casters like trees which have a high likelihood of casting shadows from off screen, and even then only at relatively close distances.

I still strongly think we need a setting to allow/disallow megalights screen space shadows independently from RT shadows. They are very good and I would want to be able to get screen space shadows from objects that don’t make sense to have explicitly in the BVH (like many foliage instances) if possible.

For example, if I have a hundreds of thousands or millions of blades of grass or more on screen it would be unrealistic to enable RT on them - but due to small screen size, they should easily be shadowed in screen space only. The same can be said for small trash, leaves and scree on the ground or sometimes mesh particles.

---

<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:** [December 10, 2024, 4:58am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/170 "2024-12-10T04:58:24Z")

</div>

yep. on screen objects should use screen traces with wpo. the offscreen objects are still a bit of trouble to understand. those shadow rays gotta be cast into the bvh and evaluated. and dynamic geometry in the bvh naturally requires a rebuild of parts of it.

---

<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:** [December 10, 2024, 6:08pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/171 "2024-12-10T18:08:36Z")

</div>

not sure what “fixed it” means in this context.

5.5.1. all new shaders compiled. “r.MegaLights.HardwareRayTracing.EvaluateMaterialMode 1” in the console or begin play.

raytraced shadows of masked materials are still broken. 🤨

 ![1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/0/d/10df7d8f7ef430d31d7b480278d3ee20504582fd.jpeg)  
 ![2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/d/2/6d295e6cdf3a5e5f858857f7cdb29ea36fdf3721.jpeg)  
 ![3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/e/08e94bd66b9550b05bf049e5c118bcb4276c27a2.jpeg)

screenshot 2 (middle) did work at some point in 5.x before. so…

---

<div class="post-metadata">

**Author:** ![jgharding](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jgharding](https://forums.unrealengine.com/u/jgharding)\
**Post date:** [December 10, 2024, 9:59pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/172 "2024-12-10T21:59:31Z")

</div>

Many thanks, the 5.5.1 hotfix has patched this as predicted 👍

---

<div class="post-metadata">

**Author:** ![3DMystic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@3DMystic](https://forums.unrealengine.com/u/3DMystic)\
**Post date:** [December 11, 2024, 10:47am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/173 "2024-12-11T10:47:48Z")

</div>

I have a problem with shadows. My version is 5.5.1. When I select raytracing, the shadow of the object with opacity mask material appears limited. But when I select virtual shadow map, there is no problem, but I need to use raytracing.

 ![bug](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/0/b50022d78787c9a18bba125aefeabf141e5bd9c9.jpeg)

---

<div class="post-metadata">

**Author:** ![aimbotRaz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aimbotRaz](https://forums.unrealengine.com/u/aimbotRaz)\
**Post date:** [December 12, 2024, 10:23am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/174 "2024-12-12T10:23:50Z")

</div>

> Yeah, crash with `LightFunctionAtlas::BindGlobalParameters()` was fixed recently and will be included in the new hotfix.

Hello, the crash is still present in 5.5.1. When will the fix be released? Is there a github commit that fixes this that we can cherry pick? We cannot make a packaged build of our game since it crashes constantly

---

<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:** [December 12, 2024, 1:37pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/175 "2024-12-12T13:37:35Z")

</div>

AFAIK this should be included in the last hotfix: [https://github.com/EpicGames/UnrealEngine/commit/db752a8781e670a853a4c5c7d49d2b110e2fefc0](https://github.com/EpicGames/UnrealEngine/commit/db752a8781e670a853a4c5c7d49d2b110e2fefc0)

---

<div class="post-metadata">

**Author:** ![aimbotRaz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@aimbotRaz](https://forums.unrealengine.com/u/aimbotRaz)\
**Post date:** [December 12, 2024, 1:47pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/176 "2024-12-12T13:47:15Z")

</div>

I’m still getting this when loading a level though

```auto
[2024.12.03-14.30.57:076][864]LogWindows: Error: === Critical error: ===
[2024.12.03-14.30.57:076][864]LogWindows: Error: 
[2024.12.03-14.30.57:076][864]LogWindows: Error: Fatal error!
[2024.12.03-14.30.57:076][864]LogWindows: Error: 
[2024.12.03-14.30.57:076][864]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000008
[2024.12.03-14.30.57:076][864]LogWindows: Error: 
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7acfd6ce0 MyProject.exe!LightFunctionAtlas::BindGlobalParameters() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Renderer\Private\LightFunctionAtlas.cpp:990]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7ad2afa8b MyProject.exe!FDeferredShadingSceneRenderer::RenderMegaLights() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Renderer\Private\MegaLights\MegaLights.cpp:1316]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7acc31a64 MyProject.exe!FDeferredShadingSceneRenderer::Render() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Renderer\Private\DeferredShadingRenderer.cpp:2845]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7ad920f91 MyProject.exe!RenderViewFamilies_RenderThread() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:5431]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7ad8e00a7 MyProject.exe!`FRendererModule::BeginRenderingViewFamilies'::`96'::<lambda_3>::operator()() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:5734]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7ae2402b1 MyProject.exe!`FRenderThreadCommandPipe::EnqueueAndLaunch'::`5'::<lambda_1>::operator()() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:1541]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7ae25d1aa MyProject.exe!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),1> >::ExecuteTask() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:635]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7a9931ec3 MyProject.exe!UE::Tasks::Private::FTaskBase::TryExecuteTask() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Core\Public\Tasks\TaskPrivate.h:505]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7a9927f27 MyProject.exe!FNamedTaskThread::ProcessTasksNamedThread() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:779]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7a992836e MyProject.exe!FNamedTaskThread::ProcessTasksUntilQuit() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:668]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7ae283768 MyProject.exe!RenderingThreadMain() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:318]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7ae287009 MyProject.exe!FRenderingThread::Run() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:443]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7a9f0d758 MyProject.exe!FRunnableThreadWin::Run() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:159]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ff7a9f04cbf MyProject.exe!FRunnableThreadWin::GuardedRun() [D:\UE_5.5_Git\UnrealEngine\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:79]
[2024.12.03-14.30.57:076][864]LogWindows: Error: [Callstack] 0x00007ffaea6a7374 KERNEL32.DLL!UnknownFunction []
[2024.12.03-14.30.57:076][864]LogWindows: Error: 

```

---

<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:** [December 19, 2024, 10:13pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/177 "2024-12-19T22:13:46Z")

</div>

Hi @TiagoCostaUE ,

Just out of curiosity: why directional light is not MegaLights compatible?

I have been making some experiments with a “infinite” spot light and the results are quite great. Performance and quality. And the quality is better than with VSMs projected by a non-ML directional light. But with all spotlight limitations, which is a little unconfortable, of course.

Thanks!

---

<div class="post-metadata">

**Author:** ![Resolve](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Resolve](https://forums.unrealengine.com/u/Resolve)\
**Post date:** [December 21, 2024, 8:19am UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/178 "2024-12-21T08:19:14Z")

</div>

Did you ever figure this out? Geometry collections suffer from this in a way too. Unless I’m missing something but this was a default third person project with megalights enabled on default or raytracing. VSM makes it work, but incurs a perf cost.

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

---

<div class="post-metadata">

**Author:** ![X-perto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@X-perto](https://forums.unrealengine.com/u/X-perto)\
**Post date:** [December 21, 2024, 4:04pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/179 "2024-12-21T16:04:29Z")

</div>

It hasn’t been added yet as Megalights is still in development, I think it was already mentioned in this forum post.  
I do hope it gets added soon tho

---

<div class="post-metadata">

**Author:** ![X-perto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@X-perto](https://forums.unrealengine.com/u/X-perto)\
**Post date:** [December 23, 2024, 6:34pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/180 "2024-12-23T18:34:31Z")

</div>

Are all lights always casting a volumetric shadow by default when Megalights is enabled regardless of the `Cast Volumetric Shadow` setting on the light?  
Seems to be the case from my testing but I couldn’t find anything on this.

Also, are there any plans to support the `Shadow Pass Switch` material node with Megalights?

---

<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:** [December 27, 2024, 11:25pm UTC](https://forums.unrealengine.com/t/megalights-feedback-thread/2051575/181 "2024-12-27T23:25:24Z")

</div>

Indeed MegaLights ingnores that flag. Thanks for reporting, will fix it.

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

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