Lightmaps always bake but UNity says it's out of memory to store them

Hello, I’ve been having a problem with the Unity lightmap baking. It bakes the lightmaps, at least I’m pretty sure it does because everything looks good, but it doesn’t completely finish, it goes to “1/1 Write Lighting Data” step and then just continually has these errors

Failed to reserve memory for scene-based lightmaps.

Integrate failed on Write Lighting Data job.

It seems to have all the memory and hard drive space it would need, the GI cache is set to something like 128GB

I have to hit the cancel button on the lightmap bake to stop Unity constantly trying to copy these exr and png files somewhere. It looks like it’s trying to copy these files somewhere, can I just do that manually somehow?

So it’ll look good in the editor until I try to leave and come back or make a build, then it looks like crap, everything is blue and red and not lit at all.

Any ideas? This project has been used across several Unity Versions, is there a way to clear out lightmap data that might clear this up? I’ve already tried deleting the whole library folder and having unity rebuild the project but no matter what or if I’m using enlightien or progressive lightmaps i get the same thing.

I’ve seriously been trying to figure this out for days now and I’ve tried so many things and Unity versions but I keep getting the same result, it works but it refuses to complete the last step and it essentially does not work at all because of that

Google Photos

this is really frustrating, since there’s no indication what the problem is I just have to try everything to see if anything works

I might be close to tracking down the issue. I can get it to work right with certain things disabled, what makes it really tough to figure out is you can’t just disable stuff to make the error stop, you have to disable the objects and restart unity then try to rebuild the lightmaps, that made it hard to figure out.

Hey! Judging from your screenshot, it seems that you have both realtime GI and GPU lightmapper enabled. Do you really need to use both? If the lighting in your scene is going to be mostly static (that means no dynamic time of day, etc.) then you’d be better off using progressive lightmapper only.

What I would suggest to do now, is disabling realtime GI, and switch to CPU progressive lightmapper. Disable light probes and reflection probes in the scene, and try rebaking. If the bake succeeds, then re-enable probes, and rebake again. We’ve had some issues in the past with the GPU lightmapper which prevented the scene from baking if light probes were present. It has now been fixed in the latest 2019.2 alpha.

I also have this issue, im using unity 2019.8.1. For me it occurs when creating a new scene then ADDING a new scene (Multi scene editing). Then do any baking with the Progressive CPU lightmapper. You will then see the errors spamming in the console. Saving the added scene first will prevent this but I would rather not. Also using the enlighten lightmapper will not yield these errors. Could this be a bug? Thank you.

Yeah, this sounds like a bug. We would be thankful if you would be so kind and report it. You can do this from Unity’s menu: Help > Report a Bug. More info about bug reporting.

Thanks rasmusn, I have submitted a bug report for this.

1 Like

I had this issue too, but I fixed it by clearing my GI Cache

I’m still seeing this error, but clearing the GI cache does not fix it. Unity 2020.2.1f1

1 Like

still getting this error in 2022.LTS

Same