Luoshuang's GPULightmass

Hi there,

I am am getting very strange jagged artifacts, on some of the borders, mostly on 90 grad intersection between objects. I don’t have this issue with using of CPU Lightmass.
Here is a some screenshots comparison between GPU and CPU bakes.

All Lightmaps have enough resolution, so there is not a point.

[DevOptions.GPULightmass]
NumPrimaryGISamples=128
NumSecondaryGISamples=64
FireflyClampingThreshold=10.0

UE 4.20.2
Nvidia 1080Ti

This is the only problem I have with GPU Lightmass workflow…

My GPU Lightmass stopped working as well, and I’m running a Titan V externally on my laptop. Now that you’ve isolated the issue, I’ll try it on my internal GTX 1080 and see if the issue is still there.

Just tested on my GTX 1080 - and it worked! So looks like its an issue exclusive to the Titan V :frowning:

I am not sure but it looks like I found what was a issue. It is all about Num Indirect Lighting Bounces. When I set it to 20 the lighting quality will be correct calculated but jagged issue clearly appears. When I set it to only 2 the lighting will calculate not photorealistic without additional bounces, but jagged completely disappear!

On screenshot you will see the difference.

Any ideas how this problem could be solved??

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:

EngineModification.zip (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.

Thanks!

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 - Pastebin.com

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.