# Luoshuang's GPULightmass

**URL:** <https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [April 13, 2018, 5:44am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474 "2018-04-13T05:44:47Z")\
**Posts on this page:** 20\
**Page:** 73

<div class="post-metadata">

**Author:** ![JonathanCDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonathanCDev](https://forums.unrealengine.com/u/JonathanCDev)\
**Post date:** [November 4, 2019, 4:28pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1503 "2019-11-04T16:28:58Z")

</div>

Nvm got the results to fade by increasing the:

[DevOptions.GPULightmass]  
NumPrimaryGISamples  
NumSecondaryGISamples

But i love how fast this bakes compared to cpu its lightning fast. And with 2 RTX 2080 ti, imma soon test it with 4 RTX 2080 ti in the swarm agent

---

<div class="post-metadata">

**Author:** ![JonathanCDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonathanCDev](https://forums.unrealengine.com/u/JonathanCDev)\
**Post date:** [November 4, 2019, 4:49pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1504 "2019-11-04T16:49:01Z")

</div>

its only currently using just 1 gpu, how can i tell it to use both? there SLI connected.

 ![Screenshot-468.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/0/1067328558a385c6d64680b444f2768961ac2149.png)

---

<div class="post-metadata">

**Author:** ![letsoc79](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@letsoc79](https://forums.unrealengine.com/u/letsoc79)\
**Post date:** [November 4, 2019, 5:38pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1505 "2019-11-04T17:38:00Z")

</div>

> [@Muchasty](#):
>
> Why didn’t you move to UE4.22 yet ?  
> UE4.19 was quite early version of GPULM.  
> Those splotches can be reduced sometimes by using higher values in Baselightmass.ini:  
> [DevOptions.GPULightmass]  
> NumPrimaryGISamples=128  
> NumSecondaryGISamples=128
> 
> But I still recommend to move to 4.22 at least and use these values I mentioned above for bake ( in PRODUCTION mode - always ).

I installed 4.22 and I get this error

 ![error.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/3/6335428b7e3d1f8e96e4a4d5d8ff08e473c8244e.jpeg)

---

<div class="post-metadata">

**Author:** ![RVillani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rvillani/32/1194572_2.png) [@RVillani](https://forums.unrealengine.com/u/RVillani)\
**Post date:** [November 4, 2019, 10:09pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1506 "2019-11-04T22:09:03Z")

</div>

> [@letsoc79](#):
>
> I installed 4.22 and I get this error
> 
> ![error.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/3/6335428b7e3d1f8e96e4a4d5d8ff08e473c8244e.jpeg)

Did you install the correct version of GPULightmass? There’s a different one for each Unreal version

---

<div class="post-metadata">

**Author:** ![letsoc79](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@letsoc79](https://forums.unrealengine.com/u/letsoc79)\
**Post date:** [November 5, 2019, 3:59pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1507 "2019-11-05T15:59:44Z")

</div>

> [@](#):
>
> Did you install the correct version of GPULightmass? There’s a different one for each Unreal version

Yes, I installed Unified Settings for 4.22…  
I made a test with 4.20 version and its better, but still have some dots in shadowy areas

 ![HighresScreenshot00000.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/7/778777aa3fbe71e37abc438d158ada5386120201.jpeg)

---

<div class="post-metadata">

**Author:** ![JonathanCDev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JonathanCDev](https://forums.unrealengine.com/u/JonathanCDev)\
**Post date:** [November 5, 2019, 11:45pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1508 "2019-11-05T23:45:12Z")

</div>

Do Distance field Shadow work with gpu lightmass?

---

<div class="post-metadata">

**Author:** ![kOkOaHUT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kOkOaHUT](https://forums.unrealengine.com/u/kOkOaHUT)\
**Post date:** [November 6, 2019, 3:12am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1509 "2019-11-06T03:12:16Z")

</div>

> [@](#):
>
> If you’re not building Unreal Engine from source - you don’t need that folder. Even if you are, unless you want to build from source using my GPU Lightmass fork - ignore that folder. If you don’t know what building from source is or what fork I’m referring to - you don’t need that folder.
> 
> Everything you need is in the zip file.

Hi pax, I want to build Unreal engine from source, I’ve cloned your https://.com/irobot/UnrealEngine/tree/GPU-Lightmass-4.23.1-release branch and built the engine, however after trying to build UnrealLightmass in VS, the build had failed with

```auto

LNK1181: Cannot Open input file 'GPULightmassKernel.lib'

```

Now I’ve downloaded the folder GPULightmassKernel.lib from your dropbox but don’t know what to do with it, could you tell me where do I unzip it to.

And I have read one of your comment saying

> [@](#):
>
> I’ve uploaded GPULightmassKernel.lib in the same dropbox share. You would obviously need to add the path to wherever you save it to the build settings for UnrealLightmass in VS.

Could you please elaborate on how do I “add the path” to the “build setting for UnrealLightmass”? Is it adding a line after the

```auto

static const FEngineDependencyPaths RequiredDependencyPaths64 = {
...
TEXT("Binaries/Win64/GPULightmassKernel.lib")
};

```

something like this in Lightmass.cpp? (I’ve tried it, putting the GPULightmassKernel.lib in Win64 folder and add the line above, the build still failed.) Or do I have to add something to another specific file? Thanks.

---

<div class="post-metadata">

**Author:** ![leoletsrock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leoletsrock](https://forums.unrealengine.com/u/leoletsrock)\
**Post date:** [November 6, 2019, 3:30pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1510 "2019-11-06T15:30:55Z")

</div>

> [@](#):
>
> I managed to port GPU Lightmass to 4.23.0-preview-6. Here’s the download for the binary engine integration:  
> [https://www.dropbox.com/sh/fjr63yeut…npYezFena?dl=0](https://www.dropbox.com/sh/fjr63yeutafmip9/AAA54ghH1gCrd5VFnpYezFena?dl=0)
> 
> And here’s my UE4 fork with GPU Lightmass cherry-picked from 's code on top of 4.23:  
> [https://.com/irobot/UnrealEngi…23.0-preview-6](https://.com/irobot/UnrealEngine/tree/GPU-Lightmass-cherry-pick-4.23.0-preview-6)
> 
> Hope you guys find it helpful!

Can I use this for 4.23.1? 4.23.0 is no longer available for download

---

<div class="post-metadata">

**Author:** ![ZacD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZacD](https://forums.unrealengine.com/u/ZacD)\
**Post date:** [November 6, 2019, 5:30pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1511 "2019-11-06T17:30:49Z")

</div>

> [@leoletsrock](#):
>
> Can I use this for 4.23.1? 4.23.0 is no longer available for download

It should work. Minor version releases shouldn’t break anything.

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [November 7, 2019, 3:59am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1512 "2019-11-07T03:59:28Z")

</div>

I tried to use the LightmassConfiguration .bat file but it can’t find the official fgpu lightmass source to download. is it down?

---

<div class="post-metadata">

**Author:** ![Great\_ATuin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Great\_ATuin](https://forums.unrealengine.com/u/Great_ATuin)\
**Post date:** [November 7, 2019, 10:15am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1513 "2019-11-07T10:15:51Z")

</div>

Hey [pax invictus](https://forums.unrealengine.com/member/24021-pax-invictus) Just got 4.23 up and running. Only did some basic testing, but seems great so far. Nice to see a version with the new fixes all up and running; needed this version for what I’m working on. Wanted to say thank you for keeping this alive and running.

---

<div class="post-metadata">

**Author:** ![sawas1989](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sawas1989](https://forums.unrealengine.com/u/sawas1989)\
**Post date:** [November 7, 2019, 7:17pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1514 "2019-11-07T19:17:46Z")

</div>

hello guys i have this error when i building light in 4.23.1

can you help me please \>\>

LightingResults: Error: \<None\> === Lightmass crashed: ===  
Assertion failed: (Index \>= 0) & (Index \< ArrayNum) [File:C:\UE4\GPULM-src\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 614]  
Array index out of bounds: 43661 from an array of size 43661  
0x00007ffad6e2a839 KERNELBASE.dll!UnknownFunction ]  
0x00007ffa69831347 UnrealLightmass-Core.dll!UnknownFunction ]  
0x00007ffa69834107 UnrealLightmass-Core.dll!UnknownFunction ]  
0x00007ffa69682aba UnrealLightmass-Core.dll!UnknownFunction ]  
0x00007ffa69627a17 UnrealLightmass-Core.dll!UnknownFunction ]  
0x00007ffa69628250 UnrealLightmass-Core.dll!UnknownFunction ]  
0x00007ff79b8112e8 UnrealLightmass.exe!UnknownFunction ]  
0x00007ff79b74e3f6 UnrealLightmass.exe!UnknownFunction ]  
0x00007ff79b757363 UnrealLightmass.exe!UnknownFunction ]  
0x00007ff79b7acf59 UnrealLightmass.exe!UnknownFunction ]  
0x00007ff79b75c422 UnrealLightmass.exe!UnknownFunction ]  
0x00007ff79b78639d UnrealLightmass.exe!UnknownFunction ]  
0x00007ff79b7a5ac9 UnrealLightmass.exe!UnknownFunction ]  
0x00007ff79b80dae8 UnrealLightmass.exe!UnknownFunction ]  
0x00007ffad78e7bd4 KERNEL32.DLL!UnknownFunction ]  
0x00007ffad988ced1 ntdll.dll!UnknownFunction ]

---

<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 8, 2019, 3:28am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1515 "2019-11-08T03:28:26Z")

</div>

> [@](#):
>
> That said, I suspect there were changes to code that ends up in UE4Editor-UnrealEd.dll in 4.23.1, that were unrelated to lightmass, so I don’t have high hopes that a straight copy of 4.23.0 source files over to the OVR fork would work.

Nope, I diff’ed relevant files (from your cherry-pick commit) and there is no difference between 4.23.0 and 4.23.1

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_80fffdb11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_80fffdb11](https://forums.unrealengine.com/u/anonymous_user_80fffdb11)\
**Post date:** [November 8, 2019, 6:29am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1516 "2019-11-08T06:29:13Z")

</div>

> [@Situx](#):
>
> You are probably using the latest version of the script, which is configured by default to 4.22, while your installation is 4.21. For the script to work with it, you need to manually edit (notepad will do)( and change the UnrealVersion = 4.22 to 4.21

I have the same problem. how exactly to do it? can you explain for the dummies? 😕 this is my first installation

---

<div class="post-metadata">

**Author:** ![leoletsrock](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leoletsrock](https://forums.unrealengine.com/u/leoletsrock)\
**Post date:** [November 8, 2019, 6:42am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1517 "2019-11-08T06:42:07Z")

</div>

> [@ZacD](#):
>
> It should work. Minor version releases shouldn’t break anything.

thanks, didnt know the small version doesnt matter, giving it a try 🙂

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [November 9, 2019, 1:11am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1518 "2019-11-09T01:11:51Z")

</div>

Help?

 ![Capture.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/d/1d53ef349adb3399b4c9988e752848d19836b227.png)

---

<div class="post-metadata">

**Author:** ![pax\_invictus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pax\_invictus](https://forums.unrealengine.com/u/pax_invictus)\
**Post date:** [November 9, 2019, 11:05pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1519 "2019-11-09T23:05:08Z")

</div>

> [@kOkOaHUT](#):
>
> Could you please elaborate on how do I “add the path” to the “build setting for UnrealLightmass”? Is it adding a line after …

You do not need to modify the source. Open the solution in VS, right click on the UnrealLightmass project. Under VC++ Directories add the path to GPULightmassKernel.lib to Library Directories.

> [@leoletsrock](#):
>
> Can I use this for 4.23.1? 4.23.0 is no longer available for download

Not sure what you mean? Binaries for both 4.23 and 4.23.1 are in the same Dropbox folder.

> [@ZacD](#):
>
> It should work. Minor version releases shouldn’t break anything.

While this can be true occasionally, I don’t believe it is something you can rely upon.

> [@Great\_ATuin](#):
>
> Hey [pax invictus](https://forums.unrealengine.com/member/24021-pax-invictus) Wanted to say thank you for keeping this alive and running.

I appreciate that, thanks! That said, I hope everyone here keeps in mind that the person who really deserves praise is @YujiangW who is the author of GPU Lightmass.  
​

> [@fael097](#):
>
> Help?

This was probably my fault, since I move the binaries from the older versions to a separate folder in the dropbox. I copied the 4.23.0 binaries back to their original place, so the script \*should \*(?) work now for 4.23. **0**. I’m not seeing the path to the latest binary added to the script, though, so If you’re on 4.23. **1** it might not work. In that case you might want to install it manually.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ded49025](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ded49025](https://forums.unrealengine.com/u/anonymous_user_ded49025)\
**Post date:** [November 10, 2019, 11:59am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1520 "2019-11-10T11:59:06Z")

</div>

> [@sawas1989](#):
>
> hello guys i have this error when i building light in 4.23.1
> 
> can you help me please \>\>
> 
> LightingResults: Error: \<None\> === Lightmass crashed: ===  
> Assertion failed: (Index \>= 0) & (Index \< ArrayNum) [File:C:\UE4\GPULM-src\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 614]  
> Array index out of bounds: 43661 from an array of size 43661  
> 0x00007ffad6e2a839 KERNELBASE.dll!UnknownFunction ]  
> 0x00007ffa69831347 UnrealLightmass-Core.dll!UnknownFunction ]  
> 0x00007ffa69834107 UnrealLightmass-Core.dll!UnknownFunction ]  
> 0x00007ffa69682aba UnrealLightmass-Core.dll!UnknownFunction ]  
> 0x00007ffa69627a17 UnrealLightmass-Core.dll!UnknownFunction ]  
> 0x00007ffa69628250 UnrealLightmass-Core.dll!UnknownFunction ]  
> 0x00007ff79b8112e8 UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ff79b74e3f6 UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ff79b757363 UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ff79b7acf59 UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ff79b75c422 UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ff79b78639d UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ff79b7a5ac9 UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ff79b80dae8 UnrealLightmass.exe!UnknownFunction ]  
> 0x00007ffad78e7bd4 KERNEL32.DLL!UnknownFunction ]  
> 0x00007ffad988ced1 ntdll.dll!UnknownFunction ]

I have the same problem, it happens when I try to bake a second time.

---

<div class="post-metadata">

**Author:** ![Sumsion3D](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sumsion3D](https://forums.unrealengine.com/u/Sumsion3D)\
**Post date:** [November 10, 2019, 4:33pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1521 "2019-11-10T16:33:33Z")

</div>

I am at total loss with all of the changes. I had this working once, before Luoshoang went to Epic. I am really interested in this promising approach. I am on 4.23.1, and would like to get GPULightmass working. What are the start-from-scratch steps (if I have already had this working once before on older versions of the engine) ?

---

<div class="post-metadata">

**Author:** ![Andreas\_Bjorshol](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Andreas\_Bjorshol](https://forums.unrealengine.com/u/Andreas_Bjorshol)\
**Post date:** [November 11, 2019, 3:10pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1522 "2019-11-11T15:10:26Z")

</div>

> [@Sumsion3D](#):
>
> I am at total loss with all of the changes. I had this working once, before Luoshoang went to Epic. I am really interested in this promising approach. I am on 4.23.1, and would like to get GPULightmass working. What are the start-from-scratch steps (if I have already had this working once before on older versions of the engine) ?

- Download the .zip file for 4.23.1 from here:  
[Dropbox - GPU Lightmass Binaries - Simplify your life](https://www.dropbox.com/sh/fjr63yeutafmip9/AAA54ghH1gCrd5VFnpYezFena?dl=0)

- Copy the “Engine” folder to your install directory and overwrite

- Open Engine/Config/Baselightmass.ini to change the quality - the values at the bottom are the ones you need to change.  
I have mine set to 128, 64 and 10 000, which is pretty high - still figuring out what values produce the best result.

Also, make sure you select “production” build quality in the editor. Any other setting will just act as a bottleneck, if I’ve understood correctly. 🙂

[Previous page](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474.md?page=72)

[Next page](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474.md?page=74)
