Luoshuang's GPULightmass

I cannot back up CPU lightmass. I run your script after a fresh reinstallation of UE4.21.1, I chose option 1 for CPU lightmass backup, and I got “command line error” and nothing else…

Building a new PC to use this plugin(currently using AMD card) and considering 1080ti or 2080ti? Any advise?

Get a 2080ti if you will want to play with the DXR features rolling out over the next few months.

Here’s a solution if anyone runs into the following error.
I upgraded to a 1070ti from only a 1070 and Unreal threw this error. I tried first by adding GPULightmass again, but failed, so I just did a clean install.

LightingResults: Error: <None> === Lightmass crashed: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:c:\ue4-gpulightmassintegration\engine\source\runtime\core\public\Containers/Array.h] [Line: 611]
Array index out of bounds: 24896745 from an array of size 24896745
0x00007ffde29ba388 KERNELBASE.dll!UnknownFunction ]
0x00007ffd49eda78a UnrealLightmass-Core.dll!UnknownFunction ]
0x00007ffd49d43427 UnrealLightmass-Core.dll!UnknownFunction ]
0x00007ffd49c88169 UnrealLightmass-Core.dll!UnknownFunction ]
0x00007ff6822f94c4 UnrealLightmass.exe!UnknownFunction ]
0x00007ff6822f52bb UnrealLightmass.exe!UnknownFunction ]
0x00007ff6822f8a5a UnrealLightmass.exe!UnknownFunction ]
0x00007ff682317f83 UnrealLightmass.exe!UnknownFunction ]
0x00007ff68227527c UnrealLightmass.exe!UnknownFunction ]
0x00007ff68228b33c UnrealLightmass.exe!UnknownFunction ]
0x00007ff68229d7a7 UnrealLightmass.exe!UnknownFunction ]
0x00007ff68235d010 UnrealLightmass.exe!UnknownFunction ]
0x00007ffde33d3034 KERNEL32.DLL!UnknownFunction ]
0x00007ffde5fa3691 ntdll.dll!UnknownFunction ]

UE4 Version: 4.21.1
Graphics Card: 1070ti

The simple fix was to completely “reinstall” GPULightmass. All I did to fix the issue was:

  • Remove the “Binaries” and “Config” folders.
  • Add any backed up “Binaries” and “Config” folders (aka CPULightmass)
  • Copied newest version of GPULightmass back into the"Engine" folder to replace CPULightmass (this is the old way not using Situx’s installer, either should work)

When in doubt, just turn it off and on again.

Here are some snapshots of a work in progress exterior / interior test project I did using GPU lightmass on 4.20.3.

1.5 hr lighting build, around 12 million triangles, medium setting

Foliage resolution at 32, component class is set to “None”

Landscape static lighting resolution set to 64, landscape materials using tessellation.

How stable are the current builds?

Been working fine for me on 4.21. Only issue I had was a crash when I activated Virtual Texturing for the Lightmaps. It’s a new feature in 4.21 and I think hasn’t had the time to implement it yet. Otherwise, working fine on every lighting build.

@****

… so how to represent glowing wires in old type light bulb? :slight_smile: any way even with CPU lightmass in 4.21 all my emisssive materials looks like not emissive?

also

I have many materials and mat instances, is there any what to find fast doubel sided mats instead checking one by one?

I tried it with 4.21 and it is so great! So much detail in baked light and it is really fast, only IES support is missing :(.

Thanks !

Does this support volumetric light probes yet?

Is there any news about the new lightmass version Luo Shang was working on for 4.21? He released the current version for 4.21 in the meanwhile since it took longer than expected but what about now? Can’t wait to try it out.

I’m getting a pretty poor impact from my SkyLight except for the indirect contribution in the Volumetric Lightmaps. I thought it might have been an issue with the extended ranges with physical units, but the other lights appear to be working correctly. I’ve rebaked ~20 times with minor tweaks to intensities and options posted below with no SkyLight contribution in the scene, and finally I’m seeing something from the SkyLight BUT the intensity is super low. With a SkyLight intensity of 5000 cd/m²(randomly picked value for the time being), I can’t see anything unless I’m using negative EV values which suggests the Illuminance is less than 1.

This is in the Realistic Rendering scene. The exterior seemed to have received the SkyLight correctly now, but the interior looks like it’s completely cut off and not receiving any bounce except where there’s a small hole. This is at -2 EV, so the exterior and VLMs are blown out while the interior is practically pitch black. All volumes and meshes in the doorway have been removed.

I’ve tried Static and Stationary with a captured HDRI skybox and a HDRI plugged in directly. I’ve tried all GPULightmass settings and I have Production enabled in the editor(as suggested in the OP). Using 4.21.

Am I missing something with the SkyLight? I’ve only used GPULightmass a tiny bit after finally getting tired of the enigma that is Swarm(practically a requirement for CPU baking), but other than the necessity for high Lightmap resolutions and the SkyLight issue, it appears to be working great.

I think there’s a bug there too. Been having problems in a city environment myself. Try turning off Lower Hemisphere is Solid Color in the Skylight and let me know if it helps you too. It seems to randomly help me.

I get the same issue with weak skylight and bounce lighting at high intensities. @ i tried what you suggested and it did not work for me.

My settings are:

Directional Light Brightness: 125 000 lux
Sky HDRI Brightness: 40 000
Skylight Brightness: 1 ( this could be misleading, what this really means is: 1 * SKY HDRI Brightness)

These settings are roughly equivalent to a bright hot day in reality. and with CPU lightmass I get the expected results. GPU lightmass seems to start going funky with intensities in the region of 10 - 100 for both skylights and directional lights.

I got it working somehow, but can’t really figure out what made it work. One really weird thing I did was to set the Distance Threshold to 20000 (200m). For my 2km wide city that’s really small. And my sky sphere is much larger even. But high threshold values wouldn’t work.

Did a quick test. Had to push the skylight intensity quite a bit to get a decent amount of bounce. Unlike rosegoldslugs though, I got some eventually. In my case at 30 cd/m2.

The HDR I used:

It was late and I’m an idiot. I figured out why the interior wasn’t get anything, there was still a hidden object being baked :o

Still, the SkyLight doesn’t seem to take into account any of the settings and it bakes possibly as is from the HDRI? I’ve unchecked the solid color lower hemisphere option and the Distance Threshold super low to ~4500. Neither one seemed to make a difference. In fact, cranking the intensity all the way up to 20,000 with 10 for the indirect intensity makes no difference either… at least as far as the diffuse contribution goes. It seems like the Specular and VLMs are reacting accordingly though.

Lighting Only mode. Little to no bounce, intensity is weak despite being * 20k


Cubemap reflection inside seems to capture the fog

VLMs seem to be working properly with a sky of this strength…

I tried out the HDRI you used and some other daytime ones instead of my low-light/ambient image from before. I am getting different results based on the HDRI, but I still seem to be limited in intensity for the diffuse. There is a noticeable difference with a daytime HDRI(Bonifacio Stairs from Painter) plugged into the light at 1, 30, and 3000 cd/m², but it’s still barely visible unless I go into negative EVs, which are meant for shooting pitch black night skies and should actually be blown out with a ~3000 cd/m² light source.

What exposure are you using and how different is your Lighting Only view from any of the others that include Specular?

I’m using the standard expose with min and max brightness set to 1, no bloom and no SSAO&SSR. Here are the different lighting modes:

Thanks! That’s definitely not what I’m seeing on my end. I’ll do some more tests tonight. It seems like everyone with proper SkyLight bakes aren’t using physical units, I wonder if there’s an issue with those values when baking.

Has anyone else used higher intensities for physical units and had any luck with the proper exposure?