Light baking issues

I’ve had no end of issues with UE4’s built in light baking. First of all “Building Lighting” gets stuck at 0%, which also causes the engine to just sit there, with 0% cpu, disk or networking usage and unresponsive. I left it on overnight and it was still just frozen almost 20 hours later, This causes any saves you’ve done that session to either corrupt or revert.

I’m not sure how to reproduce but play around with modular meshes and light baking and you’ll run into it in no time.

Lastly when it does work the auto-generated UV’s are really bad, super low res even at 8k x 8k and with lots of light leaking.

Ideally speaking you should only be using the autogenerated UVs as a last resort, in my experience they are handy for simple meshes if you need to get something sorted in a hurry but I’d always UV in my content creation tool for preference.

Is there any chance you could post up a small project that demonstrates the issue?

Hi Chaoss,

Building lighting for lightmass is a very intensive process and can use a lot of memory. The build lighting may appear to be stuck at 0% but it is still working. Depending on a number of factors there could be a cause for this. Some of the more prevalent ones are as follows:

  • Limitation of System specs
  • Lightmap Resolutions for static meshes
  • not including a tightly confined lightmass importance volume around playable areas
  • Number of assets that need light build information
  • whether light build is using Production or Preview settings

The list could probably go on and on and one of the reason that Eric and I are putting together a Wiki guide to help with lightmass issues. Once we’re done we’ll post some of the more common issues and resolutions here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

It may be a couple of weeks before we get everything fully up with the lightmass troubleshooting but we’re actively putting the guide together.

As a point of reference with complex scenes, this is a side project that Eric and I worked on outside of work: Ghostbusters - Library - Game Development - Epic Developer Community Forums

The library had thousands of books all originally casting shadows. When I built at home with my mid-range PC the lighting was still chugging away after 13+ hours at only a few percent. When I was able to reduce the number of objects casting shadows this helped improve the speed. Using the PCs we have here at Epic (32 gb, GTX-770-4gb, 6 core processor) I was able to build lighting in just under 6 hours with everything casting shadows. As I optimized the scene with what was needed and by using swarm agent linked with some of the other computers in the room to build lighting I was able to build lighting in just over an hour for the entire project.

All of our assets were using very modest lightmap resolutions unless it needed to be set higher. I think the largest LM resolution of any particular asset was 256 (the card catalogs).

With regards to the Auto-generated LMs, and true of any lightmaps, if you have a very complex object and you have to reduce it down to a the 0,1 space for the 2nd UV it will not give you the best results. The best idea here is to break the object into multiple pieces that can be assembled and maximize the space usage in the 0,1 space.

I hope this helps.