07/12/2000
In the realm of 3D game development, lighting is often the unsung hero, capable of elevating a good game to a truly great one. Even the most meticulously crafted models can fall flat if bathed in poor illumination, marred by incorrect shadow resolution, or lacking the right post-processing polish. Within the powerful Unreal Engine, mastering the robust lighting, reflection, and post-process settings is crucial for achieving visual excellence. This comprehensive troubleshooting guide aims to demystify some of the most common lighting and rendering challenges encountered by developers. While not exhaustive, it serves as a dynamic resource, designed to be your essential first step in harnessing the engine's full rendering potential and ensuring your virtual worlds shine.

- General Lighting Conundrums
- Why Are My Shadows Black?
- Invalid Lightmap Settings When Converting BSP to Static Mesh
- What If I Don’t Want Lightmaps at All or My Game Doesn’t Need Them?
- Two-Sided Lighting for Single-Sided Meshes, or Why Does My Light Come Through the Roof?
- Why is there a red “X” over my light? / “Lighting needs to be rebuilt”
- Dynamic (Movable) Lighting Considerations
- Static Lighting Deep Dive
- Lightmap Resolution / Shadow Quality
- What is this “Overlapping UV Error” Non-sense When I Build Lighting?
- How to Control Global Illumination with Static Lighting? (The Wonderful Thing About Bounce)
- Why Is There Shadow Splotches on My Static Mesh? (How to Clean Those Dirty Lightmaps?)
- Lighting Quality Comparison, or Production > Preview
- Frequently Asked Questions (FAQs)
General Lighting Conundrums
Lighting in Unreal Engine 4 (UE4) can sometimes present immediate visual puzzles. Let's delve into some fundamental issues and their solutions.
Why Are My Shadows Black?
In lighting terminology, deep, impenetrable black shadows typically indicate a lack of 'fill light'. This scenario frequently arises in outdoor environments where a single directional light is employed to represent the sun. While the sun provides direct illumination and sharp shadows, it doesn't account for the ambient light from the sky or light bouncing off the environment, which naturally lightens shaded areas in the real world. UE4 offers a built-in method to provide this crucial world-affecting fill light, known as a Sky Light.
A Sky Light captures the distant parts of your level, such as the sky sphere or a background HDRI (High Dynamic Range Image), and applies that captured light as ambient illumination throughout your scene. This effectively lifts the darker areas of shadows, preventing them from appearing as stark, unrealistic black voids. Implementing a Sky Light is often the first and most effective step to achieving more natural and visually appealing outdoor scenes.
Invalid Lightmap Settings When Converting BSP to Static Mesh
When you're prototyping levels in Unreal Engine, BSP (Binary Space Partitioning) geometry is incredibly useful for quickly blocking out spaces. However, for final game geometry, BSP is inefficient and must be converted to static meshes. Upon converting your BSP geometry to a static mesh, you might immediately notice peculiar lighting artefacts, often resembling patchy or incorrect shadows. Don't worry, this is entirely normal and expected!
The reason for this is that while the conversion process automatically generates lightmap UVs for your new static mesh, it doesn't automatically assign the correct lightmap channel or resolution. Lightmaps are pre-calculated textures that store baked lighting and shadow information for static objects. For these to work correctly, each face of your mesh needs a unique, non-overlapping space on a specific UV channel.
To rectify this, open your newly created static mesh in the Static Mesh Editor. Navigate to the 'Details' panel on the right and locate the 'Static Mesh Settings' section. Here, you'll need to adjust two key parameters:
- Lightmap Resolution: This setting determines the resolution of the lightmap texture that will be generated for your mesh. It should always be a power of two (e.g., 32, 64, 128, 256, etc.). Higher resolutions will result in sharper, more detailed baked shadows and lighting, but they also significantly increase memory footprint and prolong light build times. Experiment to find the optimal balance for your assets.
- Lightmap Coordinate Index: This specifies which UV channel the engine should use for lightmapping. In most cases, this should be set to '1' (meaning UV Channel 1), as UV Channel 0 is typically reserved for texture mapping. This channel is crucial because it must contain a unique, non-overlapping UV layout for accurate light baking.
If you wish to inspect the generated lightmap UVs, you can do so directly within the Static Mesh Editor. In the toolbar, click the 'UV' button and select 'UV Channel 1' from the dropdown menu to visualise how your mesh's faces are laid out for light baking.
What If I Don’t Want Lightmaps at All or My Game Doesn’t Need Them?
There are scenarios where pre-computed lightmaps might be entirely unnecessary for your game. For instance, if your project exclusively uses Movable (dynamic) lighting, or if you're targeting platforms with severe memory constraints where dynamic lighting is the only viable option, you can disable lightmaps altogether. Disabling static lighting means the engine will not bake any light data, relying solely on real-time calculations for illumination.
There are two primary methods to disable static lighting:
Project-Specific: Disable Static Lighting
This method disables static lighting across your entire project, affecting all levels:
- Go to 'Edit' > 'Project Settings'.
- Navigate to the 'Rendering' tab on the left.
- Under the 'Lighting' section, uncheck the option for 'Allow Static Lighting'.
- A prompt will appear, informing you that you need to restart the editor for this change to take full effect. Restart Unreal Engine 4.
Level-Specific: Disable Static Lighting
This method disables static lighting only for the current level you are working on:
- Open 'World Settings' (typically found in the 'Window' menu if not already open).
- Locate the 'Lightmass' section within the World Settings panel.
- Check the option for 'Force No Precomputed Lighting'.
- You will receive a warning message confirming the implications of this action. Click 'OK'.
- Finally, 'Build Lighting' (from the 'Build' menu) to clear any previously baked lighting data from the level.
Two-Sided Lighting for Single-Sided Meshes, or Why Does My Light Come Through the Roof?
You've meticulously crafted your 3D assets in your favourite modelling software, perhaps a detailed wall or an intricate tunnel. Everything looks perfect in your modelling application – you can see both sides of your geometry. However, upon importing into Unreal Engine 4, you find baffling light leaks or mysteriously invisible faces. Your carefully constructed roof now lets light flood through!
This behaviour is 100% normal and by design in game engines. Unreal Engine 4 employs a technique called backface culling to optimise rendering performance. By default, the engine only renders one side of a polygon (the 'front' face) and automatically discards or 'culls' the back face. This saves valuable GPU processing power because it avoids rendering geometry that isn't typically visible to the player. While your modelling software might display both sides for ease of creation, game engines prioritise performance, especially crucial for specific platforms or complex scenes where every draw call matters.
To understand why this happens, you can open your mesh in the Static Mesh Editor and enable the 'Normals' visualisation in the toolbar. You'll see green lines protruding from the faces of your mesh. These lines indicate the direction the polygon's front face is pointing. If faces appear invisible, their normals are likely pointing inwards or away from the camera, causing them to be culled.
Now, to fix those invisible faces and prevent light leaks, you have two primary methods:
- (STATIC ONLY) Light as if Two-Sided:
This option is found in the 'Details' panel of your selected static mesh actor within the Level Viewport. When enabled, Lightmass (Unreal's global illumination solver) will calculate and bake lighting for both sides of the geometry, even though only one side is rendered visually. This means the 'invisible' back face will correctly cast shadows and block light for static lighting scenarios. However, it's crucial to note that this method will not work with Movable (dynamic) lights, as Unreal Engine 4 uses a deferred rendering pipeline where dynamic lights don't interact with this pre-computed setting.
- Creating a Two-Sided Material:
This is a more universal solution. Open the material editor for your mesh's material. In the 'Details' panel (on the left), locate and tick the 'Two-Sided' checkbox. Save and compile your material for the change to take effect. By making the material two-sided, the engine is explicitly told to render both sides of the polygon, effectively preventing backface culling for that specific material. This method works seamlessly with Static, Stationary, and Movable lighting types, resolving light leaks regardless of your light's mobility. Be aware, however, that rendering both sides of a mesh does increase the number of draw calls, which can impact performance in very large or highly optimised scenes. For smaller scenes or less demanding setups, the performance impact is often negligible, but it's a consideration for hardware-constrained projects.
Why is there a red “X” over my light? / “Lighting needs to be rebuilt”
If you see a red 'X' superimposed over a light source in your level, or a persistent 'Lighting needs to be rebuilt' message in the top-left corner of your viewport, it's a clear indication that the pre-computed lighting data for your scene is no longer valid. This typically occurs when you've moved or modified a static or stationary light actor, or altered any static geometry that interacts with baked lighting. The engine detects these changes and warns you that the currently rendered lighting no longer accurately represents the scene's current state.
Failing to rebuild lighting when this warning appears can lead to numerous visual inconsistencies, such as incorrect shadows, light leaks, or oddly lit areas. To resolve this, simply go to the 'Build' menu in the Unreal Editor toolbar and select 'Build Lighting'. The engine will then re-calculate and re-bake all static lighting, ensuring your level's illumination is visually accurate and up-to-date with your latest modifications. The time it takes to rebuild can vary significantly depending on the complexity of your scene and your computer's specifications.
Dynamic (Movable) Lighting Considerations
Dynamic lights provide real-time illumination and shadows, offering immense flexibility but also presenting their own unique set of challenges.
Shadow Bleed or Incorrect Shadow Quality
When working with dynamic lights, particularly the Directional Light in outdoor settings, you might encounter issues like 'shadow bleed' (light appearing where shadows should be) or generally poor shadow quality. For directional lights, this often relates to its Cascaded Shadow Maps (CSM) settings.
Cascaded Shadow Maps are an optimisation technique used to provide high-quality shadows close to the camera while maintaining performance by using lower-resolution shadows further away. Each 'cascade' is a separate shadow map that covers a specific distance range from the camera. Adjusting these settings is key to resolving quality issues:
- Directional Light ONLY: Cascaded Shadow Maps Settings:
In the Directional Light's 'Details' panel, under the 'Cascaded Shadow Maps' section, you'll find parameters like 'Num Cascades', 'Distribution Exponent', and 'Transition Exponent'. - Adjusting Cascades for Better Quality:
- Num Cascades: Increasing the number of cascades can improve shadow quality over distance, but also increases rendering cost.
- Distribution Exponent: This controls how the cascades are distributed. A lower exponent concentrates more cascades closer to the camera, improving detail up close. A higher exponent spreads them out more evenly.
- Transition Exponent: Controls the blending between cascades.
- Dynamic Shadow Distance Movable Light: This is a crucial setting found in the 'Light' tab for all dynamic lights. It defines the maximum distance from the camera at which dynamic shadows will be rendered. Beyond this distance, objects will receive light as if they are not shadowed, which can lead to light leaks or objects appearing incorrectly lit.
Experimenting with these values is necessary to find the optimal balance between visual quality and performance for your specific scene and target platform.
Why Does My Movable Light Shine Through My Mesh at Far Distances?
This common issue with movable lights is directly related to the 'Dynamic Shadow Distance Movable Light' setting mentioned above. For performance optimisation, Unreal Engine 4 stops rendering dynamic shadows beyond a specified distance from the camera. If your movable light continues to illuminate objects beyond this shadow distance, those objects will appear to receive light as if they are not being occluded, causing the light to 'shine through' meshes that should be blocking it.
To fix this, you need to either:
1. Increase the 'Dynamic Shadow Distance Movable Light' value for your light. Be cautious, as increasing this value too much will significantly impact performance due to the larger area covered by real-time shadows.
2. Ensure your level design accounts for this limitation, perhaps by transitioning to static lighting or a different light setup for very distant objects, or by using fog to obscure the transition.

In some cases, Level of Detail (LOD) transitions on your meshes might also contribute to this, where simpler LODs at distance might have less accurate geometry for shadow casting.
Static Lighting Deep Dive
Static lighting, or baked lighting, offers highly optimised, performant, and often more realistic illumination, especially for complex global illumination scenarios.
Lightmap Resolution / Shadow Quality
As touched upon earlier, Lightmap Resolution is paramount for the quality of baked shadows and static indirect lighting. Lightmaps are essentially textures applied to your static meshes that store pre-calculated light and shadow information. A higher lightmap resolution (e.g., 256 or 512) will result in sharper, more detailed shadows and smoother light transitions. Conversely, a lower resolution (e.g., 32 or 64) will produce blockier, pixelated shadows and potentially noticeable lighting artefacts.
The trade-off is significant: higher resolutions demand more memory (VRAM) and drastically increase the time it takes for the engine to 'build' lighting. For critical assets or large, flat surfaces like floors and walls, a higher resolution is often justified. For smaller, less prominent objects, a lower resolution can save valuable resources without a noticeable visual impact. Finding the optimal resolution for each mesh is a key part of lighting optimisation.
What is this “Overlapping UV Error” Non-sense When I Build Lighting?
When you attempt to build lighting, you might encounter a warning about "Overlapping UVs" for certain meshes. This error is a critical indicator that your lightmaps will not bake correctly. UVs (short for 'Unwrapped Vertices' or 'Texture Coordinates') define how a 2D texture is mapped onto a 3D mesh. While UV Channel 0 is typically used for your main colour and normal textures, UV Channel 1 (or sometimes another channel) is specifically designated for lightmaps.
The problem arises when faces of your mesh overlap on this dedicated lightmap UV channel. If two or more faces occupy the same space on the lightmap texture, Lightmass cannot correctly determine which face should receive which light or shadow information. This results in visual glitches like black splotches, flickering shadows, or incorrect light bleeding on your static meshes. To resolve this, your lightmap UVs must be unique, non-overlapping, and properly laid out, preferably with some padding between UV islands to prevent bleeding from adjacent pixels on the lightmap.
How to Control Global Illumination with Static Lighting? (The Wonderful Thing About Bounce)
One of the most powerful aspects of static lighting in Unreal Engine is its ability to simulate Global Illumination (GI), also known as 'bounce lighting'. This refers to the natural phenomenon where light doesn't just travel directly from a source to a surface, but also bounces off surfaces, indirectly illuminating other parts of the scene. This creates a much more realistic and nuanced lighting environment, filling in shaded areas with subtle colours from nearby surfaces.
Unreal Engine's Lightmass system is responsible for calculating this complex bounce lighting. You can control the quality and extent of GI through the 'World Settings' panel, under the 'Lightmass' section:
- Indirect Lighting Quality: This parameter determines the fidelity of the GI calculation. Higher values (e.g., 2 or 4) will produce smoother, more accurate bounce lighting but will significantly increase light build times.
- Indirect Lighting Bounces: This controls how many times light is allowed to bounce off surfaces. More bounces generally lead to more realistic and well-filled indirect lighting, but again, at the cost of longer build times.
Adjusting these settings allows you to fine-tune the balance between visual realism and the practicalities of development time.
Why Is There Shadow Splotches on My Static Mesh? (How to Clean Those Dirty Lightmaps?)
Shadow splotches, blotchy lighting, or seemingly 'dirty' baked shadows on your static meshes are almost invariably caused by one of two factors: either insufficient Lightmap Resolution or, more commonly, Overlapping UVs on your lightmap channel.
If your lightmap resolution is too low for a particular mesh, the baked shadow information will be spread across too few pixels, leading to a pixelated or blocky appearance. Increasing the lightmap resolution for that specific mesh is the direct solution here.
However, if the issue persists or manifests as distinct dark splotches or lines, it's highly probable that your lightmap UVs (UV Channel 1) have overlapping faces. As discussed, this causes conflicting information during the baking process. To 'clean' these dirty lightmaps, you'll need to:
- Check UVs: Inspect your mesh's UV Channel 1 in an external 3D modelling software (like Blender, 3ds Max, Maya) to ensure there are no overlapping faces. Each face intended to receive baked lighting must have a unique, non-overlapping space on the UV map.
- Re-unwrap: If overlaps are found, you'll need to re-unwrap your mesh's UV Channel 1, ensuring proper spacing (padding) between UV islands. Many modelling packages have tools for automatic lightmap UV generation, which can be a good starting point.
- Rebuild Lighting: After fixing the UVs and re-importing the mesh, you must rebuild lighting for the changes to take effect.
Lighting Quality Comparison, or Production > Preview
When you build lighting in Unreal Engine, you have several quality settings available, typically accessible from the 'Build' menu. These settings dictate the precision and duration of the light baking process:
| Quality Setting | Description | Use Case |
|---|---|---|
| Preview | Fastest build time, lowest quality. Basic shadows and GI. | Quick iterations during development, blocking out scenes. |
| Medium | Moderate build time and quality. Better than Preview. | More refined iteration, early visual testing. |
| High | Longer build time, good quality. Suitable for many final uses. | Detailed testing, near-final builds. |
| Production | Longest build time, highest quality. Most accurate shadows and GI. | Final builds, release candidates, showcasing. |
During the early stages of development, it's highly recommended to build lighting in 'Preview' mode. This allows for rapid iteration and feedback on your lighting setup without waiting for lengthy bake times. Once your lighting is largely finalised and you're preparing for testing or a release, switch to 'Production' quality. This will ensure the highest fidelity baked lighting, though it can take considerably longer, sometimes hours for complex scenes.
Frequently Asked Questions (FAQs)
How long does it take for engine to rebuild lights?
The time required to rebuild lights in Unreal Engine can vary dramatically. For a simple scene with only a few static meshes and basic lighting, it might take a mere few seconds. However, for a complex level featuring numerous static meshes, high lightmap resolutions, intricate global illumination settings (high indirect lighting quality and bounces), and a large number of static or stationary lights, the build process can extend to several minutes or even multiple hours on less powerful hardware. Factors like your CPU speed, RAM, and the overall complexity of your scene's geometry and lighting setup all contribute to the duration. It's often an overnight process for very large, detailed environments.
What exactly is a lightmap?
A lightmap is a pre-calculated texture that stores baked lighting and shadow information for static objects within your Unreal Engine scene. Instead of calculating lighting in real-time for these objects (which is computationally expensive), the lighting information is 'baked' or rendered into a 2D texture during the light build process. This texture is then applied to the mesh, making the lighting appear static and highly optimised at runtime. Lightmaps are crucial for achieving realistic global illumination and detailed static shadows efficiently.
Why do my shadows look blocky or pixelated?
Blocky or pixelated shadows are a common visual artefact, typically stemming from insufficient resolution. For static shadows (baked into lightmaps), this means the 'Lightmap Resolution' set for your mesh is too low. Increasing this value will provide more pixels for the shadow information, resulting in a smoother appearance. For dynamic shadows (real-time), the issue often lies with the 'Shadow Resolution' settings for your movable light or, for directional lights, the 'Cascaded Shadow Map' settings. Ensuring adequate shadow map resolution and proper cascade distribution will improve dynamic shadow fidelity.
Can I mix static and dynamic lights in my scene?
Absolutely, and this is a common and highly recommended practice in Unreal Engine! The engine provides 'Stationary' light types specifically for this purpose. A Stationary light is a hybrid that combines the benefits of both static and dynamic lighting. Its direct light and static shadows are baked into lightmaps, which includes its contribution to global illumination. However, its direct shadowing of movable objects (like characters or dynamic props) is calculated in real-time. This allows for performant baked GI and static shadows for the environment, while still providing accurate, real-time shadows for anything that moves, offering an excellent balance of visual quality and performance.
By understanding these common lighting challenges and their solutions, you'll be well-equipped to troubleshoot and refine the illumination in your Unreal Engine projects, bringing your virtual worlds to life with stunning visual fidelity.
If you want to read more articles similar to Unreal Engine Lighting: Your Troubleshooting Guide, you can visit the Lighting category.
