Download

GPU Lightmass 4.26.1 Crashing

I’m currently unable to build lighting without crashing in my project with this error:

I’ve checked and usage of both ram and vram is below 50%. I have cleaned and validated Swarm cache and there is no change.

The issue seems to be with 4.26.1 as I’ve tried to build lighting on older versions of my project and it still crashes when lighting used to build fine.

I’d like to just go back and run on 4.26.0 but it looks like even the branches on github are all 4.26.1.

Is it happening on the completion of a lighting build? If you can compile code, you can try the following code modification:
in Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\Scene\Scene.cpp

replace


FPlatformAtomics::InterlockedExchange(&Percentage, FMath::Max(FMath::FloorToInt(SamplesTaken * 100.0 / TotalSamples), 0));

with


 int32 IntPercentage = FMath::FloorToInt(SamplesTaken * 100.0 / TotalSamples);
IntPercentage = FMath::Max(IntPercentage, 0);
// With high number of samples (like 8192) double precision isn't enough to prevent fake 100%s
IntPercentage = FMath::Min(IntPercentage, SamplesTaken < TotalSamples ? 99 : 100);

FPlatformAtomics::InterlockedExchange(&Percentage, IntPercentage);

Fixes are scheduled for later releases, yet as we know we’re slower than our usual release schedule

It is happening at the completion of light build. I tried your fix and recompiled but unfortunately, the light build crashes at the same stage with the same error.

I can confirm ive been having this exact same issue ever since 4.26.1 came out (worked perfectly in 4.26.0).

After many weeks I’ve detected that the problem is caused by the Landscape. No way to fix it.

By the landscape ???

It would be very helpful if you guys can provide a project that reproduces the problem :o

I think I’ve got the fix:
In Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\Scene\Scene.cpp: around 2817
change
int32 SrcRowPitchInPixels = Lightmap.GetPaddedSize().X
to
int32 SrcRowPitchInPixels = GPreviewLightmapVirtualTileSize;

Just got this crash when encoding lightmaps
RTX 3090
128GB Ram