Luoshuang's GPULightmass

I tried to install this to give it a whirl, and I’m getting this error when I try to build lighting. I already did the TDR fix and nothing changed. Any ideas? <None> === Lightmass crashed: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:d:\build++ue4+release-4.19+compile\sync\engine\source\runtime\core\public\Containers/Array.h] [Line: 610]
Array index out of bounds: 2048 from an array of size 0

0x000000006D174008 KERNELBASE.dll!UnknownFunction ]
0x00000000388A5E24 UnrealLightmass-ApplicationCore.dll!UnknownFunction ]
0x000000000F26A48B UnrealLightmass-Core.dll!UnknownFunction ]
0x000000000F1AD258 UnrealLightmass-Core.dll!UnknownFunction ]
0x0000000096B2FE25 UnrealLightmass.exe!UnknownFunction ]
0x0000000096B304EF UnrealLightmass.exe!UnknownFunction ]
0x0000000096B16D5D UnrealLightmass.exe!UnknownFunction ]
0x000000000F3DCCFC UnrealLightmass-Core.dll!UnknownFunction ]
0x000000000F3D0A53 UnrealLightmass-Core.dll!UnknownFunction ]
0x00000000709B1FE4 KERNEL32.DLL!UnknownFunction ]
0x0000000070C7F061 ntdll.dll!UnknownFunction ]
0x0000000070C7F061 ntdll.dll!UnknownFunction ]

GTX 1080 by the way. I also tried reducing lightmap resolution on everything to 128 at max, and it still crashes.

This error is unrelated to GPULightmass actually. It’s the editor timed out for rendering viewport. You can try the command line trick to prevent this.

I believe this is also unrelated to GPULightmass since it looks like the famous SwarmAgent cache problem. Try cleaning cache in the SwarmAgent window.

Thanks . It still didn’t work though :frowning:

Here is the swarmagent log if it helps: 10:44:22 AM: [CleanCache] Clearing out the cache by user request10:44:22 AM: [ - Pastebin.com

It looks like Lightmass had crashed even before GPULightmass kicked in. I have no idea about what was happening. Sorry :frowning:

Oddly enough there is no difference in render time when rendering with a gtx 980 + 980m vs gtx 980 +980m + gtx 780… Any idea why?

Huh, after deleting/reinstalling your Lightmass and restarting UE4, it worked.

EDIT:

After running a few successful tests on smaller maps, I tried to run a bake on a pretty big map using the command line. After the “Building BVH” bar gets to 100%, I get an error that says “invalid argument.” When I press OK on that, it gives me this: https://i.imgur.com/pwswHGe.png

After hitting “retry,” it fails and then gives me this output log: [2018.05.27-14.58.25:921][ 0]LogStreaming: Display: Took 0.310s to EndInitText - Pastebin.com

Can i continue to adjust Lightmass value to improve shadow quality?An error occurred when i not checked compress lightmaps.

Your work is incredible! And it makes me question Epic’s priorities regarding its engine … Lightbaking by gpu is so important to indie developers that it should already be present in the engine. You have proven that this is possible and that besides the huge advantage of rendering speed, it still has an exceptional quality compared to the Lightmass standard.

Thank you very much for helping the community in ways that Epic does not care.
You need to read how important your contribution is to staying motivated! Congratulations!

just a question to anyone who can answer me:

in one of my scenarios, the lighting is all black, except for the direct light of the directional light (without indirect lighting). I left the light source angle value at 1 and I deactivated the Use Area Shadows option. This light is static.

In addition to directional light, I have a skylight with an hdr, also static light that does not seem to be illuminating the scene. the result is all black.

Any idea what I might be doing wrong?

While I would like to work and debug the problems you guys have, I’m currently on my relocation to Cary, NC and my desktop computer is still in transport so I cannot work on codes. Sorry for that! :frowning:

Wait… Does it mean you gonna work on GPU Lightmass as regular Epic employee? :slight_smile:

Please let the rendering Gods show us favor and let this be true

I finally build one of the 3rd party UE4 forks with GPULightmass. How would I know UE4 is using GPULightmass and not vanilla Lightmass ? When I built lighting on a very small level, I didn’t see any special progress indicator. Everything seemed as usual. Since level was tiny, I can’t really tell building speed difference.

The attached screencap is a new window you should have with the GPU lightmass when you start a bake. The CPU (OG) lightmass doesn’t have it.

Hmm… I didn’t see that one :frowning:

I had the issue with freezing baking status windows when I switched lightmap resolution to 4K, but 2K worked fine. Please lower some lightmaps to 2K or lower.

Alright, getting another issue :frowning:

Initially I followed the instructions, copied files where they should be and of course those files got overwritten during solution build process. That’s why I wasn’t getting any indicator for GPULightmass building lighting.

However, after I copied GPULightmass files over the freshly built engine, I got this error (screenshot attached). Any idea what’s going on?

Thanks beforehand

P.S. I am not sure why it’s not taking this path “…/Win64/GPULightmassKernel.dll” - the file is there.

P.P.S. Now that I am thinking about this in the morning, I might have updated the source with newer release, but never updated the code in Lightmass.cpp :confused:

========================

if .ini is impossible yet
can you make this hardcoded version for us ???

Ultra Ultra :slight_smile: High: 256 * 256 * 2 (Fixed) + 256 * 256 * 2 (Adaptive) = 262144

https://docs.chaosgroup.com/download/attachments/13835410/image2014-11-30%2020%3A4%3A51.png?version=2&modificationDate=1494267016000&api=v2

portal lights doesnt work on GPU lightmass ?
it seams so
with or without portals took 30 minute to render

similar to wilkes, I’m getting an error (attached)
Its not consistent though, was just testing a scene and went down to a very basic level, basically just a simple plane and point light. When that was the only object in the scene I would get that error immediately, however if I added a second mesh to the scene it would bake fine.

I used the high quality settings on a scene i am currently working on and when it baked, the lighting was extremely bright and blown out compared to default ligtmass.ini. Also, I have so much blotchy noise, even with the light turned way down its completely covered in noise. Should I have to completely rebuild my lighting from ground up to use this tool?

EDIT: MY BAD! I USED A LOT OF EMISSIVE AND AFTER SETTING BOOST TO '0’ON EACH MESH WITH EMISSIVE THE SCENE RENDERS REALLY NICELY. GREAT WORK:P