Bloom and color grading help make game visuals look more vibrant and realistic by adding glow and adjusting colors.
Bloom and color grading in Unity
using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; public class BloomAndColorGradingSetup : MonoBehaviour { public Volume volume; private Bloom bloom; private ColorAdjustments colorAdjustments; void Start() { if (volume.profile.TryGet<Bloom>(out bloom)) { bloom.intensity.value = 1.5f; // Set bloom glow strength } if (volume.profile.TryGet<ColorAdjustments>(out colorAdjustments)) { colorAdjustments.saturation.value = 20f; // Increase color saturation colorAdjustments.contrast.value = 10f; // Increase contrast } } }
You need to have a Volume component with a profile that includes Bloom and ColorAdjustments effects.
Adjust values like intensity, saturation, and contrast to get the look you want.
bloom.intensity.value = 2.0f; // Stronger bloom glowcolorAdjustments.saturation.value = -30f; // Desaturate colors for a dull look
colorAdjustments.temperature.value = 10f; // Warmer color toneThis script sets up bloom and color grading on a volume to add a soft glow and slightly boost colors when the game starts.
using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; public class SimpleBloomColorGrading : MonoBehaviour { public Volume volume; private Bloom bloom; private ColorAdjustments colorAdjustments; void Start() { if (volume.profile.TryGet<Bloom>(out bloom)) { bloom.intensity.value = 1.2f; bloom.threshold.value = 1.0f; } if (volume.profile.TryGet<ColorAdjustments>(out colorAdjustments)) { colorAdjustments.saturation.value = 15f; colorAdjustments.contrast.value = 5f; } } }
Make sure your camera uses a Universal Render Pipeline (URP) asset for these effects to work.
You can tweak bloom and color grading settings in the Volume profile in the Unity Editor for quick previews.
Too much bloom or saturation can make the scene look unnatural, so adjust carefully.
Bloom adds a glowing effect to bright parts of the scene.
Color grading changes the overall colors to set mood or style.
Use Unity's Volume system to control these effects easily.
Practice
Solution
Step 1: Understand Bloom effect purpose
Bloom adds a glow effect around bright parts of the image to simulate light scattering.Step 2: Compare options to Bloom definition
Only Adds a soft glow to bright areas to make lights look natural describes adding a soft glow to bright areas, matching Bloom's function.Final Answer:
Adds a soft glow to bright areas to make lights look natural -> Option AQuick Check:
Bloom = Soft glow on bright areas [OK]
- Confusing Bloom with color grading
- Thinking Bloom sharpens edges
- Assuming Bloom removes shadows
Solution
Step 1: Recall Unity Volume API for post-processing
To access and enable Bloom, use TryGet to get the Bloom component and set its active property.Step 2: Analyze each option's syntax
volume.profile.TryGet<Bloom>(out Bloom bloom); bloom.active = true; uses TryGet and sets bloom.active = true, which is correct. Others use invalid or non-existent methods.Final Answer:
volume.profile.TryGet<Bloom>(out Bloom bloom); bloom.active = true; -> Option BQuick Check:
Use TryGet and set active true [OK]
- Using GetComponent instead of TryGet
- Calling non-existent Enable or SetActive methods
- Setting enabled instead of active property
var volume = GetComponent<Volume>();
if (volume.profile.TryGet<ColorAdjustments>(out var colorAdjust)) {
colorAdjust.saturation.value = -100f;
colorAdjust.contrast.value = 50f;
}Solution
Step 1: Understand colorAdjust properties set
Saturation is set to -100, which means no color (black and white). Contrast is increased to 50, making differences stronger.Step 2: Predict visual effect on scene
The scene will look grayscale with stronger contrast between light and dark areas.Final Answer:
The scene colors become fully desaturated with increased contrast -> Option AQuick Check:
Saturation -100 + Contrast 50 = grayscale + strong contrast [OK]
- Thinking negative saturation increases color
- Confusing contrast with brightness
- Assuming no effect from these values
var volume = GetComponent<Volume>();
if (volume.profile.TryGet<Bloom>(out var bloom)) {
bloom.enabled.value = true;
}
What is the likely problem?Solution
Step 1: Check how Bloom is enabled
Bloom is enabled by setting bloom.active = true (Bloom has no 'enabled' property).Step 2: Identify missing or wrong property
The code sets non-existent bloom.enabled.value, so Bloom is not enabled (compile error).Step 3: Understand correct fix
Use bloom.active = true instead, as stated in You should set bloom.active = true, not bloom.enabled.value. (Also ensure intensity > 0 for visibility.)Final Answer:
You should set bloom.active = true, not bloom.enabled.value -> Option DQuick Check:
Bloom uses active, not enabled [OK]
- Not setting intensity value
- Confusing enabled with active property
- Trying to add bloom to camera instead of volume
Solution
Step 1: Choose color adjustments for blue tint and mood
Lower temperature (negative) adds blue tint; slight desaturation (-20) softens colors for night mood.Step 2: Enable Bloom for glowing street lights
Bloom intensity 1.5 adds soft glow around bright lights, perfect for street lamps.Step 3: Evaluate other options
Set Color Adjustments temperature to 50, saturation to 50; disable Bloom warms colors (wrong for night), disables bloom; C sets bloom intensity 0 (no glow); D overexposes scene and disables bloom.Final Answer:
Set Color Adjustments temperature to -50, saturation to -20; enable Bloom with intensity 1.5 -> Option CQuick Check:
Blue tint + bloom glow = night scene effect [OK]
- Using positive temperature for blue tint
- Setting bloom intensity to zero
- Overexposing scene for night effect
Ready to prove it?
Pass the test and this pattern moves unknown
