You press Generate Lighting, go make tea, come back, and the progress bar has barely moved. Or it sits on one step for an hour. Unity lightmap baking slow or stuck is almost never a bug. It is usually a bake that is asking for far more work than the scene needs: a huge lightmap resolution, too many samples, every object marked as a contributor, or the CPU lightmapper running when the GPU one could do the job in minutes. This guide shows where the time goes in Unity 6 and how to cut it without wrecking quality.
Quick Checklist
- Open Window > Rendering > Lighting and check which Lightmapper is selected.
- Lower Lightmap Resolution (texels per unit) for a draft bake.
- Lower Direct Samples, Indirect Samples and Environment Samples for drafts.
- Make sure small props are not set to contribute to GI.
- Turn Auto Generate off so the bake only runs when you press the button.
- Check free disk space and the GI cache size.
Change one thing at a time and time the bake. Otherwise you never learn which setting mattered. If the bake looks wrong rather than slow, the scene too dark guide covers the usual lighting mistakes.
Use the GPU Lightmapper
In the Lighting window, find the Lightmapping Settings section. The Lightmapper dropdown offers Progressive CPU and Progressive GPU. The GPU version is often many times faster on a decent graphics card, because path tracing is exactly the kind of work a GPU is good at.
- Video memory matters. The GPU lightmapper keeps scene data and lightmap atlases in VRAM. If the scene is too big, the bake can fail or fall back to the CPU, which looks like a sudden slowdown.
- Drivers matter. If the GPU option is greyed out or the Console reports that it fell back to the CPU, update your graphics driver and check that your GPU is supported.
- Close other GPU-heavy apps. A browser full of tabs, a game and an open Scene view all compete for the same VRAM.
If the GPU lightmapper keeps running out of memory, reduce the Max Lightmap Size or bake a smaller part of the scene at a time. Lightmap baking is also one of the few Unity tasks that rewards better hardware directly, which is why it shows up in our laptop buying guide.
Lightmap Resolution Is the Biggest Cost
Lightmap Resolution is measured in texels per unit. Doubling it quadruples the number of texels, so it roughly quadruples the work and the memory. A value of 40 on a large outdoor scene is a very common way to make a bake last all night.
| Use | Typical texels per unit |
|---|---|
| Quick draft bake | 2 to 5 |
| Mobile or stylised games | 5 to 10 |
| Detailed indoor scenes | 10 to 20 |
| Hero rooms or close-up showcases | 20 to 40, on specific objects only |
These are starting points, not rules. The right number depends on your art style and target platform. Two related settings also change cost:
- Max Lightmap Size sets the largest atlas. Smaller atlases mean more of them, but each is cheaper to handle.
- Lightmap Padding adds space between charts to stop light leaking. Do not set it larger than you need.
Instead of raising the sitewide value, raise it per object. On a MeshRenderer, open the Lighting foldout and change Scale in Lightmap. A value of 0 excludes the object from taking up lightmap space, and values below 1 shrink it. Give the floor of a boss room a larger scale, and give a distant wall a smaller one.
To see where texels are going, use the Scene view draw mode dropdown and look under Global Illumination. The UV Charts view shows how the lightmap space is split up, and quickly reveals tiny objects hogging big areas. Bad UVs cause their own errors; the lightmap UVs guide covers how to fix those in Blender.
Sample Counts and Bounces
The sample settings control noise. More samples mean cleaner light and a longer bake. The Lighting window lists Direct Samples, Indirect Samples and Environment Samples, plus Bounces.
- Indirect Samples is the most expensive and the most visible setting. Draft with a low value and raise it only for the final bake.
- Bounces above 2 or 3 give very small visual gains in most scenes, but each extra bounce costs time.
- Filtering (the denoiser) lets you use fewer samples. A low sample count with denoising on often looks close to a high sample count at a fraction of the time.
- Light Probe Sample Multiplier scales the samples used for probes. Leave it alone unless probe lighting looks noisy.
A sensible approach is two presets. Keep a draft preset with low samples and resolution, and a final preset you only use before a build. You can store these as separate Lighting Settings assets and swap between them in the Lighting window.
Compare baked and realtime costs honestly too. If a scene has one sun and flat ground, you may not need a bake at all. The baked vs realtime lighting guide explains how to choose.
Bake Fewer Objects
Every object that contributes to GI adds geometry to trace and space to pack. Many scenes bake hundreds of objects that never needed it.
- On each MeshRenderer, the Contribute Global Illumination checkbox decides whether the object takes part in baking. Turn it off for small props, clutter and anything that moves.
- Receive Global Illumination can be set to Light Probes instead of Lightmaps for small static objects. They then use probe lighting and take no lightmap space.
- Dynamic objects such as characters and doors should never be lightmapped. Let them sample light probes.
- Remove objects that are far outside the playable area, or hide them from the bake by switching off their contribution.
The same idea applies to lights. A Baked or Mixed light costs bake time, a Realtime light does not. Move small effect lights, like a flickering torch, to Realtime if the bake cost outweighs the runtime cost.
Auto Generate and the GI Cache
The Lighting window has an Auto Generate option. When it is on, Unity starts a new bake after you change lighting or static geometry. In a big scene this means the editor is constantly baking in the background, which feels like random slowness and constant restarts. Switch it off and use Generate Lighting when you are ready. If the whole editor feels sluggish for other reasons, see the editor slow guide.
Unity also stores baking data in a cache. Open Edit > Preferences > GI Cache to see its location and size. A full cache on a nearly full drive slows everything down. You can set a maximum size and clean the cache from there. Clearing it makes the next bake start from scratch, so do it when the drive is short on space, not before every bake.
A Fast Iteration Workflow
- Block out the scene and place lights with a low-resolution draft bake.
- Check the Scene view Baked Lightmap and UV Charts views for wasted space.
- Fix scale in lightmap on outliers, and turn off contribution on clutter.
- Use light probes for dynamic objects.
- Run one final high quality bake before building.
Splitting a huge world into several scenes, each with its own lighting, also keeps individual bakes short. This matches how large projects load content anyway.
💻 Baking is hardware hungry
Lightmapping is one of the heaviest jobs in Unity, and a stronger GPU makes a big difference. See our guide to budget laptops for Unity development before you upgrade.
Troubleshooting
The bake progress bar is stuck at the same step
Large scenes spend a long time in early steps such as preparing or clustering, and the bar may not move for several minutes. Check the bottom right of the editor for the current job name. If the CPU or GPU is busy, it is working. If both are idle, cancel the bake and start it again.
The GPU lightmapper is unavailable or falls back to CPU
Update your graphics driver, close other GPU applications and reduce the scene size or Max Lightmap Size. If the message in the Console mentions memory, VRAM is the limit.
The editor freezes while baking
The GPU lightmapper uses the same graphics card as the Scene view. Close extra Scene or Game windows during the bake, or turn off Auto Generate so the bake only runs when you choose.
The bake finishes but the scene looks the same
Objects must be marked as contributing to GI, lights must be set to Baked or Mixed, and the scene must use the Lighting Settings asset you edited. Check the Baked Lightmaps tab in the Lighting window for generated maps.
Lightmaps are huge and the build size jumped
Resolution is too high or Compress Lightmaps is off. Lower the resolution on large surfaces and enable compression. The build size guide has more ways to trim a build.
Bake restarts every time I move an object
That is Auto Generate. Turn it off in the Lighting window.
FAQ
How long should a lightmap bake take?
It depends on scene size and hardware. A small test scene can bake in seconds on the GPU. A large detailed level can take much longer. If a small scene takes hours, a setting is too high.
Is the GPU lightmapper lower quality than the CPU one?
Both are path tracers and aim for similar results. The GPU version is mostly limited by VRAM, not by quality.
Do I need to bake lighting at all?
Not always. Realtime lighting works well for small scenes and simple setups. Baking helps most on mobile and on scenes with lots of static lighting.
Can I cancel a bake without losing my scene?
Yes. Cancelling only stops the lighting job. Your scene and settings stay as they were.
Should small props be lightmapped?
Usually not. Turn off Contribute Global Illumination or let them receive light probes instead.
Reader questions
Asked by readers of this article and answered by AI. Behavior can differ between Unity versions, so test in yours.




Leave a Reply