In this lesson, you will learn how to fine-tune Bloom parameters to achieve realistic light bleeding, ensuring your emissive surfaces interact naturally with the surrounding environment.
The Physics of Light Bleed
In the real world, intense light doesn't just sit on a surface; it scatters, spilling over edges and creating a soft halo as it hits the camera lens. In Unity’s Universal Render Pipeline (URP), the Bloom effect simulates this by blurring pixels that exceed a specific brightness threshold. To move beyond a generic "glow" and achieve realistic light propagation, we must focus on the interaction between the Threshold, Intensity, and Scatter settings.
Balancing the Bloom Pipeline
Start by setting your Threshold in the Bloom Volume override. This defines the "gatekeeper"—only pixels with a luminance value higher than this threshold will contribute to the bloom. If you set this too low, your entire scene will look washed out; set it too high, and only the brightest highlights will bloom.
Once the threshold is set, use these parameters to shape the bleed:
- Intensity: Controls the brightness of the blurred light. Keep this subtle to avoid "glowing" objects that look like they are floating.
- Scatter: This is the most critical setting for realism. It determines the radius of the blur. A higher scatter value mimics light scattering through air or a camera lens, which is essential for making emissive materials feel like they are casting light into the room.
- Tint: Use this to match the color of your emissive emission map. A subtle tint can help unify the color temperature of your light source with the reflected "bleed" on nearby geometry.
// Example of accessing Bloom via code if you need to
// modulate intensity based on an event (e.g., a flickering light)
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
Bloom bloom;
volume.profile.TryGet(out bloom);
bloom.intensity.value = Mathf.PingPong(Time.time, 2.0f);
By keeping your Threshold high and your Scatter moderate, you allow the emissive materials to dominate the highlights while keeping the rest of the scene’s contrast intact. Experiment by looking at a dark scene with a bright neon object; focus on how the light "softens" the edges of nearby surfaces as you adjust the scatter radius.
Key Takeaway: Realistic light propagation relies on a high threshold to isolate emissive highlights and a tuned scatter radius to simulate the physical spill of light into the surrounding atmosphere.