Unity re-bakes lighting every build, takes > 8 hours................................................

I have the GI Cache set to the max 200gb in preferences, I have a $4,000 computer with a gtx 980 and octo core i7 and 16gb of fastest memory available when ordering, and a 1tb solid state drive I’m working from ffs.

I sat through several hours to bake a 256 x 256 atlas size at only 10 resolution (just to make sure it even works after I let it run for 2 days and it never finished on 2048 atlas) on a scene that has <400k vertices total and not very complicated (flat color materials), pc platform build.

I made sure I generated lightmap UV’s for all my models when trying to figure out why it takes so long.

I can play in the editor and it looks great, now I go to make a build and it wants to re calculate all the baked lighting. I let it run all night and it finally made a build. Now I go to make a new build after editing a script, and it’s re calculating all the lighting AGAIN.

It also happens to me.
Try to disable auto in the lighting window and then hit bake

That’s my hardware spec. I do have all my meshes split up though, so do you have a large mesh or terrain there which isn’t split up? it’s not really about poly count but more to do with how much space it takes up.

Do you mean number of submeshes or like the world scale it encompasses (in meters)?

This is the entire scene:

The props aren’t static and they’re also not submeshes of the building anymore. There is 1 directional light in the scene and it’s set to baked.

The only static mesh is the barn building and floor plane which are 1 fbx…the barn has submeshes for the walls, roof, and the beams structure is split into a handful of meshes which are duplicated and positioned in Unity.

On the import settings I’ve made sure to generate lightmap uv’s. Any other ideas??

EDIT:: I disabled auto bake and made a build, I already have the lighting baked in the editor, looks good, but it doesn’t come through in the builds unless I click auto, which forces it to re-bake the lighting every time I make a build.

How much data do you have in the GI Cache? If it isn’t full, no files are purged and the rebake must happen for some other reason (maybe a bug).
Also, which version of Unity are you using?

Unity 5.3.3f1

Max Cache is set to 200gb but actual cache size is 9.91gb.

I even cleared the cache after increasing the max to 200gb, sat through another rebake, and it still wants to rebake for every build.

This sounds like a bug. Once you have baked and if the cache isn’t full, all files should be available so it shouldn’t rebake. Could you please file a bug report with your scene?

Yea. I have to rebake on every build. I also have ambient occlusion at 0 and, well, it’s building ambient occlusion. Unity 5.3.4p3

1 Like

Happens to me as well on 5.4.0f3, I wait for the auto to finish before making a build and then while building it starts the whole thing over.

As a workaround, build a Lightng Data asset (uncheck auto and hit build in the Lighting window), the data asset will be used every time you build a player.

Did any of you actually file a bug report?