Bird
Raised Fist0
Unityframework~20 mins

Bloom and color grading in Unity - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Bloom and Color Grading Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate
2:00remaining
What is the output of this bloom intensity adjustment code?
Consider this Unity C# snippet that adjusts bloom intensity dynamically. What will be the final bloom intensity printed?
Unity
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;

public class BloomTest : MonoBehaviour
{
    public PostProcessVolume volume;
    private Bloom bloomLayer;

    void Start()
    {
        volume.profile.TryGetSettings(out bloomLayer);
        bloomLayer.intensity.value = 1.5f;
        AdjustBloom(2.0f);
        Debug.Log($"Bloom intensity: {bloomLayer.intensity.value}");
    }

    void AdjustBloom(float multiplier)
    {
        bloomLayer.intensity.value *= multiplier;
    }
}
ABloom intensity: 2.0
BBloom intensity: 3.0
CBloom intensity: 1.5
DBloom intensity: 0
Attempts:
2 left
💡 Hint
Think about how the intensity value changes when multiplied by the multiplier.
❓ Predict Output
intermediate
2:00remaining
What color tint will be applied after this color grading code runs?
Given this Unity C# code snippet that modifies color grading, what will be the final color filter applied?
Unity
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;

public class ColorGradingTest : MonoBehaviour
{
    public PostProcessVolume volume;
    private ColorGrading colorGradingLayer;

    void Start()
    {
        volume.profile.TryGetSettings(out colorGradingLayer);
        colorGradingLayer.colorFilter.value = Color.white;
        ApplyTint(new Color(0.5f, 0.2f, 0.2f));
        Debug.Log($"Color filter: {colorGradingLayer.colorFilter.value}");
    }

    void ApplyTint(Color tint)
    {
        colorGradingLayer.colorFilter.value = tint;
    }
}
AColor filter: RGBA(0, 0, 0, 1)
BColor filter: RGBA(1, 1, 1, 1)
CColor filter: RGBA(0.5, 0.2, 0.2, 1)
DColor filter: RGBA(0.2, 0.5, 0.2, 1)
Attempts:
2 left
💡 Hint
The color filter is set directly to the tint color passed.
🔧 Debug
advanced
2:00remaining
Why does this bloom intensity adjustment code cause a NullReferenceException?
Examine this Unity C# code snippet. Why does it throw a NullReferenceException when run?
Unity
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;

public class BloomBug : MonoBehaviour
{
    public PostProcessVolume volume;
    private Bloom bloomLayer;

    void Start()
    {
        bloomLayer.intensity.value = 2.0f;
    }
}
AbloomLayer is never assigned and is null, so accessing intensity causes NullReferenceException.
BStart method is not called automatically, so bloomLayer is null.
Cintensity is not a valid property of bloomLayer, causing NullReferenceException.
Dvolume is null, so accessing bloomLayer.intensity causes NullReferenceException.
Attempts:
2 left
💡 Hint
Check if bloomLayer is assigned before accessing its properties.
📝 Syntax
advanced
2:00remaining
Which option correctly sets the bloom threshold to 1.2 in Unity C#?
Choose the correct code snippet that sets the bloom threshold value to 1.2 using PostProcessing bloom settings.
AbloomLayer.threshold.value = 1.2f;
BbloomLayer.threshold = 1.2f;
CbloomLayer.threshold.SetValue(1.2f);
DbloomLayer.threshold = new FloatParameter(1.2f);
Attempts:
2 left
💡 Hint
Remember that bloom threshold is a parameter with a value property.
🚀 Application
expert
3:00remaining
How many color grading settings are changed after this code runs?
This Unity C# code modifies color grading settings. How many distinct settings are changed after execution?
Unity
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;

public class ColorGradingChange : MonoBehaviour
{
    public PostProcessVolume volume;
    private ColorGrading colorGradingLayer;

    void Start()
    {
        volume.profile.TryGetSettings(out colorGradingLayer);
        colorGradingLayer.saturation.value = -20f;
        colorGradingLayer.contrast.value = 15f;
        colorGradingLayer.colorFilter.value = Color.red;
        colorGradingLayer.saturation.value = -10f;
    }
}
A1
B4
C2
D3
Attempts:
2 left
💡 Hint
Count each unique setting property changed, ignoring repeated changes to the same property.

Practice

(1/5)
1. What does the Bloom effect do in Unity's post-processing?
easy
A. Adds a soft glow to bright areas to make lights look natural
B. Changes the color saturation of the entire scene
C. Sharpens the edges of objects in the scene
D. Removes shadows from the scene

Solution

  1. Step 1: Understand Bloom effect purpose

    Bloom adds a glow effect around bright parts of the image to simulate light scattering.
  2. 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.
  3. Final Answer:

    Adds a soft glow to bright areas to make lights look natural -> Option A
  4. Quick Check:

    Bloom = Soft glow on bright areas [OK]
Hint: Bloom = glow around bright lights, not color changes [OK]
Common Mistakes:
  • Confusing Bloom with color grading
  • Thinking Bloom sharpens edges
  • Assuming Bloom removes shadows
2. Which of the following is the correct way to enable Bloom in a Unity Volume component via script?
easy
A. volume.profile.Enable<Bloom>();
B. volume.profile.TryGet<Bloom>(out Bloom bloom); bloom.active = true;
C. volume.profile.SetActive<Bloom>(true);
D. volume.profile.GetComponent<Bloom>().enabled = true;

Solution

  1. 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.
  2. 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.
  3. Final Answer:

    volume.profile.TryGet<Bloom>(out Bloom bloom); bloom.active = true; -> Option B
  4. Quick Check:

    Use TryGet and set active true [OK]
Hint: Use TryGet to access and activate Bloom in Volume profile [OK]
Common Mistakes:
  • Using GetComponent instead of TryGet
  • Calling non-existent Enable or SetActive methods
  • Setting enabled instead of active property
3. Given this code snippet in Unity, what will be the effect on the scene's color grading?
var volume = GetComponent<Volume>();
if (volume.profile.TryGet<ColorAdjustments>(out var colorAdjust)) {
    colorAdjust.saturation.value = -100f;
    colorAdjust.contrast.value = 50f;
}
medium
A. The scene colors become fully desaturated with increased contrast
B. The scene colors become more saturated and less contrasty
C. The scene brightness increases but colors stay the same
D. No change happens because values are invalid

Solution

  1. 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.
  2. Step 2: Predict visual effect on scene

    The scene will look grayscale with stronger contrast between light and dark areas.
  3. Final Answer:

    The scene colors become fully desaturated with increased contrast -> Option A
  4. Quick Check:

    Saturation -100 + Contrast 50 = grayscale + strong contrast [OK]
Hint: Negative saturation means grayscale; contrast >0 means stronger contrast [OK]
Common Mistakes:
  • Thinking negative saturation increases color
  • Confusing contrast with brightness
  • Assuming no effect from these values
4. You wrote this code to enable Bloom but it doesn't show any effect:
var volume = GetComponent<Volume>();
if (volume.profile.TryGet<Bloom>(out var bloom)) {
    bloom.enabled.value = true;
}
What is the likely problem?
medium
A. You need to set bloom.intensity.value to a positive number
B. TryGet is incorrect; use GetComponent instead
C. Bloom effect must be added to the camera, not the volume
D. You should set bloom.active = true, not bloom.enabled.value

Solution

  1. Step 1: Check how Bloom is enabled

    Bloom is enabled by setting bloom.active = true (Bloom has no 'enabled' property).
  2. Step 2: Identify missing or wrong property

    The code sets non-existent bloom.enabled.value, so Bloom is not enabled (compile error).
  3. 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.)
  4. Final Answer:

    You should set bloom.active = true, not bloom.enabled.value -> Option D
  5. Quick Check:

    Bloom uses active, not enabled [OK]
Hint: Use bloom.active = true, not enabled.value [OK]
Common Mistakes:
  • Not setting intensity value
  • Confusing enabled with active property
  • Trying to add bloom to camera instead of volume
5. You want to create a night scene with a blue tint and soft glowing street lights using Unity's Volume system. Which combination of settings achieves this best?
hard
A. Set Color Adjustments temperature to 50, saturation to 50; disable Bloom
B. Set Color Adjustments contrast to 100; enable Bloom with intensity 0
C. Set Color Adjustments temperature to -50, saturation to -20; enable Bloom with intensity 1.5
D. Set Color Adjustments exposure to 5; disable Bloom

Solution

  1. Step 1: Choose color adjustments for blue tint and mood

    Lower temperature (negative) adds blue tint; slight desaturation (-20) softens colors for night mood.
  2. Step 2: Enable Bloom for glowing street lights

    Bloom intensity 1.5 adds soft glow around bright lights, perfect for street lamps.
  3. 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.
  4. Final Answer:

    Set Color Adjustments temperature to -50, saturation to -20; enable Bloom with intensity 1.5 -> Option C
  5. Quick Check:

    Blue tint + bloom glow = night scene effect [OK]
Hint: Blue tint = negative temperature; bloom intensity > 0 for glow [OK]
Common Mistakes:
  • Using positive temperature for blue tint
  • Setting bloom intensity to zero
  • Overexposing scene for night effect
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard