Luoshuang's GPULightmass

Waiting for the 4.21 new version :slight_smile:

This tool is amazing!

Yep, landscape’s static lighting resolution is a multiplier on ‘how many lightmap texels per quad’ - even 8 is considered to be very high.

Same here! :smiley: Version 4.20.3 worked flawlessly for us!

Waiting for 4.21 :slight_smile: looks like you’ve got work to do !

I’ll probably delay 4.21 because I’m working on an overhaul of GPULightmass.


I’ve implemented instancing which will greatly improve memory footprint in large scenes where there are lots of duplicated objects (e.g. forests). Scene shown above is MAWI’s Redwood Collection. Masked material support hasn’t been ported over so the lightmaps are darker than they should be.
Ray rejection by LOD/HLOD is also implemented due to instancing.
However, you may see a 50% perf drop in low complexity scenes.

Also, handling of imperfect lightmap UVs has been improved:

Note: It is still a bad idea to use lightmap for trees, mainly because of huge surface area + two sided materials. In Lightmass at most of the time the back face will turn pitch black. While GPULightmass can handle them specially so that they will not be black, the directionality (normal map) will be lost.

: Ever thought about getting a patreon page going? You definitely deserve compensation for the beauty that is GPULightmass!

Any chance we can have runtime switch between CPULightmass and GPULightmass ? I don’t really want to see 50% drop in performance in “simple” scenes (a way less complex than the forest) and if performance drop is inevitable, I’d rather bake with CPU Lightmass for simple scenes and switch back to GPU Lightmass for complex scenes (but I can’t waste time rebuilding source every time I need to switch or have 2 different forks and 2 identical projects to maintain).

Awesome, thanks. Still using it, I will have sample renderings of a current project in the next week to post that uses GPU Lightmass.

well, I believe as an Epic employee I’m not allowed to do so… However, I feel great happiness when I see my work can benefit so many people.

I think I can add it to my plan. Also an interesting thing is that according to my measurement GPULightmass is actually 25~50x faster than CPU regarding indirect lighting sampling. However there is a lot of work that is still done by CPU (namely Signed Distance Field shadowmap calculation). So one purpose of this overhaul is to move these to GPU too. If someone has been already experiencing this problem (very low GPU execution time compare to total baking time) maybe can consider sending the scene to me to investigate.

Hey - Got a question with the upcoming rewrite of the GPU lightmass tool. Will it be possible to support AMD cards?

Unfortunately this is the least likely thing… I tried to investigate RadeonRays & OpenCL once upon a time, and the conclusion is I’m not competent using them to deliver the features I want in my spare time. It is certainly possible to rebase GPULightmass on OpenCL, however that means a great amount of effort and it may also means it will take way more time to deliver the same thing because I’m not familiar with OpenCL.

Can’t wait to see with what you’ll come up with the overhaul!

thanks for ur share!!

Hi guys,
I would like to share my works done with Luos Huang’s GPULightmass.
Big thanks to Lous Huang for giving us this amazing tool which speed up the workflow and delivre a incredible results.

Here is the clip : watch?v=0CeH-CS0m98&t=1s

Cuong PHAM

Infographiste 3D

Some of my work using this GPU lightmass. I only modeled the house.

Thanks, I think it would be beneficial overall (let’s say GPU goes down and people still need to work on the project while waiting on the new GPU)

So, does it mean that 50% performance drop in simple scenes using GPULightmass is still going to be a way faster than building lighting for the same simple scenes on CPU ? :o

Does anyone know why i get this circle artifact in my point light when i switched to GPU light-mass? Didn’t have this issue in CPU light-mass, i am using 4.20. [ATTACH=JSON]{“data-align”:“none”,“data-size”:“medium”,“data-tempid”:“temp_152016_1542162816187_986”}[/ATTACH]

Thank you …

4.21 Update!!! Please!!

Is it hard to update to a a new versio of UE4?

https://forums.unrealengine.com/development-discussion/rendering/1460002--s-gpulightmass?p=1550984#post1550984