This guide teaches you how to do lighting in Unreal Engine like a pro. You’ll learn to set up real-time, baked, and dynamic lighting to create immersive, realistic scenes with ease.
Key Takeaways
- Understand lighting types: Learn the difference between real-time, baked, and dynamic lighting and when to use each.
- Use Lightmass for quality: Baked lighting with Lightmass creates realistic shadows and ambient occlusion.
- Optimize with LODs and culling: Improve performance by managing draw distance and visibility.
- Master post-processing: Enhance mood and realism with color grading, bloom, and exposure settings.
- Troubleshoot common issues: Fix dark scenes, light leaks, and performance drops with proven tips.
- Experiment with HDRI skies: Use high-dynamic-range images for natural outdoor lighting.
- Combine lighting methods: Blend real-time and baked lights for the best visual results.
How to Do Lighting in Unreal Engine: A Complete Guide
Lighting is one of the most important aspects of creating believable and visually stunning scenes in Unreal Engine. Whether you’re building a game, a cinematic, or a virtual environment, knowing how to do lighting in Unreal Engine can make or break your project. Good lighting sets the mood, guides the player’s eye, and adds depth and realism.
In this guide, you’ll learn everything you need to master lighting in Unreal Engine—from basic setup to advanced techniques. We’ll cover real-time lighting, baked lighting, post-processing, optimization, and troubleshooting. By the end, you’ll be able to create professional-quality lighting for any scene.
Step 1: Understand the Types of Lighting
Visual guide about How to Do Lighting in Unreal Engine
Image source: i.ytimg.com
Before diving in, it’s important to know the three main types of lighting in Unreal Engine: real-time, baked, and dynamic.
Real-Time Lighting
Real-time lights update instantly as you move them or change settings. They’re great for interactive scenes, like games, where lighting needs to respond to player actions. Examples include Point Lights, Spot Lights, and Directional Lights.
Baked Lighting
Baked lighting is pre-calculated and stored in lightmaps. It’s not interactive but offers high visual quality with low performance cost. Use Lightmass to bake static lights. This is ideal for environments that don’t change, like architectural visualizations.
Dynamic Lighting
Dynamic lighting combines real-time and baked elements. For example, you can have a static environment with baked lighting and add moving characters with real-time shadows. This gives you flexibility without sacrificing too much performance.
Step 2: Set Up Your Scene for Lighting
Before adding lights, prepare your scene properly.
Use Static or Stationary Mobility
In the Details panel, set your meshes to Static or Stationary mobility. Static objects can use baked lighting. Stationary objects can move but still benefit from baked lighting. Only use Movable for objects that need full real-time lighting.
Enable Lightmap UVs
For baked lighting, your meshes need proper lightmap UVs. In the Static Mesh Editor, go to Build Settings and ensure “Generate Lightmap UVs” is checked. This creates a second UV channel for light baking.
Adjust Lightmap Resolution
Higher resolution gives better quality but increases bake time and memory. Start with 64–128 for small objects and 256–512 for large ones. You can adjust this in the mesh’s Details panel under Lightmap Resolution.
Step 3: Add and Configure Lights
Now it’s time to place lights in your scene.
Directional Light for Sunlight
Add a Directional Light to simulate the sun. Rotate it to control the time of day. In the Details panel, set Intensity (try 5–10 for daylight) and Light Color (warm yellow for sunrise, cool white for noon).
Point and Spot Lights for Local Illumination
Use Point Lights for lamps or ceiling lights. Adjust the Source Radius and Attenuation Radius to control how far the light reaches. Spot Lights are great for focused beams, like flashlights or stage lights.
Use Rect Lights for Soft, Realistic Glow
Rect Lights mimic real-world light panels or windows. They cast soft, even light and are perfect for indoor scenes. Set the Source Width and Height to match your light source.
Step 4: Bake Lighting with Lightmass
Baking lighting improves quality and performance.
Open Lightmass Settings
Go to Window > World Settings > Lightmass. Here you can adjust global lighting quality.
Adjust Indirect Lighting Quality
Increase Indirect Lighting Quality for smoother shadows and better ambient occlusion. Start with 4–8 for testing, then go up to 16–32 for final builds.
Bake the Lighting
Click Build > Build Lighting Only. Unreal will calculate the lightmaps. This may take a few minutes depending on scene complexity.
Check for Light Leaks
After baking, look for dark spots or light bleeding through walls. This usually means your lightmap UVs overlap or your geometry has gaps. Fix mesh issues and rebake.
Step 5: Use HDRI Skies for Natural Outdoor Lighting
HDRI (High Dynamic Range Imaging) skies provide realistic outdoor lighting with minimal effort.
Import an HDRI
Download a free HDRI from sites like Poly Haven. Import it into Unreal Engine.
Create a Sky Sphere
Go to Place Actors > Visual Effects > Sky Sphere. Drag it into your scene.
Assign the HDRI
In the Sky Sphere’s Details panel, set the Texture to your HDRI. Enable Real-Time Capture if you want dynamic sky changes.
Adjust Exposure
HDRI skies can be very bright. Lower the Exposure Compensation in the Post Process Volume to avoid overexposure.
Step 6: Enhance with Post-Processing
Post-processing adds polish and mood.
Add a Post Process Volume
Drag a Post Process Volume into your scene. Check Unbound so it affects the whole level.
Adjust Color Grading
Use Color Grading to change the mood. Warm tones for sunset, cool for night. Avoid over-saturation.
Enable Bloom and Lens Effects
Bloom makes bright lights glow, adding realism. Lens Flare and Vignette can enhance cinematic feel—use sparingly.
Set Auto Exposure
Enable Auto Exposure to simulate how the human eye adjusts to light. Set Min Brightness and Max Brightness to control the range.
Step 7: Optimize Lighting Performance
Good lighting shouldn’t slow down your game.
Use Level of Detail (LOD)
Reduce polygon count for distant objects. This lowers rendering cost without affecting visuals.
Enable Culling
Use Distance Culling to hide lights and objects beyond a certain range. Go to the light’s Details panel and set Max Draw Distance.
Limit Real-Time Lights
Too many real-time lights hurt performance. Use baked lighting where possible. Combine with Light Functions or IES Profiles for variety without extra lights.
Monitor Performance
Use Stat Unit and Stat GPU in the console to check frame rate and GPU load. Aim for 60 FPS on target hardware.
Troubleshooting Common Lighting Issues
Even experts run into problems. Here’s how to fix them.
Scene Is Too Dark
Check light intensity and color. Make sure Auto Exposure isn’t underexposing. Add fill lights or increase indirect lighting bounces in Lightmass.
Light Leaks or Bleeding
This happens when light passes through walls. Fix by sealing geometry gaps, increasing lightmap resolution, or using Lightmass Importance Volume to focus baking on key areas.
Shadows Are Blocky or Flickering
Increase Shadow Map Resolution on directional lights. For real-time shadows, enable Cascaded Shadow Maps (CSM) and adjust cascade distances.
Performance Drops
Too many dynamic lights? Switch some to baked. Use Light Culling Volumes to disable lights when not needed.
Conclusion
Mastering how to do lighting in Unreal Engine takes practice, but the results are worth it. Start with simple setups, experiment with different light types, and always optimize for performance. Use baked lighting for static scenes, real-time for interactivity, and post-processing to enhance mood. With these techniques, you’ll create immersive, professional-quality environments that look amazing and run smoothly.
Remember: lighting isn’t just about brightness—it’s about storytelling. Use it to guide attention, set the tone, and bring your world to life.