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

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffd956c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffd956c1](https://forums.unrealengine.com/u/anonymous_user_dffd956c1)\
**Post date:** [June 7, 2019, 8:48pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1204 "2019-06-07T20:48:36Z")

</div>

Hi '. First thing, i’m brand new in UE since 3 weeks now. And i must say i’m TRULY amazed with your job.

Hopefully this GPU solver will be part of UE sometime soon.

In the meawhile: Can it be possible to add a post Optix (or other kind of solution) denoiser? That would absolutely amazing.

Thanks in advance.

---

<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 8, 2019, 8:58am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1205 "2019-06-08T08:58:35Z")

</div>

> [@Bakikibakibabaki](#):
>
> Hey Fael097,
> 
> just download the zip for the 4.22! unzip it! put unzipped files in to your UE\_4.22 folder. Usually C:\Program Files\Epic Games\UE\_4.22.  
> and you are good to go

ohhh interesting. I assume I should backup the files I’m replacing?

ok, I just tried it. a scene that took me 11 hours on cpu just took 3 minutes on gpu. so either my current settings are not being used or this is some sort of witchery lol. also, my quality doesn’t improve much by changing ligthmass settings in world settings. and I’m getting a lot of fireflies. how exactly do I change the quality settings?  
edit: nevermind see below

> [@diegoramirez](#):
>
> Working on 4.22.2 using
> 
> I´m using 4.22.2 and works perfect. You can try using the script “Lightmass Configurator”

that’s cool, where can I get this script?  
edit: ok just found it as lightmass configuration in this thread. gonna try it! cheers  
edit2: I downloaded the configurator and rendered the same scene that took 3 minutes before, but on highest quality possible this time. it now took little less than 1 hour but the result is much better than cpu, I cannot believe how amazing this is. definitely a game changer, can’t say how impressed I am. kudos!

---

<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 8, 2019, 2:17pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1206 "2019-06-08T14:17:26Z")

</div>

so, does changing lightmass settings in my world settings still do anything, or I need to do it via the configurator? how about the buld lighting quality? both don’t seem to do much from what I’m testing.

but most importantly, how about volumetric lightmap detail cell size? I tried different values and they do have some effect, but my dynamic objects look different from cpu volumetric lighting, as if they have some shadows creeping in from underneath. do I still adjust it in the world settings panel or do I have to set it on a config file?

---

<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 10, 2019, 6:48pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1207 "2019-06-10T18:48:46Z")

</div>

> [@3Seventh](#):
>
> Hi '. First thing, i’m brand new in UE since 3 weeks now. And i must say i’m TRULY amazed with your job.
> 
> Hopefully this GPU solver will be part of UE sometime soon.
> 
> In the meawhile: Can it be possible to add a post Optix (or other kind of solution) denoiser? That would absolutely amazing.
> 
> Thanks in advance.

Nice to see you here Master! We hope to appreciate your work on UE4 soon!

---

<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 11, 2019, 1:57pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1208 "2019-06-11T13:57:18Z")

</div>

Thanks, Mr. 's a lot for your great and useful tool! 🙂  
It makes really more realistic look (IMHO) and much faster (even 1060 vs my old 3570k))

But comparing both cpu and gpu render I noticed some dark line under ceiling. Not sure if its good/photoreal? How can I remove it? Maybe more some indirect bounces?

 ![105Kit_1gpu.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/0/d059948e5b8e67f53e357b276d08f08bccdd6969.jpeg)

---

<div class="post-metadata">

**Author:** ![maurichi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@maurichi](https://forums.unrealengine.com/u/maurichi)\
**Post date:** [June 12, 2019, 2:54am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1209 "2019-06-12T02:54:00Z")

</div>

> [@Sanjuan](#):
>
> Is that possible to get rid of this area shadow of skylight? I would like that my skylight distributes better the light…

use a different skylight to the flat.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffd956c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffd956c1](https://forums.unrealengine.com/u/anonymous_user_dffd956c1)\
**Post date:** [June 12, 2019, 9:05am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1210 "2019-06-12T09:05:58Z")

</div>

> [@VadoZe](#):
>
> Thanks, Mr. 's a lot for your great and useful tool! 🙂  
> It makes really more realistic look (IMHO) and much faster (even 1060 vs my old 3570k))
> 
> But comparing both cpu and gpu render I noticed some dark line under ceiling. Not sure if its good/photoreal? How can I remove it? Maybe more some indirect bounces?
> 
> ![105Kit_1gpu.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/0/d059948e5b8e67f53e357b276d08f08bccdd6969.jpeg)

Hey VadoZe,

Is your AO enabled or disabled?

A.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffd956c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffd956c1](https://forums.unrealengine.com/u/anonymous_user_dffd956c1)\
**Post date:** [June 12, 2019, 9:17am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1211 "2019-06-12T09:17:38Z")

</div>

> [@rafareis123](#):
>
> Nice to see you here Master! We hope to appreciate your work on UE4 soon!

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…

 ![Ever6_HDRI_UE4_P00001.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/d/3/d3e48f026a969e9930b9fd30fc772515d6acd17a.jpeg)

---

<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 12, 2019, 10:41am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1212 "2019-06-12T10:41:17Z")

</div>

Hello @3Seventh … Nice to see you here !

This what I could recommend you to pay attention are:

- UV unwrap for Lightmaps to avoid bad shadowing on complex elements - I see many artefacts in your scene
- and BaseLightmass.ini setup to avoid strange splotches on walls  
I suggest to use:  
[DevOptions.GPULightmass]  
NumPrimaryGISamples=128  
NumSecondaryGISamples=64  
Remember that when you upgrade the engine new version (not hotfix release) then you have to change the BaseLigthmass.ini again.

I recommend also to avoid point lights very near some high reflective metallic elements ( like reflectors in lamps GU10 type for example ) cause the you will get some splotches too and probably you should increase the Num params, but it cost a lot of extra bake time.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffd956c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffd956c1](https://forums.unrealengine.com/u/anonymous_user_dffd956c1)\
**Post date:** [June 12, 2019, 10:54am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1213 "2019-06-12T10:54:37Z")

</div>

Thank you Thomasz! Yep, i used a 3dsmax script to unwrap evry single object, but, of course, there were some errors as you can see. And yes, i usually use these settings but i got lazy on this and i think it was something like:

NumPrimaryGISamples=16  
NumSecondaryGISamples=8

Will be more patient next time :rolleyes:

A.

---

<div class="post-metadata">

**Author:** ![Farshid](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/farshid/32/874107_2.png) [@Farshid](https://forums.unrealengine.com/u/Farshid)\
**Post date:** [June 12, 2019, 11:10am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1214 "2019-06-12T11:10:37Z")

</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…

i dont know when we can get rid of this lightmap creation in ue4 :mad::mad::mad:  
its old Technic and take our time

i hope baking in dxr dont depend on lightmaps !!!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffd956c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffd956c1](https://forums.unrealengine.com/u/anonymous_user_dffd956c1)\
**Post date:** [June 12, 2019, 11:13am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1215 "2019-06-12T11:13:45Z")

</div>

> [@](#):
>
> i dont know when we can get rid of this lightmap creation in ue4 :mad::mad::mad:  
> its old Technic and take our time
> 
> i hope baking in dxr dont depend on lightmaps !!!

+1!!!

---

<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 12, 2019, 11:15am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1216 "2019-06-12T11:15:31Z")

</div>

Does somebody know what is cooking with the light baking ? is quite quite now - i suppose very busy now.  
No news where the light bake process i going to and how RTX will be used for baking in near future. ☹

---

<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 12, 2019, 11:21am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1217 "2019-06-12T11:21:12Z")

</div>

One more thing @3Seventh : look at your normals direction! UE4 uses one-sided faces and its opposite normal is completely transparent for engine ( if you do not use two-sided material - but two-sided is not recommended for current GPU light bake ).  
It is not important for path-tracers but here in Real-Time it is.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffd956c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffd956c1](https://forums.unrealengine.com/u/anonymous_user_dffd956c1)\
**Post date:** [June 12, 2019, 11:24am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1218 "2019-06-12T11:24:30Z")

</div>

> [@Muchasty](#):
>
> Does somebody know what is cooking with the light baking ? is quite quite now - i suppose very busy now.  
> No news where the light bake process i going to and how RTX will be used for baking in near future. ☹

Not possible RTX to bake light AFAIK. It’s a pathtracer, only RT. On the other hand, GPU light solver (like Loushuang’s one) is the best approach so far. Some wishlist though:

\*Retrace  
\*Working with stationary lights (Raytraced)  
\*Denoising lighmaps (OptiX anyone…?)

---

<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 12, 2019, 11:40am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1219 "2019-06-12T11:40:55Z")

</div>

As I know nVidia used RTX to bake lights in their test scenes ( early scenes B&W with that UE4 characters before the Star Wars demo). You just have to project GI on the light maps… somehow.  
Here is the video: [https://youtu.be/tjf-1BxpR9c?t=418](https://youtu.be/tjf-1BxpR9c?t=418)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dffd956c1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dffd956c1](https://forums.unrealengine.com/u/anonymous_user_dffd956c1)\
**Post date:** [June 12, 2019, 11:52am UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1220 "2019-06-12T11:52:17Z")

</div>

Hmmmmm… Interesting…

---

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

</div>

> [@Muchasty](#):
>
> As I know nVidia used RTX to bake lights in their test scenes ( early scenes B&W with that UE4 characters before the Star Wars demo). You just have to project GI on the light maps… somehow.  
> Here is the video: [https://youtu.be/tjf-1BxpR9c?t=418](https://youtu.be/tjf-1BxpR9c?t=418)

Hmmm not sure. It says Lightmas Baking Preview, so I think it means that, as previously, “preview” was calculated with real-time movable shadows, but this time, movable lights and shadows are RayTraced, so the baking preview is much more similar to the final result when light will be already baked. So I think it’s not possible to bake RayTraced shadows, but I wish! Probably it will be a little different than doing that literally, but for sure they will release a method to bake shadows and lights calculated with “rays”, using a similar and really fast method as Ray tracing is.

---

<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 12, 2019, 2:36pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1222 "2019-06-12T14:36:53Z")

</div>

@Miguel1900 I think that you may be wrong. Cause when nVidia compares sth then shows something On and OFF ( even in that video compares SSR vs RTX). If you see carefully then you will able to see all LightMaps mistakes that were made by author of this scene in UVW. As we see it takes some time to complete and this looks like caused by progress of light bounces.

---

<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 12, 2019, 2:40pm UTC](https://forums.unrealengine.com/t/luoshuangs-gpulightmass/109474/1223 "2019-06-12T14:40:41Z")

</div>

I hope that I understand it well:

> [@](#):
>
> Another potential use case for RTX is to implement a more complete path tracer for non-real-time light map baking or for use as a reference in content production and development of less accurate real-time techniques.

article: [https://devblogs.nvidia.com/effectively-integrating-rtx-ray-tracing-real-time-rendering-engine/](https://devblogs.nvidia.com/effectively-integrating-rtx-ray-tracing-real-time-rendering-engine/)

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

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