Download

Luoshuang's GPULightmass

If I had to guess, I think a sticking point with Epic putting this into the engine as an official plugin maybe due to it being a NV/CUDA only feature. Judging from their previous stuff, they prefer things to be hardware agnostic. I guess if it ever gets ported to OpenCL, maybe it’ll be an option.

Dumb question, but how do I know if GPU Lightmass is working? The progress window popped up once in one project, but when I open other projects and bake lighting it doesn’t open. Is there a way to tell if its working or not? Does it only work if X,Y,Z or is it working but I just cant tell?

Thanks,

I have this error when buil project. I use UE 4.19.2. Please help me!

@Luoshuang so i came across this just yesterday, and i couldnt Keep waiting to test it myself i did a realy quick and dirty simple Scene just a room with a Sofa.
So far im so fkn HAPPY !!! that i FINALY got rid of those fkn anoying ugly black splotchy lines in Corners no matter how perfect your UV maps are i think everyone here who played with extremely low Level scale Settings knows what im talking about. But i also noticed a few Things i might be wrong.

After the First Bake which took only 1:48 with 2k Lightmapps on every single object and 4k on the walls and Floors o.O i was first impressed how detailed the shadows are and crisp and clean everything looked i could never achieve that with the normal Lightmass even with high Settings.

BUT !!! after i took a look at the Lightning only mode i noticed immediately that there is no Sky light Multi bounce ??? the whole lightning no matter how detailed and crisp and clean it looked. It was too dark also it lacked in Depth and all those nice collor variations you get from the sky light Multi bounce which i used the day you released it back then before Epic itself did it.

    Question: @Luoshuang do you plan to implement the sky light Multi bounce for future Builds of the GPU Lightmass ? i think if you could manage to implement it we could finaly achieve Ofline                          Rendering Quality in UE4 with reasonable Rendering Times


    Lightmap                       resolutions used in the screenshots 2048 for the Sofa, Plant and Window and 4096 for the Walls Floor etc.
    GPU:                             Gigabyte G1 Gaming GX 1080 OC @ 2,1GHZ  
    Render Time GPU:       1:48
    Render Time CPU:        38:41
    equal settings

edit:

This could be related to the GPU timing out due to heavy workload, it’s usually accompanied with the ‘unspecified launch failure’ error. Did you change the TDR (Timeout Detection and Recovery) to a higher number in the Windows registry? Windows defaults it at only 2 seconds, try changing it to a higher number like 300. It’s explained how to do this in the original thread post, or you can look up it up yourself on other sites.

Looks like there’s one sneaky thing going on inside GPULightmass. GPULightmass uses ‘Two Sided Emulation’ by default on all two sided materials - which means it tries to make all surfaces emit on both sides, each side with half energy, which could be the problem why people are seeing darken environments and light leaks. The original purpose of this feature(bug?) was to approximate the behavior of scattering of things like leaves in a forest so that you get ‘green-ish’ environment lighting atmosphere, or papers and thin curtains.

For the skylight multibounce, since GPULightmass doesn’t uses photon mapping the skylight gets natural support of multiple bounces.

Currently the workaround is to turn off two sided on these materials. While it should be a not so hard fix on my side, I’m scheduling my relocation so I cannot write codes in recent days. Sorry for that!

Hi,

Where did you find this scene? I was looking for it for a long time. Can you help me about it?

Hello,
we have installed the UE4.19.2 and the GPULightmass 4.19.2.
When we try to build a scene the GPU Renderer crashes with the message “Illegal Memory access was encountered”

https://forums.unrealengine.com/filedata/fetch?filedataid=138497&type=thumb

https://forums.unrealengine.com/filedata/fetch?filedataid=138498&type=thumb

Does anybody know how to fix this ?
We tried to add the TdrDelay in the Regedit but this doesnt work.

System:
AMD Ryzen Threadripper 1950x
Nvidia Titan X

This error can be related to overclocking. Some non-founder version NV cards (like my ASUS GTX1080) run into this error frequently. I solved the problem on my card by applying a -200MHz shift.

Same error here with 1080ti, tried all 3 quality settings but no luck :frowning:

@Luoshuang

I’d love to build lighting using GPU, but then I’d like to use those lightmaps with another fork of UE4. How would I do that (if I could at all)?

Any chance this solution will make it into 4.20 official branches ?

The source installation method is mentioned in the main post :slight_smile:

Hi,
Can I use more than one GPUs that are in same motherboard?

It should be in 4.20 anyway

This is so incredably awesome. Just want to say thank you so much!!!

I tryed to bake with swarm, my scene bake in 53s on my first PC, but when i active swarm with 4 PC, i exceed 2 min… any idea? (my version is 4.19 VXGI version rebuild)

Apparently i have a large level that gives me an out of memory error after about 4 hours of rendering on swarm… oddly enough it only takes 8-10 hours to render on default unreal stock renderer on production…

How do i not get out of memory error?

One way is to reduce the quality by setting MappingSurfaceCacheDownsampleFactor in BaseLightmass.ini to higher values like 4 or 8. Also I think you always want to use the fast preview quality preset firstly to check whether you will run into any errors so that you won’t waste time :).

Thanks for the response ill give it a try. What does **MappingSurfaceCacheDownsampleFactor **actually do?

I’m running this error when I try to compile! When I changed to GPU it was OK, but today…I changed two things on my scene and it appears.
Any idea how to repair?

Thanks.

<Nenhum> === Lightmass crashed: ===Unhandled Exception: 0x80000003
Unhandled Exception: 0x80000003

0x000000004322BA51 GPULightmassKernel.dll!UnknownFunction ]
0x000000004312EE02 GPULightmassKernel.dll!UnknownFunction ]
0x0000000043134A0D GPULightmassKernel.dll!UnknownFunction ]
0x000000004313671D GPULightmassKernel.dll!UnknownFunction ]
0x000000007883CFB2 UnrealLightmass.exe!UnknownFunction ]
0x0000000078809691 UnrealLightmass.exe!UnknownFunction ]
0x00000000787B1E41 UnrealLightmass.exe!UnknownFunction ]
0x00000000787DCF32 UnrealLightmass.exe!UnknownFunction ]
0x00000000787FED72 UnrealLightmass.exe!UnknownFunction ]
0x000000007888CF70 UnrealLightmass.exe!UnknownFunction ]
0x00000000B4E93034 KERNEL32.DLL!UnknownFunction ]
0x00000000B6E51551 ntdll.dll!UnknownFunction ]
0x00000000B6E51551 ntdll.dll!UnknownFunction ]