25/02/2021
Right, let's get stuck into a common head-scratcher that many of us encounter in game development: that persistent 'Lights need to be rebuilt' warning. It pops up, often at the most inconvenient times, and can leave your scene looking a bit… well, unlit, or worse, covered in patchy shadows. While it might seem like a minor annoyance, understanding what's going on under the bonnet – or should I say, behind the scenes – of your game engine's lighting system is crucial for delivering polished, high-fidelity visuals.

This isn't just about making the warning disappear; it's about understanding the fundamental process of how modern game engines render light, shadow, and global illumination. We'll delve into why these builds are necessary, what they actually do, and perhaps most importantly, how to tackle the feeling of wanting to 'undo' a build you've just done. Because, let's be frank, sometimes you just want to rewind and see what you had before you pressed that button, don't you?
Understanding the 'Lighting Build'
So, what exactly happens when you 'build lighting' in a game engine like Unreal Engine, which is often where this particular warning appears? In essence, you're asking the engine to pre-calculate, or 'bake,' the complex interactions of light in your static environment. Instead of calculating every bounce of light and every shadow in real-time, which would be incredibly taxing on your computer's resources, the engine computes this information once and stores it in something called lightmaps.
Lightmaps are essentially texture overlays that contain light and shadow information. Think of them as a meticulously painted blueprint of how light falls across every surface in your static scene. This pre-computation allows for incredibly realistic global illumination, soft, diffused lighting, and crisp, detailed shadows without the massive performance hit that real-time calculations would incur. It's a bit like taking a high-resolution photograph of your scene's lighting conditions and then applying it directly to your geometry.
Why Baked Lighting is So Important
The primary benefit of baked lighting is performance. By offloading complex light calculations from runtime to a pre-computation phase, your game can run much more smoothly, especially on less powerful hardware. This is crucial for achieving high frame rates and a responsive user experience. Furthermore, baked lighting allows for a level of visual fidelity, particularly with indirect lighting and ambient occlusion, that is very difficult and expensive to achieve with purely dynamic lighting in real-time.
Why Do Lights Need Rebuilding?
The 'Lights need to be rebuilt' warning isn't just a randomly generated message; it's the engine's way of telling you that the pre-calculated lighting data is now out of date. This typically happens for several reasons:
- Geometry Changes: If you move, add, delete, or significantly alter any static mesh in your level, the way light interacts with it and casts shadows will change. The old lightmaps are no longer accurate.
- Light Source Adjustments: Moving, adding, deleting, or changing the properties (intensity, colour, type) of static or stationary light sources will naturally invalidate the baked lighting.
- Material Property Changes: If you alter material properties that affect light, such as emissiveness or roughness, the baked lighting might need updating to reflect these changes accurately.
- Post-Process Volume Changes: Adjustments to elements like ambient occlusion or global illumination settings within post-process volumes can sometimes necessitate a rebuild.
- Engine Updates or Project Migrations: Occasionally, updating your engine version or migrating a project can require a full lighting rebuild due to changes in the lighting algorithms or data formats.
In essence, any significant alteration to the static elements that contribute to your scene's lighting environment will trigger this warning. The engine is simply doing its job, ensuring that the visual representation matches the underlying data.
The 'Undo' Conundrum: Understanding Precomputed Lighting
Now, let's get to the crux of your question: how do you 'undo' a lighting build? This is where it gets a bit tricky, and the short answer is, you can't simply hit a magical 'undo' button for a full lighting build in the same way you'd undo a mesh movement. A lighting build is a complex, often lengthy, process that generates entirely new data (the lightmaps). Once that data is generated and saved, the previous lightmaps are overwritten or discarded.
However, what you're likely trying to achieve is to revert to a state where the precomputed lighting isn't interfering, or perhaps to simply disable it to see the scene with dynamic lighting only. This is where the workaround you mentioned comes into play, and it's a rather useful trick to have up your sleeve.

The Workaround: Forcing No Precomputed Lighting
The solution you found is spot-on for effectively 'undoing' the *display* of precomputed lighting, even if the data itself still exists within your project files. Here’s how you go about it, step-by-step:
- Open World Settings: In your game engine editor, locate the 'World Settings' panel. If you can't see it, you'll usually find it under the 'Window' menu.
- Navigate to Lightmass: Within the World Settings, scroll down until you find the 'Lightmass' section. This section contains all the global settings related to your baked lighting.
- Find 'Lightmaps' Subsection: Under the Lightmass settings, look for a subsection specifically labelled 'Lightmaps'. This is where the core setting resides.
- Check 'Force No Precomputed Lighting': You'll see a checkbox labelled 'Force No Precomputed Lighting'. Give that a tick.
- Rebuild (As Requested): Once you check this box, the engine will likely immediately display the 'Lights need to be rebuilt' warning again. This is perfectly normal and expected. Go to 'Build' in your main menu and select 'Build Lighting Only' (or 'Build All', if you prefer). Even though you're building, the setting you just enabled will ensure that the *output* of this build effectively tells the engine to ignore any precomputed lightmap data for display purposes.
What this setting does is, as the name suggests, forces the engine to ignore any baked lightmap data for rendering. Your scene will then primarily rely on dynamic lighting (lights set to 'Movable' or 'Stationary' that calculate in real-time) and any default global illumination solutions provided by the engine. The baked lightmaps themselves might still exist in your project, but the engine won't display them.
When to Use This 'Undo' Option
This 'Force No Precomputed Lighting' trick is incredibly useful in several scenarios:
- Debugging Lighting Issues: If you're struggling to diagnose why a particular area looks wrong after a build, disabling precomputed lighting can help you isolate whether the issue lies with your baked lightmaps or with your dynamic lighting setup.
- Quick Visualisation: For rapid iteration on level design or rough blocking out, you might not want to wait for lengthy lighting builds. This allows you to see your scene with basic real-time lighting immediately.
- Performance Testing: You can use it to compare the performance impact of relying solely on dynamic lighting versus baked lighting.
- Scenes with Predominantly Dynamic Lighting: If your scene is mostly dynamic (e.g., a fully outdoor environment with a movable sun and no static geometry for baking), this setting ensures you're not inadvertently trying to use precomputed lighting where it's not needed.
It's a fantastic temporary solution or a deliberate choice for certain project types. However, it's generally not recommended for your final, shipped product if you're aiming for high visual fidelity and optimal performance through baked lighting.
Precomputed vs. Dynamic Lighting: A Quick Comparison
To further clarify why this 'undo' workaround is significant, let's briefly compare the two main approaches to lighting in game engines:
| Feature | Precomputed (Baked) Lighting | Dynamic Lighting |
|---|---|---|
| Performance | Excellent runtime performance (low cost) | Higher runtime cost (demanding) |
| Fidelity | High-quality global illumination, soft, diffused shadows | Real-time, but often less realistic indirect light |
| Flexibility | Static; changes require a re-build | Real-time; reacts to all changes instantly |
| Build Time | Significant; can be very long for complex scenes | None (rendered instantly at runtime) |
| Memory Usage | Uses lightmaps (texture memory) | Higher GPU/CPU usage for calculations |
| Use Cases | Static environments, performance-critical scenes | Dynamic objects, time-of-day systems, moving lights, characters |
Troubleshooting Common Lighting Build Issues
Beyond simply disabling precomputed lighting, it's vital to understand common problems you might encounter with lighting builds themselves:
- Long Build Times: This is probably the most common complaint. It's often due to high lightmap resolutions, complex geometry, too many light bounces, or insufficient hardware. Consider optimising your lightmap UVs, reducing lightmap resolution where it's not critical, and limiting the number of light bounces in your Lightmass settings.
- Black Spots or Artifacts: These usually indicate issues with lightmap UVs (overlapping or insufficient padding), poor mesh topology, or incorrect lightmass settings. Ensure your static meshes have proper, non-overlapping lightmap UVs with adequate spacing between islands.
- Lighting Leaks: Light bleeding through walls or ceilings often occurs when meshes are too thin or don't fully intersect, allowing light to 'leak' from one side to another. Ensure your geometry is robust and properly sealed.
- 'Swarming' or 'Splotchy' Lighting: This can be a sign of too low lightmap resolution, leading to pixelated or blocky lighting. Increasing lightmap resolution or improving lightmap UV packing can help.
- Build Failures: Sometimes a build simply fails. Check the output log for specific error messages. It could be due to memory issues, corrupted assets, or a bug in the engine version.
Frequently Asked Questions
Can I truly 'undo' a lighting build like a regular action?
No, not in the traditional sense. A lighting build generates new data, overwriting previous data. The 'Force No Precomputed Lighting' option is a workaround that tells the engine to ignore the generated data, effectively simulating an 'undo' for visual purposes.
What are lightmaps, again?
Lightmaps are texture maps (like images) that store pre-calculated lighting and shadow information for static objects in your scene. They are applied to geometry at runtime, making the scene look lit without expensive real-time calculations.
Why is lighting in games so complex?
Accurately simulating how light behaves in the real world (bouncing, scattering, casting soft shadows, etc.) is computationally intensive. Game engines use various techniques, including baking, dynamic lighting, and clever approximations, to balance visual fidelity with performance.
Does 'Force No Precomputed Lighting' affect game performance?
Yes, it will typically increase runtime performance demands. Without baked lighting, your scene will rely more heavily on dynamic lights and real-time global illumination solutions, which are more computationally expensive at runtime.
Bringing It All Together
So, the next time that 'Lights need to be rebuilt' warning pops up, you'll know it's not just a nuisance, but a reminder that your scene's pre-calculated lighting is out of sync. While a true 'undo' for a build isn't feasible, the 'Force No Precomputed Lighting' option in your World Settings is an invaluable tool for debugging, quick iteration, and understanding the nuances of your lighting setup. It’s about having the right tool for the job, and knowing when to use a temporary fix versus a permanent solution. Keep those lights looking sharp, and your game running smoothly!
If you want to read more articles similar to Tackling Tricky Lighting Builds in Your Project, you can visit the Automotive category.
