Luoshuang's GPULightmass

I’ve already sent you my email addr a while ago. Didn’t receive?

Got it! :smiley:

Is it planned to implemented the features currently not supported? It lacks a lot of features of Lightmass.

Currently I don’t have a plan to add new features since I’m refactoring it completely…

This looks great! Is there any chance for an AMD supported version in the future?

I’ve updated GPULightmass to support sparse volume lighting samples. Please redownload to get the newer version. Note that the samples don’t get proper progress display so you can only tell by looking at GPU load.

Probable not very soon. To make it work on AMD I’ll probably need to learn OpenCL. While OpenCL is somehow similar to CUDA I still need to rewrite the whole program from scratch. :frowning:

I’ve updated the Adaptive Hemisphere Sampler of GPULightmass’s Brute Force GI Engine. Please redownload.

Also there are some screenshots of Brute Force (GPULightmass) vs Irradiance Caching (Lightmass, default production quality):
2min50s (GTX1080) vs 8min10s (i7-6700k), Simplified SunTemple
If you look at the timings only then it is not very impressive. However the quality has a big difference. If you want to tweak Lightmass parameters so that it prduces same quality images as GPULightmass then I believe it’ll be at least 10x slower:



The downside is GPULightmass has noise while Irradiance Caching has ‘built-in’ smoothing. While a denoiser is definitely on the plan, I’m still working on the sampling algorithm to get better quality samples.

Edit 04/14/2018: I made some changes to the sampler to suppress the artifacts on the wall:

This looks good and promising!

Looks amazing! The quality of the shadows is much higher and I notice that you don’t seem to get the variations induced by multi-threading. Look forward to trying it out and hope Epic adopts this method officially.

Really impressive results. Detail of indirect shadow is incredible.

That would be awesome if they adopted it officially :smiley:

Looks amazing, any chance for a source version availability? i would love to give it a try with my gtx1080 but i’m using a custom 4.19.1 built from source.

Or maybe i can link you the UE4 build on github if you’d rather not share source. Anyway, would love to use your solution.

Thanks Luoshuang !


You can just use the binary distribution. Assuming you’re not modifying UnrealLightmass, then the only thing you need to add is to modify Engine\Source\Editor\UnrealEd\Private\Lightmass\Lightmass.cpp to include the dependencies required by GPULightmass, build, then copy the files inside the zip except UE4Editor-UnrealEd.dll and the installation is finished:

search for

const TCHAR* RequiredDependencyPaths64]



to the end of the list (don’t forget the comma after tbbmalloc.dll!)

search for

const TCHAR* OptionalDependencyPaths64]



Worked Perfectly, thank you Luoshuang !

Waiting for your screenshots! =)

Great results. Can’t wait see where this is going. Keep up the good work!

Man these shots look already amazing! This is gonna be killer for everyone since usually, people building game environments never got the same lighting fidelity as…lets say archviz people. One big part is of course lightmap resolution, but you cant even bake a game map with static level lighting scale 0.1 and indirect lighting quality 10 in a efficient time frame XD Its okay to wait for 3h for an apartment, but just scale that up with landscape and multiple buildings…its gonna take years to bake XD This will help tremendously with keeping the times in check while boosting the look dramatically! Hype hype! :smiley:


Would you like to run some tests with GPULightmass in your scenes to help me catch bugs? :slight_smile:

Man absolutely! I will probably give it a shot with the Dark Souls Environment Iam working on for the Lighting Academy! Nice ruins exterior with quite a bit of vegetation using volumetric lightmaps for static objects :slight_smile:

Stay tuned! <3


EDIT: Regarding quality scaling options…I cant get into much detail here, but what we have exposed is the ray count and a filtering value. If I want to do a preview bake, I set the value to 1024 rays and fitering 1 so it doesnt look splotchy. Once I am happy, I set the ray count to 500 000 or 1mio depending on the map and filter to 0 and thats then final quality. Preview usually finishes in 3mins…the fully quality bakes can take between 2 and 8h depending on map size and complexity.

The cool thing here is everyone can decide for themselves whats their final quality visually speaking. Also emissive generates more noise…so if you have a lot of emissive lighting you might need to bake with more rays. Exposing it like this would give you unlimited freedom for quality vs. baking times :slight_smile:

I am not into static lighting at all, but just dropping by say that this work is truly awesome @Luoshuang