Course contentsShow
← Unity Game Development
Lesson 637 of 8289. Rendering and VisualsFree lesson

Applying Post-Processing Volumes for Color Grading

Use post-processing profiles to apply color grading and tonemapping to establish a specific visual mood and artistic color palette.

In this lesson, you will learn how to unify your scene's visual identity by manipulating color space and luminance curves using Post-Processing Volumes.

While individual shaders (like the ones we’ve built for toon shading or holographic effects) handle local surface appearance, the Post-Processing Volume acts as the "final filter" that binds all these disparate elements into a cohesive artistic palette. Think of it as color grading a film; you are adjusting the highlights, midtones, and shadows to dictate the mood of the scene.

The Role of Tonemapping

Before applying stylistic colors, you must apply Tonemapping. Raw rendering data often contains high dynamic range (HDR) values that exceed what a monitor can display. Tonemapping—specifically the ACES (Academy Color Encoding System) profile—remaps these values into a standard display range. Without it, your colors will appear "blown out" or flat. In your Volume component, set your Tonemapping mode to ACES to ensure you have a physically accurate baseline before adding your artistic touch.

Refining Mood with Color Grading

Once tonemapping is set, you use the Color Grading override to shift the scene's mood:

  1. Temperature/Tint: Adjust these to quickly set a warm (golden hour) or cold (arctic/cyberpunk) baseline.
  2. Color Wheels (Lift, Gamma, Gain): These allow you to target specific luminance ranges:
    • Lift: Controls the shadows. Try pulling these toward a deep blue to make dark areas feel "cool."
    • Gamma: Controls the midtones. This is where your primary artistic color palette lives.
    • Gain: Controls the highlights. Use this to add a slight yellow or orange tint to your light sources to simulate natural light scattering.

Workflow Example

You can trigger these transitions dynamically. For instance, if you want a scene to look increasingly "sickly" as a player's health drops, you can reference the ColorGrading override in a script:

using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;

// Assuming you have a reference to your Volume profile
void UpdateVignette(Volume volume, float intensity) {
    if(volume.profile.TryGet(out ColorAdjustments colorAdjustments)) {
        colorAdjustments.postExposure.value = intensity;
    }
}

By layering these effects, you move beyond mere technical rendering into intentional visual storytelling.

Key Takeaway: Post-processing volumes act as a master color-grading suite that unifies your disparate shaders and lighting into a single, intentional artistic narrative.