Skip to main content
Unity 3D Basics – Complete Beginner to Advanced Guide
CHAPTER 15 Beginner

Lighting, Effects, and Post Processing

Updated: May 16, 2026
35 min read

# CHAPTER 15

Lighting, Effects, and Post Processing

1. Introduction

Have you ever looked at a raw Unity scene and thought, *"Why does my game look like a cheap plastic toy, while professional games look cinematic?"* The secret is not just higher-resolution 3D models; the secret is Lighting and Post-Processing. The way light bounces off a wall, the slight glowing bloom of a neon sign, and the dust particles floating in the air are what transform a sterile digital box into a breathing world. In this chapter, we will master Lighting, Effects, and Post Processing. We will explore Real-time vs. Baked lighting, create magical sparks using the Particle System, and apply cinematic camera filters.

2. Learning Objectives

By the end of this chapter, you will be able to:
  • Differentiate between Real-time Lighting and Baked Global Illumination (GI).
  • Understand how to generate a Lightmap to optimize performance.
  • Create dynamic visual effects using the Unity Particle System.
  • Install and configure the Post-Processing Stack.
  • Apply cinematic effects like Bloom, Color Grading, and Vignette.

3. Real-Time vs. Baked Lighting

There are two ways to light a 3D world:
  1. 1. Real-time Lighting: The CPU calculates the shadows exactly 60 times a second. If an enemy walks under a light, their shadow moves perfectly. Pros: Dynamic. Cons: Incredibly expensive. Too many real-time lights will cripple your framerate.
  1. 2. Baked Lighting (Lightmaps): The computer spends 10 minutes calculating highly realistic light physics (like light bouncing off a red carpet to tint the ceiling pink). It then paints those shadows permanently onto the 3D textures. Pros: Photorealistic and zero performance cost during gameplay! Cons: Static objects only. A baked shadow cannot move.

4. How to Bake Lighting (Global Illumination)

  1. 1. Select your floor, walls, and static props.
  1. 2. In the Inspector, check the box in the top right that says Static (specifically, Lightmap Static).
  1. 3. Go to Window -> Rendering -> Lighting.
  1. 4. Scroll to the bottom and click Generate Lighting.
  1. 5. Wait. Unity is calculating billions of light rays. When it finishes, your scene will look incredibly realistic, complete with soft, bouncing ambient light (Global Illumination)!

5. The Particle System (VFX)

Explosions, magic spells, rain, and sparks are created using the Particle System.
  • Right-click Hierarchy -> Effects -> Particle System.
  • A particle is essentially a 2D image (like a picture of smoke) that always faces the camera.
  • The Particle System component has dozens of modules:
  • Emission: How many particles spawn per second.
  • Shape: Spawn them in a Cone (fireworks) or a huge Box (rain).
  • Color over Lifetime: Make fire start bright yellow and fade out to gray smoke as it floats upward.
  • Size over Lifetime: Make the smoke puff expand as it rises.

6. Post-Processing (The "AAA" Filter)

Post-Processing is like applying an Instagram filter to your game camera. It alters the pixels right before they hit the monitor.
  1. 1. Open the Package Manager and install Post Processing.
  1. 2. Add a Post-process Volume component to an empty GameObject. Check the Is Global box.
  1. 3. Click "New" to create a Profile.
  1. 4. Add a Post-process Layer component to your Main Camera so the camera can "see" the effects.

7. Essential Post-Processing Effects

Click "Add Effect" on your Volume to add cinematic polish:
  • Bloom: The magic "make it look AAA" button. Any object with a bright emissive material (like a lightsaber or lava) will bleed a soft, cinematic glow into the surrounding air.
  • Color Grading: Adjust the Contrast and Saturation to make a horror game look bleak and blue, or a platformer look vibrant and saturated.
  • Vignette: Darkens the corners of the screen to draw the player's eye to the center.
  • Depth of Field: Blurs the background, focusing sharply on the character, mirroring a real-life DSLR camera lens.

8. Visual Learning: The Lighting Pipeline

txt
1234567
[ Raw Scene ] -> (Plastic, Flat, Default Unity Look)
      |
[ Add Baked Global Illumination ] -> (Soft shadows, realistic color bouncing)
      |
[ Add Particle Systems ] -> (Dust motes floating in sunbeams)
      |
[ Add Post-Processing (Bloom + Color Grading) ] -> (Cinematic Masterpiece)

9. Best Practices

  • Mix Lighting Modes: The industry standard is "Mixed Lighting." You bake the environment (the sun, the buildings) for maximum performance and realism, but you keep a single Real-time Directional Light active just to cast moving shadows for the player and enemies.

10. Common Mistakes

  • Overusing Bloom: Beginners discover the Bloom effect and crank the intensity to 10. The game becomes a blinding, radioactive mess of glowing lights. Use Bloom subtly. It should emulate camera lens bleed, not obscure the gameplay.

11. Mini Project: Build a Campfire

Objective: Combine lighting, particles, and post-processing.
  1. 1. Create a dark outdoor scene.
  1. 2. Create a Particle System. Set the Shape to Cone (angle 10). Set Start Color to Orange. Enable Size over Lifetime to make them shrink. Enable Color over Lifetime to fade alpha to 0. You now have fire!
  1. 3. Add a Point Light inside the fire. Set its color to warm orange and intensity to high.
  1. 4. Add a Post-Process Volume to the scene. Add the Bloom effect.
  1. 5. In the Fire Particle System's Renderer module, apply an HDR glowing material.
  1. 6. Look through the camera. The intense light of the fire will trigger the Bloom, creating a soft, cinematic, glowing campfire illuminating the dark wilderness!

12. Practice Exercises

  1. 1. What does it mean to "Bake" lighting, and why is it vastly superior for game performance?
  1. 2. Which Unity system is used to create massive amounts of moving 2D images, such as a rainstorm or a magic spell?

13. MCQs with Answers

Question 1

Before you click "Generate Lighting" to bake photorealistic shadows into your environment, what specific checkbox MUST be checked on the 3D objects (like walls and floors) in the Inspector?

Question 2

Which Post-Processing effect is responsible for making brightly lit objects (like neon signs or lasers) softly glow and bleed light into the surrounding pixels?

14. Interview Questions

  • Q: Explain the concept of Global Illumination (GI). How does bouncing light calculations improve the realism of a 3D scene compared to simple direct lighting?
  • Q: Contrast the performance costs of Real-Time lighting versus Baked Lighting. In a mobile game, which technique is strictly preferred for environments, and why?
  • Q: A level designer complains that the scene looks "flat" and "plastic." Describe a workflow combining Post-Processing techniques to upgrade the scene to a modern, cinematic standard.

15. FAQs

Q: Do I use the standard pipeline or the URP/HDRP? A: Unity is currently shifting from the Standard 3D pipeline to the URP (Universal Render Pipeline) for mobile/indie games, and the HDRP (High Definition Render Pipeline) for AAA photorealism. Post-processing is built directly into URP/HDRP, making it even easier to achieve these results if you select those templates when creating a new project!

16. Summary

In Chapter 15, we transformed our project from a prototype into a professional-looking game. We learned the difference between heavy Real-Time dynamic shadows and performance-friendly Baked Global Illumination. We used the Particle System to create emergent visual effects like fire and sparks. Finally, we applied the Post-Processing stack—utilizing Bloom, Color Grading, and Vignette—to give our camera a high-budget, cinematic lens.

17. Next Chapter Recommendation

Our game looks incredible, but playing alone can get lonely. Let's explore how to connect players over the internet. Proceed to Chapter 16: Multiplayer and Networking Basics.

Finish this Chapter

Save your progress on your learning path and prepare for coding interview challenges.

Discussion

Join the discussion

Log in or create a free account to participate.

Sort: ·