# Epic's GPUlightmass

**URL:** <https://forums.unrealengine.com/t/epics-gpulightmass/139357>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [March 5, 2020, 12:52pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357 "2020-03-05T12:52:56Z")\
**Posts on this page:** 20\
**Page:** 13

<div class="post-metadata">

**Author:** ![maxbrown](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maxbrown/32/1194506_2.png) [@maxbrown](https://forums.unrealengine.com/u/maxbrown)\
**Post date:** [June 23, 2021, 4:44pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/241 "2021-06-23T16:44:05Z")

</div>

Finally figured out; glass objects cast shadow until ‘visible in raytracing’ is disabled in the static mesh editor. Disabling this in the glass material doesn’t have any effect.

---

<div class="post-metadata">

**Author:** ![Virtuality](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/virtuality/32/1140891_2.png) [@Virtuality](https://forums.unrealengine.com/u/Virtuality)\
**Post date:** [August 17, 2021, 10:03am UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/242 "2021-08-17T10:03:52Z")

</div>

Hey there,

I’ve been playing around with the plugin, and I’m amazed by the progress that is being made, GPU LM clearly is the future! 🙂

There are a few questions that I don’t manage to find answers to on this forum… Hoping that someone around here can help:

1. Where is the main development being done the next months? All in UE5? Also in UE4.27? Both branches?
2. IES profiles only work for Stationary lights so far in 4.26.2. Any plans to add IES to Static Lights in the next release?
3. Source Lenght for Point Lights is not yet implemented for Static Lights. Any plans to add those in the next release?
4. Quality of Volumetric Lightmaps seems to be lagging (especially with higher densities). Any recomendations on how to work around this? Any plans to improve (the smoothing or quality) of volumetric light?

---

<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:** [August 19, 2021, 6:44pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/243 "2021-08-19T18:44:57Z")

</div>

@Luoshuang When reading through the documentation I noticed it states that bounces are not configurable. I hope you will consider allowing for a zero-bounce stationary skylight when you ultimately go to implement them.

Having a zero-bounce skylight allows you to use the skylight baking primarily for skylight shadowing. This allows you to have very clean dynamic time-of-day lighting with lightmaps.

I made an example of this using CPU lightmass a while back;

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/d/fad794a2f10dd1564392a001ecaacc8e40982aea.jpeg "UE4 Time of day with a stationary skylight") ](https://www.youtube.com/watch?v=7fPUSsQl6co)

For static scenes with dynamic time of day, this approach provides far superior results to relying on DFAO (the only other option outside of Lumen). Given how expensive Lumen is, it would be incredibly valuable to accommodate this type of setup with GPU Lightmass.

---

<div class="post-metadata">

**Author:** ![kurylo3d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kurylo3d/32/1150889_2.png) [@kurylo3d](https://forums.unrealengine.com/u/kurylo3d)\
**Post date:** [August 20, 2021, 9:14pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/244 "2021-08-20T21:14:56Z")

</div>

Gpu lightmass 4.27 all new lights and some existing ones do not contribute to the baked lighting. Is there a light limit still? Screenshot shows the baked on left and as dynamic lights on right.

 ![lightgpubakeproblem](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/2/02dd2fb46c602075504af613047e32c3e10f71b5.jpeg)

---

<div class="post-metadata">

**Author:** ![motorsep](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/motorsep/32/918698_2.png) [@motorsep](https://forums.unrealengine.com/u/motorsep)\
**Post date:** [August 20, 2021, 11:43pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/245 "2021-08-20T23:43:52Z")

</div>

> [@kurylo3d](#):
>
> Is there a light limit still?

Afaik, yes, there is a limit on number of lights in the scene

---

<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:** [September 9, 2021, 5:35pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/246 "2021-09-09T17:35:32Z")

</div>

I know you said you have no control over the denoiser, so I can only hope that at some point you’ll just replace it.

Using a denoiser is obviously crucial to getting fast lighting builds, but I find that difficult to do with GPU LM because the results are routinely completely unusable. I have to believe it can be done better than this…

 ![UE4_GPULM_Denoiser427](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/2/428a08d84dfc981a1ab7a5f4f4f2d18ff6ae2100.jpeg)

---

<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:** [September 9, 2021, 6:46pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/247 "2021-09-09T18:46:43Z")

</div>

So… when there is no “sun light”, there is not “sky” lighting too? However, if it’s not zero-bounced, sky lighting will be present even with 0 “sun light”, that’s the idea? I’m curious now…

---

<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:** [September 9, 2021, 8:25pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/248 "2021-09-09T20:25:04Z")

</div>

> [@Miguel1900](#):
>
> So… when there is no “sun light”, there is not “sky” lighting too? However, if it’s not zero-bounced, sky lighting will be present even with 0 “sun light”, that’s the idea? I’m curious now…

I would say yes that’s more or less correct.

Stationary lights bake down two things: Shadows and bounce lighting. Direct lighting is still dynamic. So you can change the intensity of a stationary light at runtime, but this doesn’t affect the bounce lighting so the skylight continues to glow as if it were daylight, even at night. By using a zero-bounce skylight, there’s no bounce lighting to bake down so you’re only using it for shadows.

Example:

 ![UE4_Lightmass_StationarySkylightComparison](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/a/3a7abfcada2f7939ac3c79ee1428bdee667d0ec4.jpeg)

The obvious question is well, why not just use a moveable skylight then? Well… because moveable skylights are unshadowed and DFAO is not a suitable replacement for skylight shadowing.

 ![UE4_Lightmass_StationarySkylightComparison2](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/d/ed7a09cd9534fec6454f7255ada0cd19cefcd843.jpeg)

Essentially, if your project has a Day/Night cycle, you have three options when it comes to the skylight:

**Moveable Skylight**  
❌Unshadowed  
☑ Provides proper darkness at night

**Stationary Skylight with bounces**  
☑ Properly shadows interiors  
❌Bounce lighting causes exteriors to brightly glow at night

**Zero Bounce Stationary Skylight**  
☑ Properly shadows interiors  
☑ Provides proper darkness at night

Zero bounce skylight offers the best compromise by far…

---

<div class="post-metadata">

**Author:** ![motorsep](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/motorsep/32/918698_2.png) [@motorsep](https://forums.unrealengine.com/u/motorsep)\
**Post date:** [September 9, 2021, 8:33pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/249 "2021-09-09T20:33:00Z")

</div>

> [@Arkiras](#):
>
> Zero bounce skylight offers the best compromise by far…

Sounds like a bug that needs to be filed?

---

<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:** [September 9, 2021, 8:37pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/250 "2021-09-09T20:37:22Z")

</div>

Which part of this is a bug?

---

<div class="post-metadata">

**Author:** ![motorsep](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/motorsep/32/918698_2.png) [@motorsep](https://forums.unrealengine.com/u/motorsep)\
**Post date:** [September 9, 2021, 8:41pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/251 "2021-09-09T20:41:31Z")

</div>

Stationary skylight with bounces shouldn’t exteriors to brightly glow at night ?

---

<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:** [September 9, 2021, 8:42pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/252 "2021-09-09T20:42:26Z")

</div>

That’s not a bug, it’s by design. Bounce lighting is baked, that’s the tradeoff you make when you use lightmass for bounces.

---

<div class="post-metadata">

**Author:** ![Rawalanche](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rawalanche/32/906578_2.png) [@Rawalanche](https://forums.unrealengine.com/u/Rawalanche)\
**Post date:** [September 9, 2021, 9:44pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/253 "2021-09-09T21:44:07Z")

</div>

Could you make the same examples with zero bounce but with SSGI enabled? This seems like somewhat nice idea, and SSGI on top of it could provide nice local indirect illumination for the moving sun light.

---

<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:** [September 9, 2021, 10:03pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/254 "2021-09-09T22:03:04Z")

</div>

Not exactly the same scene setup, but close:

 ![UE4_Lightmass_StationarySkylightComparison3](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/d/7dea627ad518fb1316e3669b80dc420978dd4cb9.jpeg)

It is obviously more view dependent than Lumen, but still works quite well in my opinion.

_Just for clarity since I forgot to write it in the screenshots_: These are all using a movable directional light for the sun

---

<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:** [September 10, 2021, 6:16pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/255 "2021-09-10T18:16:30Z")

</div>

I see!

I made my own tests, and it’s an interesting thing, no doubt. It only works with CPU lightmass; GPU Luoshuang’s lightmass don’t work too.

The main utility is to have the ability to modify Sky intensity in real time, so you can obtain totally 0 lighting on the scene (from the Sky), or make it quite visible.

Great work Arkiras! Should be an useful addon. Let’s hope @Luoshuang read you, or the Epic Team, and they can change it.

---

<div class="post-metadata">

**Author:** ![Rawalanche](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rawalanche/32/906578_2.png) [@Rawalanche](https://forums.unrealengine.com/u/Rawalanche)\
**Post date:** [September 10, 2021, 7:09pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/256 "2021-09-10T19:09:51Z")

</div>

Ye, this works as nicely as I’d expect 🙂

---

<div class="post-metadata">

**Author:** ![motorsep](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/motorsep/32/918698_2.png) [@motorsep](https://forums.unrealengine.com/u/motorsep)\
**Post date:** [November 2, 2021, 1:49pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/257 "2021-11-02T13:49:45Z")

</div>

GPULM 4.27 strikes again:

> Assertion failed: SizeX != -1 && SizeY != -1 [File:E:/UE4Source/UE-oculus-4270-release-1650/Engine/Source/Runtime/Engine/Private/ShadowMap.cpp] [Line: 619]
> 
> UE4Editor\_Core!AssertFailedImplV() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]  
> UE4Editor\_Core!FDebug::CheckVerifyFailedImpl() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]  
> UE4Editor\_Engine!FShadowMap2D::AllocateInstancedShadowMap() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Engine\Private\ShadowMap.cpp:619]  
> UE4Editor\_GPULightmass!GPULightmass::FScene::ApplyFinishedLightmapsToWorld() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\Scene\Scene.cpp:2769]  
> UE4Editor\_GPULightmass!GPULightmass::FScene::BackgroundTick() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\Scene\Scene.cpp:1739]  
> UE4Editor\_GPULightmass!FGPULightmassModule::EditorTick() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\GPULightmassModule.cpp:95]  
> UE4Editor!FEngineLoop::Tick() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4922]  
> UE4Editor!GuardedMain() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Launch.cpp:178]  
> UE4Editor!GuardedMainWrapper() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]  
> UE4Editor!LaunchWindowsStartup() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:273]  
> UE4Editor!WinMain() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:320]  
> UE4Editor!\_\_scrt\_common\_main\_seh() [D:\a01\_work\26\s\src\vctools\crt\vcstartup\src\startup\exe\_common.inl:288]  
> kernel32  
> ntdll

Any idea what it could be ? @Luoshuang

---

<div class="post-metadata">

**Author:** ![kurylo3d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kurylo3d/32/1150889_2.png) [@kurylo3d](https://forums.unrealengine.com/u/kurylo3d)\
**Post date:** [December 7, 2021, 11:43pm UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/258 "2021-12-07T23:43:50Z")

</div>

My GPU Lightmass bake has extremely dark terrain. Works fine on the static meshes around the level, but the terrain itself is very dark in comparison. Why? Seems like a bug. Also has random block box spots around for areas that seem to have not rendered. r.PathTracing.LightGridMaxCount 9999 fixes some of hte objects but not all.

Its not just terrain.. other bugs in lighting bakes as well when comparing full bake vs bake what u see modes.

> [@Gpu lightmass looks great but terrain way darker then static meshes](https://forums.unrealengine.com/t/gpu-lightmass-looks-great-but-terrain-way-darker-then-static-meshes/264731/7):
>
> again… thats not the issue here. THe terrain bakes the correct colors with a “bake what you see” mode. Here is a screenshot of that. And to illustrate there are other issues in the scene… here is a room where bake all makes almost every light in the room not contribute… as though there is something invisible blocking hte light. See the comparison shots for that one as well bake all vs bake what u see. (again works fine with bake what u see) In fact that edge of the light in the screen shot… is …

---

<div class="post-metadata">

**Author:** ![maxbrown](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maxbrown/32/1194506_2.png) [@maxbrown](https://forums.unrealengine.com/u/maxbrown)\
**Post date:** [January 30, 2022, 8:57am UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/259 "2022-01-30T08:57:04Z")

</div>

@Luoshuang Working on a new 4.27.2 project. Getting constant crashes with Hierarchical Static Meshes. Down on the manual webpage (limitations section) it says LODs are supported (Y). Should the HISMs work as well or is this not supported (yet)? Can’t find anything here or in the answerhub.

Edit: some details about a crash:  
LoginId:1df701f44c75c8de2c7f4198cdc4c8f5  
EpicAccountId:318bd546ef6e466b939f63f35437e69c  
Assertion failed: SizeX != -1 && SizeY != -1 [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/ShadowMap.cpp] [Line: 619]

Edit2:

- I did some more reading and found a post that HISMs dont work with static lighting.
- also, due to the auto-instancing, these ‘old methods’ might not be useful anymore
- I still think though I have used them with the Luoshuangs GPUlightmass plugin from a few years back. Cant be sure though
- there’s no crashes anymore if - instead of HISMs - normal static meshes are created in blueprint. Wondering if there will be a big performance hit in VR

---

<div class="post-metadata">

**Author:** ![Rawalanche](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rawalanche/32/906578_2.png) [@Rawalanche](https://forums.unrealengine.com/u/Rawalanche)\
**Post date:** [January 30, 2022, 10:11am UTC](https://forums.unrealengine.com/t/epics-gpulightmass/139357/260 "2022-01-30T10:11:15Z")

</div>

If you have large amounts of HISM instances, and you actually have them set to static and not excluded from the static lightmap, then of course you will get crashes, because you will run out of memory.

Yes, they are instances, but the problem is each instance is is still at unique place in your level, so it has to receive unique lighting. Lightmaps for HISM instances therefore can not be instanced, so running out of memory and crashing lightmap is expected if you are trying to bake for example a forest where each single piece of foliage is supposed to have its lighting baked.

[Previous page](https://forums.unrealengine.com/t/epics-gpulightmass/139357.md?page=12)

[Next page](https://forums.unrealengine.com/t/epics-gpulightmass/139357.md?page=14)
