Lighting fails to build correctly in certain scenarios - Repro project included

Hi,

I have hit a very peculiar lighting rebuild bug. I keep getting the red warning text in game in game about unbuild objects, which seems to be related (I think!) to either the engine having an issue with my small lightmaps and/or staticmesh LODs.

A repro project.

https://dl.dropboxusercontent.com/u/2300830/LightingProblem.zip

Problem: Red text top left about unbuild objects remains after a lighting rebuild. Using 4.6.1. Problem has been reproduced on multiple computers so it is not my PC.

Expectation: Rebuild correctly OR at the very least communicate which meshes are the problem.

Repro:

  • Open repro project (4.6.1) and open the level LightingFailsToBuild in the project. Play the level.

  • Notice the warning about one unbuild object.

  • Rebuild lighting (any quality, using settings as they are).

  • Play again.

  • Warning is still there.

This repro level is extremely simple. It uses just three staticmeshes and one completely standard stationary light. There are no blueprints, there is absolutely nothing but 3 staticmeshes and a light. This should not fail.

The meshes used in this repro level are used thousands of times across my game. They rebuild fine in 99.99% of the time.

I have 4 levels that display this behaviour, so it is not something local to just one level. It is failing consistently on something unknown.

These levels are about 7000 staticmeshes large each. I have tried everything to try and pinpoint which meshes are the issue but it is hopeless. I managed to fix one of the 4 levels by pure trial and error. The objects that do not build are always the same ones it appears, but finding them is near impossible.

What I tried:

  • Ctrl X ctrl V does not fix it

  • Setting the light to Static fixes it (weird).

  • Copy paste to notepad and analyze the text format → cannot find a property or pattern in why this happens

  • If you delete ONE of the three meshes, the error goes away! Makes no sense. It complains about one unbuild object yet deleting any of the three meshes results in the error disappearing.

  • Setting Lightmap Override on the middle mesh to 32 fixes it! However when we tried doing this on our real levels we still end up with the error. It may be related to it not liking our 16 res tiny lightmaps in certain very specific scenarios.

  • Replacing mesh with another mesh fixes it, but that doesn’t help. We need this mesh + this mesh is used thousands of times elsewhere and appears to work fine.

  • I have tried the lighting rebuild statistics, primitive stats etc. I cannot find a pattern or a value in any of it that indicates which mesh is doing this.

I am at loss what more to do other than to manually go through a few ten thousand staticmeshes to find the about 20 unbuild objects we have across our 3 remaining levels.

Hey Hourences -

Received your map and I have already begun looking into this exact issue with another user, but your detailed steps above have significantly sped up my search. I can absolutely reproduce this issue and am now trying to hunt down the root cause. I will let you know as soon as we have anything.\

Thank You

Eric Ketchum

Hey Hourences -

Just an update. I spent some time trying to narrow down your test project and got it down to the barest possible reproduction, but still cannot get a definitive reproduction (meaning only one thing breaks and fixes it). I have passed the project on to our engineers to dig into the code (for reference UE-7689) and I will keep you informed as we continue our investigation.

Thank You

Eric Ketchum

Hi Eric!

Thanks for looking into it and keeping me up to date!

Are there any tips you might be able to give me on how I might be able to identify which meshes cause this? While fixing the problem would be awesome, if I could find out where the problems occur in the levels I could replace the meshes and at least we’d be able to produce builds of our game without the warning message.

Hey Hourences -

I cannot identify any specific item that was causing the issue, I was able to determine it was something to do with the meshes in that specific arrangement themselves as moving one (or the light) would appear to fix the issue and removing all materials will in fact not fix the issue.

I wish I could be more exact but as of now this is all the information that I have -

Eric Ketchum