Error when building Lighting - Need help

Hello!

I am currently building a map for some video making and I am trying to build the lighting after I added several amount of objects, foliage etc and it stops building and crashes. I have no idea how to fix it. I am a total beginner aswell so I understand very little what different things mean. So if there’s a fix, please be gentle with me and explain thoroughly. Images below!
(Also, thanks in advance and God bless!)

This crash appears (see below)

These also appear, but I am told these are normal (see below)

@Sandbawx the crash image is totally unreadable, just put it on the site here… 2nd message is normal.

Click on the link and left click on the image, it zooms. But I’ll put it here anyway. ^^
(here’s the zoomed version https://i.imgur.com/WusTjwr.png)

(Apologies if I misspelled anything)

=== Lightmass crashed: ===
Assertion failed: rtcDeviceGetError(EmbreeDevice) == RTC_NO_ERROR [File: D:\Build++UE4\Sync\Engine\Source\Programs\UnrealLightmass\Private\Lighting\Embree.cpp] [Line: 581]

0x00007ffa12801388 KERNELBASE.dll!UnknownFunction ]
0x00007ff9be40ceaa UnrealLightmass-Core.dll!UnknownFunction ]
0x00007ff9be2729b7 UnrealLightmass-Core.dll!UnknownFunction ]
0x00007ff9be1b62b9 UnrealLightmass-Core.dll!UnknownFunction ]
0x00007ff774e8e4a5 UnrealLightmass.exe!Lightmass:FEmbreeAggregateMesh::PrepareForRayTracing() ]
0x00007ff774eb8836 UnrealLightmass.exe!Lightmass::FStaticLightingSystem::FStaticLightingSystem() ]
0x00007ff774e5f44c UnrealLightmass.exe!Lightmass::BuildStaticLighting() ]
0x00007ff774e8a5dc UnrealLightmass.exe!Lightmass::LightmassMain() ]
0x00007ff774ead83a UnrealLightmass.exe!main() ]
0x00007ff774f30fcc UnrealLightmass.exe!__scrt_common_main_seh() ]
0x00007ffa160f3034 KERNEL32.DLL!UnknownFunction ]
0x00007ffa16283691 ntdll.dll!UnknownFunction ]

Edit: Found something on the internet, I am not sure if this is a fix. It does seem to explain something, but it’s total gibberish to me, how to fix it? ^^

Bump.

Still need help, anyone seen this before? D:

Try to clean cache in lightmass swarm agent menu, mayb that helps

@Sandbawx I think you’re just going to have to manually debug it. Delete everything and rebuild, then gradually put things back in and re-build until you find the culprit. ( Or remove latest objects etc ).

Rip life, huge map destroyed D:

Update: Removed all added foliage, tried to re-build lighting, this time it worked flawlessly, no errors or crashes.

I wonder why…

@Sandbawx Told ya… :wink:

@Sandbawx Hey! I see that this thread is super dead, but in case someone else stumbles across it, I was having a similar issue with lightmass. I was able to solve my issue by unchecking the default “Cast static shadows box” in my foliage types, so that they were only casting dynamic shadows with my stationary lighting. If I had to guess why this fixed my issue, is that the default of casting both static and dynamic shadows was too much for the Swarm cache to handle, thus causing it to crash before it got through 1% of the lighting. Hope this helps you, hopefully you’ve figured something out by now… lol, but maybe this can be of assistance to someone out there!

4 Likes

Hi all!

I’m reviving this topic to confirm that this issue is strongly related to Instanced Static Meshes.
Those errors started popping out when I optimized our game with instancing, not just foliage.

If you want to reduce a lot those errors, create a file called “DefaultLightmass.ini” and placed in Config. This increased my baking times from 10 h to 16h though, so be careful.
When I did it the errors disappeared.

[DevOptions.StaticLighting]
; Whether to use kDOP trees to accelerate volumetric lightmap voxelization. Useful in scenes like large forest
bUseFastVoxelization=true
; Whether to use static mesh instancing to reduce memory consumption in scenes like large forest. Might slow down small scenes.
bUseEmbreeInstancing=true

Cheers

2 Likes

thanks man you saved me