Epic's GPUlightmass

That’s truly bizarre. I never use real-time preview feature as I just want lighting to be built quickly. So, my last try was building with preview enabled and … surprise … it didn’t even work. I didn’t see any progress, nor I got lighting built.

1 Like

@Jimbohalo10 I think something else is at play here. I turned off precomputed lighting, purged lightmaps, reopened project, reenabled baked lighting, rebaked lighting with GPULM and got the same ■■■■ results.

Also went back to 5.2 project to see if I get different results. Somehow I didn’t even have GPULM enabled there. After I enabled it, when I pressed Bake Lighting I got this pop-up:
image
I said Yes, but now I recall that in my 5.3 project I said No. Maybe that’s what’s causing lightmaps issue in 5.3 ?
Anyhow, in 5.2.0 lighting seems to be more or less what it should be and new geo added to the scene casts shadows:

Hi @motorsep, When I patched the code to work with any Nvidia card. I got that message I said No as well, as the message says may break lightmaps. Then I let it modify the UV maps, it broke them. The really good thing for me is when I ran 5.3 binary with the LGPU patches, that fixed the problem. My errors were always that “shaders were missing”,never that my there was a problem with my GTX card. In the log files always shader compilation errors,or missing shaders.
I have cooked shaders everything for all configuration, but the shader name is always blank or a stupid numbers.
DXR is driven by Shaders,that the big failure for me.

It gets even weirder - I swapped material on those two “pyramids” with something from another static mesh that already casts shadows in the scene and bam!, “pyramids” started to cast shadows:

This is my mat that doesn’t cast shadows:

And what happens if you remake the material with the same textures that previously didn’t cast shadow? Maybe it just works now again?

5.3 and converted projects from previous versions gave me headaches before. Something under the hood I guess.

Nah, it was a fluke. I remade mat, applied it - no shadows. Applied mat that gave shadows before - again no shadows. I am tired. Going to use CPULM, like in good ol’ times.

2 Likes

hi @motorsep , for you and other reading this. The official fix is in 5.4.

There is an unofficial 5.3.2 patch described in post
GPU Lightmass not working on Landscape - Patch 5.3.2

Cool, but it’s no use to me since I’ve been having different kind of show stopper issue :sweat_smile: :frowning_face:

hi @Ozykz , @Arkiras , @brisck1 @motorsep @Miguel1900 ,
Following success of my patch for GPU Landscape.

GPU Lightmass not working on Landscape - patch fix post

I have taken the patch fix in 5.4 into my 5.3.2 version and rebuilt the binary patch sort of from the Commit.

I still need people to test UNTESTED this out. Report back here Please

EpicGPULlightmass-SavingBug/README.md at main · jimshalo10)

I suggest you back up the binary, if things do go wrong you could be in for a long wait for 5.3.2 to verify/restore

So, it’s a witchcraft… GPULM has its own mind I guess.


Changed nothing, except I ticked on SM6 for DX12 and Vulcan RHIs. Got all the shadows now building. Not complaining, but…

Why not to provide patch instead of prebuilt binary? I am use source build from Meta and I’d rather build my own.

Hi @motorsep ,
Thanks. The missing source is now in the available in repository
Engine\Source\Runtime\Renderer\Private\PathTracing.cpp

The README is updated with this information

1 Like

Alright, compiled and tested and … I am not sure what I am looking for. After I ticked SM6 for DX12 RHI everything started working again as expected.

With or without this fix, I tried applying/saving mats, moving meshes, etc. and GPULM bakes properly, fingers crossed.

1 Like

Hi Guys, I meet a problem from UE4.26 to UE5.3, the bake quality of GPU lightmss for ios mobile is poor, PC is good, but there are many noise in mobile. Even I use 32000 GI and close the compress in world setting,it is still not work. All the lightmap density is red, I think the light map resolution enough.
Anyone know what can I do? Thanks very mush.
This is PC

This is on iOS mobile

It seems that mobile can only use LQ LightMap, but…why it was so many tile of noises


I meet too, maybe I use 3 same static mesh in the levle? I find that the varible layout in FRDGParameterStruct is become NULL, this is why it is crash.

Maybe this is more clear, this is detail for the iOS preview.


Any tips on how to get a rid of these sharp edges after baking lighting ?

Same mesh in Blender before exporting to FBX:

Hi @michaelmonte ,
In Luoshuang’s GPULightmass not affected

In ue5-main (5.4) the main change in Epic GPU Lightmass announced are in Path tracer for DXR raytracing for color.
The quote from change commit is below

Path Tracing: Refactor how shadows are traced
Go back to using Any-hit shaders (AHS) instead of Closest Hit Shaders(CHS) for colored shadows in the path tracer. To avoid artifacts from the Bounding Volume Hierarchy(BVH) reporting multiple hits against the same primitive, simply use the payload to check if the previous hit is at exactly the same distance.

This assumes that redundant shader invocations happen sequentially, which seems like a reasonable assumption and does indeed seem to work.

The same change has been applied to GPU Lightmass as well.

The big change for 5.4 is recognition of the multiple processors.
Like when building from source the maximum number of CPU available is now used at runtime and this means the compiling each shader is allocated to a CPU.

This is similar to the Swarm process and recognises up to 64 CPU if you have at least 64GB memory. UE 5.4 will recognise the Nvidia RTX 4080 Hyper-cooler with 64 CPU.

You will need the latest version of Windows 10 22H2 at least

GPULM strikes again :frowning:
CPULM (medium quality):


GPULM (512 samples, irradiance cache):

Notice the seams? Why GPULM, why?!

Indoors indirect lighting CPULM:


GPULM:

While I am not overly concerned with darker indoors, I am very concerned with UV seams when baking with GPULM. Any fix for that?

@Matthew.Ivey just FYI, might be another bug ?

1 Like

Ugh, I think that GPULM cannot derive vertex normals from the mesh and requires normal map to be present, to avoid showing UV seams. CPULM doesn’t seem to have same limitation.

Both are GPULM:
Material without flat normal map (and with Lightmap Directionality setting on):


Same material with either flat normal map added, or with Lightmap Directionality setting turned off:

1 Like