When I click "Generate Lighting, Global Illumination is stuck at 5% and says, "Preparing bake."

I am currently going through the Creative Core pathway. I am on the “Bake a Lightmap for Your Scene” part in the Lighting section. On 5. I followed all the direction for baking a lightmap.

I am not using the scene they give you. I am using my own scene that I created.

I have set all my setting really low to make baking go faster.

When I click “Generate Lighting” in the Lighting Window, A window named “Background tasks” pops up and it shows Global Illumination at 5%. Just under that it says “Preparing bake…” It is currently at 6 hours left but the number started really low and doesn’t stop increasing.

I tried clearing my GI cache but that didn’t seem to change anything.
I am using Windows 10.
I am using the progressive GPU because I have OpenCl, 4GB on VRAM, and SSE4.1.

There is an error that says “(GetStatus) Cannot get existing Progress id 12.” It popped up when I clicked cancel to stop generating lighting the first time.

I personally gave up with baking and use their Realtime Global Illumination system instead.

But to answer your question, go to the SceneView window and press the cyrcle-icon next to the 2D-Button (at the top of the SceneView winow). Then select UV Overlap and make sure that there are no UV overlaps).

Also, do you use custom shaders or models with very high polycounts in your scene that are included in the baking? Maybe try restarting Unity/ your PC and try again. Also, are you using light probes heavily, because you’re also including visualization of light probes in the baking.

Hope this helps :slight_smile:

I have 0 light probes in the scene so I turned off light probe visualization.
I checked the UVs and didn’t see anything. I have no custom meshes. Everything in the scene are just basic built in Unity meshes; Cubes, Sphears, and Capsules.
I have 1 directional light. Two spot lights, one is static and one is realtime (I wanted to see the difference between them when I generate the lighting). I have one light attached to a cube.

I have one custom shader using Shader Graph that is attached to a normal Unity cube.
I zoomed in on the custom shader.

When baking, only lights that are marked as Static- and Mixed lighting are considered in the final bake. Realtime lights affect all objects permanently. Try disabling the shader and bake. You could also try to disable transparent objects additionally.

It would also be helpfull if you could provide your gpu model and the LightingSettingsAsset your using.

If nothing seems to help, you could try deleting the “Library” folder inside your project and restart unity (do a backup before if you do this). Baking also usually takes a very long time (based on how fast your gpu is and the complexity of your scene) - however for such simple scene it shouldn’t take that long.

It could also be bug, if nothing here works you could file a bug report (at least there’s nothing more that I would thin of).

Disabling the shader graph shader fixed it. Do you know of any common reasons why the shader graph shader is breaking the lightmap baking?

I’ve very little knowledge with shaders so I’m not sure where in your shader the problem is causing the global illumination to fail. You might try UNMARKING any object in your scene that uses a material with that specific shader as “static” if you do not absolutely need the illumination of the shader to affect you scene. However if you want GI from the shader you might try out light probes or use their new APV system (by marking marking the objects static AND going to their mesh-renderer an setting Global Illumination to “Receive from Light Probes” - this will make any realtime object receive GI from any object with that shader.

Hope this helps! :+1: