In this lesson, you will learn how to configure emissive materials to act as authentic light sources that cast color bleeding and indirect illumination throughout your environment.
The Concept of Emissive Lighting
In Unity, a standard material's "Emission" property typically makes an object look bright, but it doesn't automatically illuminate its surroundings. To achieve realistic color bleeding—where the light from a neon sign or a glowing panel tints the nearby walls—we must configure our rendering settings to treat these surfaces as genuine light emitters.
Configuring Global Illumination
For emissive surfaces to contribute to the scene's lighting, you must utilize Global Illumination (GI). When using the Progressive Lightmapper, follow these steps:
- Tag the Object: Ensure the object using the emissive material is marked as
Staticin the Inspector. This allows the lightmapper to include it in baked calculations. - Enable Emission: In your material settings, check the
Emissiontoggle. Assign an emissive color and adjust theGlobal Illuminationdropdown toRealtimeorBaked.- Baked: The emission is pre-calculated into your lightmaps. This is highly performant and ideal for static neon lights or light panels.
- Realtime: If using the High Definition Render Pipeline (HDRP), you can enable "Emissive" on your
Lightmap Settingsto allow these surfaces to contribute to real-time GI (or use anEmissive Intensityvalue that exceeds 1.0 to trigger bloom effects).
Practical Implementation
When you define the Emission color, keep in mind that the intensity value acts as a multiplier. If you have an emissive texture, you can tint it to ensure the light bleed matches the color of the texture:
// Example of setting emission via script
Material mat = GetComponent<Renderer>().material;
mat.EnableKeyword("_EMISSION");
mat.SetColor("_EmissionColor", Color.cyan * 2.0f); // Intensity multiplier
By ensuring your emissive surfaces are set to contribute to the lightmap, you create a soft, physically grounded look where light bounces off geometry, providing a sense of depth that traditional point lights struggle to replicate.
Key Takeaway: To achieve realistic color bleeding, mark emissive objects as Static and ensure their Global Illumination property is set to Baked or Realtime to allow the lightmapper to include them in the scene's indirect lighting solution.