"lighting needs to be rebuilt" every time the map is reopened

I have one specific map, very simple, that lost it’s lighting information every time it is reopened.

When I click the build button, the lighting is built without any problem. When I click the play button to play in editor, it doesn’t show any error or warning.

But if I close the editor and reopen the same map again, the “lighting needs to be rebuilt” appears when I play in editor. Always.

The same thing happens when I pack the game. Even if I build the light before (again, without any error or warning).

Only one map has this problem, all other work fine.

How do I fix that?

(Just to avoid a common answer: “Force no precomputed lighting” is not a solution)

Hi marcio,

There are a few things that could lead to this issue so the first thing we need to do is narrow down and collect information. You can find out what lights/assets in your scene are causing this error message by opening your console command and typing DumpUnbuiltLightInteractions.

Once you look at your output log you should find the problem assets or lights listed. If your entire scene is loosing your light map data that would be good to know as well!

Since this occurs in just one of your maps we just need to pick apart that map to see what is different about it compared to the good maps. Are you using sub levels and loading/unloading them in your problem map? I’ve seen this issue come up as a result of that as well if things aren’t handled correctly.

Also, it looks like the same guy is posting everywhere the wrong solution “Force no precomputed lighting”. I’m not sure why he is doing this, but I would recommend ignoring him (Midsoft Inc.)

,

Sorry Ed, I was a little busy before and I couldn’t do the steps, but I did it now. DumpUnbuiltLightInteractions gave me nothing much… I built the lights, I called DumpUnbuiltLightInteractions and this is the output:

DumpUnbuiltLightIteractions
Lights with unbuilt interactions: 0
Primitives with unbuilt interactions: 0

If I restart the editor and run the DumpUnbuiltLightInteractions again, the output shows that all lights and objects are unbuilt:

Lights with unbuilt interactions: 1
Light Sun
Primitives with unbuilt interactions: 5760

And then a list with all the static meshes on the map.

So, it looks like your light is causing the issue and based off the number of objects that need to be rebuild I would assume it is your directional light.

You can try a few things like removing that light and replacing it with a different one. You can also try testing other light types to see if they cause the same issue.

You may need to check the difference between your working maps and the broken map to see what is different as well. I found that the best way to solve an issues that is unique to one map is with trial and error testing.

Also, feel free to upload a small sample project that reproduces the issue and I may be able to figure out what’s going on.

,

I think some comments disapear from this thread… anyway, I don’t know what is the problem exactly, but I had some static meshes with unlit materials being spawned on my BP’s construction script. They are configured to static mobility. I changed this to “Stationary” and now the problem is solved. I don’t know why it was not a problem before, but I think it is now.