Somewhere a week ago, Unity can still bake light, everything is normal, then starting from 3 days ago, Unity stuck at “Preparing Bake” when the button “Generate Lightning” is clicked.
The Unity version is 2019.4.30f1
I have tried to shrink the size of the scene
I have tried to crank the numbers downwards.
Realtime Global Illumination is turned OFF
The used lightmapper is Progressive CPU
Lighting mode is Shadow Mask
Auto Generate is turned OFF
While Unity is preparing to bake, the progress bar jumps around, and sometimes it will flicker between “baking…” and “baking [ETA 00:00:45]” or some sort of time duration
Although Unity says it is preparing to bake, there is already one lightmap ready, and Unity is just stucking at Preparing bake.
A few weeks ago, when the project is bigger in size in the scene, somehow Unity can bake it, and now even the scene is smaller, Unity can’t bake it.
I’ve got the same problem. It used to bake just fine in about 10 minutes, now it gets stuck at “preparing bake” forever and doesn’t move past 5% while the estimated time counter just goes up and up to infinity. I’ve tried clearing the GI cache, reimporting, removing the library directory, even upgrading twice, all the way to 2022.2.16f1 (the latest at the time of this comment), and the problem persists. I am unable to generate lightmaps at all even through a couple days ago I had no problem. Any help?
Facing the same issue with 2021.3.24f1 - trying to bake a (newer) project, very small scenes that take about 1-2 minutes to bake on the same machine in 2022.2, but never finish baking in 2021.3 LTS.
The time just counts up infinitely during “preparing bake”.
Hi, I’m working with Unity 2022.2.18 and I’m having the same issue in a project.
A bunch of baked lights in the scene, baked lit materials, when I start the baking the process get immediately stuck on “Preparing bake” with the progress bar that jumps from around 5% to 99% with no logic, and with no end to this.
I have the same settings of another project with same unity version and where I didn’t have any problems of this kind. I’d like to know if there are any workaround other than create a new blank project and rebase everyhing in it.
Hey!
Since this took me the better part of two days to figure out, here’s what fixed it for me:
The issue is the same (Unity 2022.2.17f), the remaining time just counting up infinitely during “preparing bake…” / 5% completion. Using any of the any of the baked global illumination visualizers in the Scene View also caused the progress bar to jump up and down, but never making any progress.
In my case, the culprit was an animated shader is used for parts of my GI contributing geometry. Unplugging the “Time” node in the relevant shader graph resolved the issue.
From my limited testing, this issue seems to appear when the “Time” node is contributing to either the base color or emission channels of the fragment shader or any of the vertex shader’s channels)
I managed to find the same solution a couple days ago, I removed from the scene all the objects with animated shaders to find out which was the problem. The thing is that there were no clues on why this could create this problem, and the progress bar behaviour is kinda weird.
I have the same issue with Unity 2022.3 LTS. I have a strong PC and it stuck at prepare baking.
Sometimes it works but then it got stuck. Then I have to reimport to have a small chance for it to work.
I am experiencing the same issue with Unity 2021.3.25f1 LTS. The first time, it prepares for bake successfully, then it bakes the lighting and finalizes the bake. However, when it starts the reflection jobs, it gets stuck in a loop of “preparing for bake” slider without any end.
I have tried everything, including checking if any objects in my scene are using animated materials, ensuring that only meshes that should be static are marked as such, changing the light bake settings, and upgrading to Unity 2022 LTS. However, none of these solutions have worked consistently. Sometimes it bakes in one go, while other times it takes forever.
Has anyone ever found any solution for this?? I’m frustrated and need to bake lights at high quality, which takes approximately 25 minutes to bake one time on RTX 4080 with 512 direct samples. I can’t handle this with Unity baking it multiple times, endlessly and each time it takes 25 minutes!
I had to put my mthod in after reading this to help, it 2026 now, Using 2022.3.22f for a small VRChat world bake.
I have 1 scrolling texture with 1 object that is a void. I read the forms here, and tried unplugging it from animtion, that didnt work, so then I tried deleting it while it baked, Thats worked, so then I looked into a insane easier method.
Turning THIS off for anything that moves while baking, and IT WORKS!
I guess if it moving it can’t really bake it cause..well it moving it UVs, so this is best answer, let me know if works for you all!
Edit: It hit and miss, it does improve it, but I am looking at working how to make it just..do it
Edit2: It stopped working after posted, it did it once
Edit3: This is WEIRD but I was able to bake, but I had to left click and old my scene while it did it???
So..that worked and worked each time??
It does lock you camera in, so if you do this on fast GPU, go to top right and click layout > default
I wish I was joking that this worked.
Hey everyone, what caused this for me was the fact I had a door that i had set to static and it had children with animated shaders and or the door itself so just make sure things that shouldn’t be static arent static.