Luoshuang's GPULightmass

I’m having an issue with undesired AO generated from the normal map. As you can see in the image below, the crevices created by the pixel normals are being filled in by AO, and this process seems to be subject to some aliasing because the lines are broken up. I don’t want any AO there at all, though. I’ve removed the AO input for the material, turned off lightmap directionality in the material, doubled the lightmap resolution, and set the static lighting level scale to 0.1, all to no avail. GPU Lightmass is set to medium.

I wanted to test this with CPU lightmass as well, but after leaving it running all night on 5 PC’s, CPU lightmass was still at 0% (calculating sky light bounces), whereas GPU lightmass completes the scene in about 20-30 minutes, so I decided to shelve that endeavour and ask for advice here instead. How do I get rid of that ugly AO?

Is it really normal map? Or is it part of the model’s geometry? Because, be default, Unreal doesn’t use normal map information in Lightmass.
Anyway, there’s a setting to disable it in Project Settings ► Engine ► Rendering ► Lighting ► Use Normal Maps for Static Lighting
Also, try disabling AO in Lightmass settings. Sometimes I find the light to be more realistic with just light bouncing calculated, without forced AO.

Aye, it’s definitely the normal map. The geometry’s just flat. If I bake using the same material without the normals, and then apply the normals again after the bake, everything is fine. It’s a hassle to remember that, though.

It’s good to know there’s a global setting to turn off normal map usage in lightmass, but I’d rather keep it and turn it off for just one material / object. I’ll do a bake with it turned off, and also one without AO, and see if I still get good results in the rest of the scene. Thanks!

or you could use the Lightmass Replace material node on your material normal channel, and leave it setup permanently not to use the normal for baking.

That works like a charm! Thanks.

I’ve uploaded a new version of unified settings to fix the quality problem.

Also, for source integration: (53 KB)

Two files in the zip: Engine\Source\Programs\UnrealLightmass\Public\SceneExport.h and Engine\Source\Editor\UnrealEd\Private\Lightmass\Lightmass.cpp.
You need to either replace the two files, or use a diff tool to apply the patch to your source build. The change is about copy dependencies and reading ini files.

Is this for 4.20.3 (came out earlier today) ?

No it is still 4.20.2; however the kernel hasn’t been changed so if you are using a source build you can probably use it

Have you been able to find the issue with the Titan V?

Unfortunately, no

That’s genius. I always forget about that feature

Hello…I am trying the mapper for ue 4.19. But the massage under is like that.
What does that mean?
please, help me to fix the problem.
thank you.

<없음> === Lightmass crashed: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:c:\ue4-gpulightmassintegration\engine\source\runtime\core\public\Containers/Array.h] [Line: 610]
Array index out of bounds: 1052 from an array of size 1052

0x00000000AB7BA388 KERNELBASE.dll!UnknownFunction ]
0x00000000A9FB5164 UnrealLightmass-ApplicationCore.dll!UnknownFunction ]
0x00000000A5E3921C UnrealLightmass-Core.dll!UnknownFunction ]
0x00000000A5D7B62D UnrealLightmass-Core.dll!UnknownFunction ]
0x00000000522A0D36 UnrealLightmass.exe!UnknownFunction ]
0x00000000522A99D2 UnrealLightmass.exe!UnknownFunction ]
0x00000000523082BF UnrealLightmass.exe!UnknownFunction ]
0x00000000522B1E41 UnrealLightmass.exe!UnknownFunction ]
0x00000000522DCF32 UnrealLightmass.exe!UnknownFunction ]
0x00000000522FED72 UnrealLightmass.exe!UnknownFunction ]
0x000000005238CF70 UnrealLightmass.exe!UnknownFunction ]
0x00000000ABA23034 KERNEL32.DLL!UnknownFunction ]
0x00000000AE5E1461 ntdll.dll!UnknownFunction ]
0x00000000AE5E1461 ntdll.dll!UnknownFunction ]

try to clean cache of your swarm

Which problem will be fixed with new files?

May I ask you to see my post #524, I rebuild the geometry, but the problem is still there.


Kind of hard to see on your screenshots, as every shot has a different angle. But seems to me you have rotated UVs, even if red, the artifacts seems to be related to UV resolution, and more importantly texels not been aligned to the edges. You can even see some blue lines in the same locations. The fact is that GPU lightmass is much more sensitive to this issues than CPU. I believe this was discussed in this thread before.


Well, that source you shared a few posts ago doesn’t seem to work with binaries for 4.20.2. UE 4.20.3 builds fine with it, but then if I use .dlls and .exe from binary package for 4.20.2, Lightmass (swarm rather) fails. If I only use GPULightmass DLL from binary package, I get this crash: <None> === Lightmass crashed: ===Assertion failed: (Index >= 0) & (Index < Arr -

I probably need 4.20.3 binary package from you in order to make it work with the new source you released a few posts above.

The idea is to build only UnrealEd (do not build UnrealLightmass) and use all the binaries excluding UE4Editor-UnrealEd.dll

I can’t not build Lightmass. It builds with UnrealEd by default.

I tried again.

I built UE 4.20.3 from source, then I did the code changes according to your source files and copied GPULightmassKernel.dll into where it should be (along with reporter app and .ini changes). Then I re-built UnrealEd, copied the rest of the files from 4.20.2 binary package you provided (except for UE4Editor-UnrealEd.dll), overwrote existing files.

Now it seems that lighting is being built, but I don’t see reporter window pop-up. Scene is extremely simple, so maybe that’s why?

EDIT: Built lighting on a complex scene - same thing - progress bar for GPULIghtmap doesn’t show up in the top left corner of the screen as it used to with 4.19.x engine.

Did you forget to place ProgressReporter.exe in the proper folder?

Just want to say everything works like a charm now on my 1080Ti with a source build. Even rendering with crazy high DevOptions!
One thing I haven’t seen mentioned in the thread is that the “Use emissive for static lighting” checkbox now works. On previous version emissivenes was always taken into account.