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

<div class="post-metadata">

**Author:** ![rafareis123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rafareis123](https://forums.unrealengine.com/u/rafareis123)\
**Post date:** [June 12, 2019, 9:46pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1224 "2019-06-12T21:46:55Z")

</div>

> [@3Seventh](#):
>
> Thank you!! 🆒
> 
> My first attempt with Loushuang method. Don’t be severe… just a lighting study. Next step: materials, shaders & fog ;))
> 
> Cheers.
> 
> Ps. Some UVW Unwrap errors still…

Beautiful tone and mix of colors! The irregularity on the shapes are very natural also.

---

<div class="post-metadata">

**Author:** ![Czaja](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Czaja](https://forums.unrealengine.com/u/Czaja)\
**Post date:** [June 13, 2019, 4:01am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1225 "2019-06-13T04:01:57Z")

</div>

I finally wanted to give it a try because many of your results are gorgeous.  
Unfortunately, I struggle with weird outputs. Light is rather poor quality with some uneven spots.  
I used only one light source - HDRI map.  
My settings were set to production and to the “Insane Quality” into LightmassConfiguration.bat.  
For this simple, tiny scene baking time took over 1h on GTX 1070.

---

<div class="post-metadata">

**Author:** ![VadoZe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VadoZe](https://forums.unrealengine.com/u/VadoZe)\
**Post date:** [June 13, 2019, 7:19am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1226 "2019-06-13T07:19:16Z")

</div>

> [@3Seventh](#):
>
> … just a lighting study.
> 
> ![Ever6_HDRI_UE4_P00010.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/4/b48b4c225590ca2393f48ac943ba012456d5ff2a.jpeg)

Hi, Mr.) Glad to see you here too!  
Can you please share some wisdom, how you fill the room with light? What is your workflow?  
What settings you use for postprocess and sun,sky intensity? Indirect lighting?  
As for me I get room with dark shadows, so I raise Indirect lighting in postprocess and in light sources to 2 or more.

---

<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:** [June 15, 2019, 12:05am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1227 "2019-06-15T00:05:27Z")

</div>

If I have Lightmap resolutions squared multiplied by 32-bits (8-bit RGBA) totalling 2.6GB, how do I estimate how much sys-mem and gpu-mem will be required to GPULightmass bake? (I only have a GTX-1080 which only has 8GB gpu-mem, and it ran out of memory about 75% progress). I read somewhere that said that estimating it required consideration for tri’s as well. I have only 179,002 tri’s in the scene. I suspect its more of a function of the tri’s on the mesh and the mesh’s lightmap res. Any formula or detailed guidelines?

---

<div class="post-metadata">

**Author:** ![diegoramirez](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/diegoramirez/32/1168899_2.png) [@diegoramirez](https://forums.unrealengine.com/u/diegoramirez)\
**Post date:** [June 16, 2019, 6:19pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1228 "2019-06-16T18:19:53Z")

</div>

> [@Czaja91](#):
>
> I finally wanted to give it a try because many of your results are gorgeous.  
> Unfortunately, I struggle with weird outputs. Light is rather poor quality with some uneven spots.  
> I used only one light source - HDRI map.  
> My settings were set to production and to the “Insane Quality” into LightmassConfiguration.bat.  
> For this simple, tiny scene baking time took over 1h on GTX 1070.

Some corrections:

- Disable Ambient Occlusion and Auto Exposure in your Project Settings.
- Add a Post Processing Volume and increase Exposure and Global Illumination.
- Disable “Compress Lightmaps” in World Settings, this will increase your build size but you´ll see better quality in lightmaps.
- Also check if add a “Lightmass importance Volume” and Portals in every openning or windows.

---

<div class="post-metadata">

**Author:** ![diegoramirez](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/diegoramirez/32/1168899_2.png) [@diegoramirez](https://forums.unrealengine.com/u/diegoramirez)\
**Post date:** [June 17, 2019, 12:16am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1229 "2019-06-17T00:16:53Z")

</div>

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/2/b92d7fde6a44ba723e6007258995e145b57132cb.jpeg "Demo Interactiva UE4") ](https://www.youtube.com/watch?v=qsbbMAEYecs)

First project “finished” using GPU Lightmass.  
Impressive results in few hours.  
GTX 1080 Ti / i7 7820 / 64 Gb RAM  
All used models are High poly detail.  
Project size (win 64 compiled): 2.3 Gb  
Bake time: 4 h 20 min aprox  
First I tried disabling “Compress Lightmaps” but I get some errors while compiling, after enabling again this function everything works as expected but I can see some artifacts in lightmaps.

---

<div class="post-metadata">

**Author:** ![VadoZe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VadoZe](https://forums.unrealengine.com/u/VadoZe)\
**Post date:** [June 19, 2019, 1:31pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1230 "2019-06-19T13:31:57Z")

</div>

Does GPU lightmass work with portals? Any quality improve with portals?  
As for me, in regular CPU lightmass - portals give only more bake time, with no significant quality improvements.

---

<div class="post-metadata">

**Author:** ![invrsion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@invrsion](https://forums.unrealengine.com/u/invrsion)\
**Post date:** [June 20, 2019, 4:17pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1231 "2019-06-20T16:17:13Z")

</div>

Anyone know how to decide which GPU the “GPU Lightmass” is using during the baking process?  
If yes, is there any possibility to decide which one will be dedicate for the baking purpose?

Thanks so much in advance.

---

<div class="post-metadata">

**Author:** ![Bushey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bushey](https://forums.unrealengine.com/u/Bushey)\
**Post date:** [June 21, 2019, 3:24pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1232 "2019-06-21T15:24:14Z")

</div>

Fantastic job on this I’ve just installed it and am taking a look at the GPU baker in a simple test scene with a Skylight and a directional light in 4.22

I’m getting some noise from the skylight that I can’t remove completely by cranking up the Lightmass, lightmap resolution and setting the lightbake quality to Production. Are there any settings that can be changed for the GPU baker as well? Or is this a by product of the GPU rendering? No grain/splotchiness when used with directional lights. See attached pics for more info.

Many thanks,

Paul

---

<div class="post-metadata">

**Author:** ![Unakain](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Unakain](https://forums.unrealengine.com/u/Unakain)\
**Post date:** [June 22, 2019, 10:31am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1233 "2019-06-22T10:31:09Z")

</div>

Hi everyone;  
I did everything exactly same what i did at 4.19 to build scene with GPU but at 4.22 it build scene with CPU instead of GPU :(( I did not understand where the trick is that i forgot to make…  
How can i swap my build unit from CPU to GPU ?

---

<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:** [June 23, 2019, 12:53am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1234 "2019-06-23T00:53:51Z")

</div>

I wonder if we’ll see any improvements/new features in GPULightmass before 4.23 is out

---

<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:** [June 23, 2019, 12:06pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1235 "2019-06-23T12:06:59Z")

</div>

> [@](#):
>
> I wonder if we’ll see any improvements/new features in GPULightmass before 4.23 is out

Probably not.

> [@YujiangW](#):
>
> Hi, I’m .  
> I have open sourced GPULightmass here:  
> With the development of an official GPU Lightmass using DXR starting, GPULightmass is in a frozen state now. Its life is up to you community members!

​​​​​​​

---

<div class="post-metadata">

**Author:** ![Czaja](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Czaja](https://forums.unrealengine.com/u/Czaja)\
**Post date:** [June 23, 2019, 12:17pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1236 "2019-06-23T12:17:18Z")

</div>

> [@diegoramirez](#):
>
> Some corrections:
> 
> - Disable Ambient Occlusion and Auto Exposure in your Project Settings.
> - Add a Post Processing Volume and increase Exposure and Global Illumination.
> - Disable “Compress Lightmaps” in World Settings, this will increase your build size but you´ll see better quality in lightmaps.
> - Also check if add a “Lightmass importance Volume” and Portals in every openning or windows.

Thanks! Those tips helped me a lot.

---

<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:** [June 23, 2019, 11:24pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1237 "2019-06-23T23:24:13Z")

</div>

@ZacD Well, it’s actually good news! No more fiddling with DLLs and source code. I just hope it’s not going to drag into 4.25+ and will run on 10xx GPUs (since Nvidia supports RTX on those via drivers).

---

<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:** [June 24, 2019, 12:25am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1238 "2019-06-24T00:25:13Z")

</div>

Yup, good news, but no updates or replacement for a while. I’m hoping the lightmap padding issues get fixed in 4.23 (they were mentioned a few pages back).

---

<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:** [June 24, 2019, 11:56am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1239 "2019-06-24T11:56:20Z")

</div>

> [@](#):
>
> @ZacD Well, it’s actually good news! No more fiddling with DLLs and source code. I just hope it’s not going to drag into 4.25+ and will run on 10xx GPUs (since Nvidia supports RTX on those via drivers).

I thought it needed CUDA, not RTX?

---

<div class="post-metadata">

**Author:** ![GrayAxen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GrayAxen](https://forums.unrealengine.com/u/GrayAxen)\
**Post date:** [June 24, 2019, 12:13pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1240 "2019-06-24T12:13:45Z")

</div>

> [@fael097](#):
>
> I thought it needed CUDA, not RTX?

This GPULightmass does, yes.  
The one currently in development uses DXR, letting it support any gpu/compute device that supports DXR.  
(Which means Ati and Intel support, once they have devices + drivers for DXR support.)

---

<div class="post-metadata">

**Author:** ![Muchasty](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Muchasty](https://forums.unrealengine.com/u/Muchasty)\
**Post date:** [June 24, 2019, 12:22pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1241 "2019-06-24T12:22:57Z")

</div>

Yes, GPULM uses CUDA cores to compute static shadowing for baked light maps.

RTX is not used for this process at the moment. But maybe, as I mentioned in earlier posts, it could be used for an instant light map bake cause nVidia has already tested this solution.  
You just wait few seconds and you have baked maps with - for example - 15 diffuse bounces.  
Maybe Luo and the Epic team will change some in bake process to avoid UVW unwrapping for light maps.

I think that already used light maps system could be improved by automatic smooth MIPMAP upscaling lower resolution ones when the camera is going toward the surface.  
It will give more blurred shadows at close range but you will not see the “pixelation” of low resolutions light map.

---

<div class="post-metadata">

**Author:** ![Holygan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Holygan](https://forums.unrealengine.com/u/Holygan)\
**Post date:** [June 26, 2019, 8:11am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1242 "2019-06-26T08:11:55Z")

</div>

![df.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/c/bcb878d38ca93ce14ef5b1ed901a626ba6751c95.jpeg) Hello to everyone, does anyone has the problem that get stuck at 99 % when baking the light? What can I do?

I am currently working on UE 21.3 and everything was working fine till the previous Sunday.

I have a GTX1080, i7 6700k and 32Gb RAM

Thank you to everyone for any help you can give me and special thanks to the developer/s

---

<div class="post-metadata">

**Author:** ![Defcon44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Defcon44](https://forums.unrealengine.com/u/Defcon44)\
**Post date:** [June 26, 2019, 10:26am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1243 "2019-06-26T10:26:48Z")

</div>

Hello !  
I’m getting this error with unreal 4.22.2, I used the automatic installation tool and didn’t had any errors.  
Hope someone can help, thanks !

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

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