Build lighting got stuck

I have finished a scene, and the lights were all movable at first, then I want to test static lighting for the same scene.
So I cloned it. Then I change everything to static, the meshes, lights are all static now, and when I started to build lighting, every time it got stuck at 99%, in Swam Agent, it showed that lighting build was complete, but it didn’t export result or finish it. So I though there were problems with my meshes, then I started to delete meshes from scene.
Every time I deleted a mesh from scene, I tried to build lighting, however, no luck there, the strange thing is, at first, Swam showed me it stuck at 99.43% when I deleted some of the meshes, it showed me it got stuck at 98.40%. Each time after I deleted some meshes, the percentage got lower, and I don’t know why that happened.
The weirdest thing now is that I have deleted everything in my level including lights, meshes, decals, sound cues, and I placed a fresh new directional light to test, but build lighting still got stuck at 50%. This is too strange for me, the scene now is just a empty black space with one single directional light and it cannot build light.

Another thing is I did test other project using 4.9 the same version as I used to create my scene. I just opened it with starter content and placed some chairs and a light, it can build lighting successfully. So it is may not the problem with engine, but my scene is now empty, but build lighting still get stuck, I don’t know how to make it right.

Hi, first check if Swarm Agent uses all CPU cores to build (mine use only one but I have 6 I do not now why) and second try to delete Swarm Cache

Thanks for that. I just checked CPU cores while it’s baking. When collecting photons in progress, all CPU cores were working (1 core at 100% while other 7 cores at 20% or so). And when it got stuck, all cores were not working anymore, but Swarm agent was still counting time. I tried to clean Swarm cache, but there is no difference, it still got stuck at certain point.
Another thing is, I just found some information online, some people said that if you are using 4.9 (no matter 4.9.0 or higher), and you delete the BSP floor from initial scene, or you change some settings of that floor, baking lighting may not work anymore. I have tested that, at least it is true for me. However, it I drag the BSP floor from Engine content back, I still cannot bake lighting while some people said it worked for them. I am gonna test 4.8 and 4.7.

Finally, I found a solution to this problem.
1. Check if you have deleted the “Floor” mesh in template scene. If it is not currently in your scene, you need it back.

2. Go to content browser, at the bottom of right side, there is a button named “View Options” with an eye icon.

3. Click that button, and a menu pops up, check “Show Engine Content”.

4. Now you can access the engine content folders, use filer to search the word “Floor”, then you will find a mesh called “SM_Template_Map_Floor”. This is the floor mesh comes with every new empty Blueprint Level.

5. Drag “SM_Template_Map_Floor” in to your current scene and make sure it doesn’t intersect with anything of your scene. It is needed to be there to get baking lighting finish, but you can place it anywhere you want, it doesn’t matter.

6. Rename “SM_Template_Map_Floor” to “Floor”, so engine thinks it is the one in template. (I don’t know why, but I get things right by doing so.)

7. Check if you have applied Lightmass Importance Volume. If you don’t have it in your scene, then you can proceed to build lighting now.

8. If you have a Lightmass Importance Volume, then you have to delete it in order to solve this problem. After deleting it, you should be able to build lighting.

9. The last thing needs to be aware of is, when you drag and drop “SM_Template_Map_Floor” into your scene, make sure you don’t change any settings of it, just change the position. Previously, I drag and drop it into my scene, and changed something, this solution still failed. So, don’t make any change to it.

This is not a fix since you have to delete lightmass importance volume, but at least build lighting will work properly. Hopefully it will be fixed in next update.
Edit: I have test my scene on 4.9.2 and a new scene on 4.9.2. Both worked. I think it should work with 4.9.0 and 4.9.1.

Thanks for this netseeker; I too had this issue and your step by step guide worked for me as I had deleted everything in the level including the floor. My project is in 4.9.2 as well.

Glad that it really helps, and hours ago, I did some test on 4.8.3. It seems this issue only occurs with 4.9. Adding lightmass importance volume is not a problem in 4.8.

Hello netseeker,

Thank you very much for the troubleshoots. This appears to be directly linked to a known issue that is currently being investigated. This does appear to be a 4.9 specific issue. It is related to a lightmass build where the lightmass is still running while the build itself stops at certain percentages.

The current bug number for this is UE-20782.

I am adding this thread to the increasing list of users that are experiencing this issue.

Again, Thank you guys for reporting this.