Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Why does Volumetric Fog have two checkboxes?

Discussion in 'High Definition Render Pipeline' started by DugganSC, Aug 9, 2023.

  1. DugganSC

    DugganSC

    Joined:
    Feb 6, 2014
    Posts:
    6
    This tripped me up when I was learning about HDRP Volume overrides, and I recently ran into someone else who didn't know that you needed to check both the checkbox to the left of "Volumetric Fog" and the one to the right. I'm guessing that maybe the first one is whether the overall Volumetric Fog is active, and the second is whether it's "on"? Is this an artifact of prior versions?
     
  2. meicexl

    meicexl

    Joined:
    Apr 9, 2020
    Posts:
    11
    The left checkbox you are talking about is used for overriding any value from the default value. If that checkbox isn't ticked, that means you don't want to override it, and Unity will just use the values from the default Volume Profile Asset.

    In your case, it seems like Volumetric Fog is turned off in your default Volume Profile Asset. You then added an override volume, said "I want to override this" by ticking the left checkbox, and then overrode the default value by ticking Volumetric Fog on.

    In essence, the left checkbox is "I want to override this", and the checkbox to the right of that is what you want the override to be.

    You can see your default Volume Profile Asset settings in Edit -> Project Settings -> HDRP Global Settings.
     
  3. DugganSC

    DugganSC

    Joined:
    Feb 6, 2014
    Posts:
    6
    Huh. I guess that makes sense. :) Thank you.
     
  4. MrBigly

    MrBigly

    Joined:
    Oct 30, 2017
    Posts:
    218
    I am just curious, is there a purpose or reason why indicating what you want the override to be doesn't imply you want to override?

    Asking for a friend...
     
  5. meicexl

    meicexl

    Joined:
    Apr 9, 2020
    Posts:
    11
    While I don't know what Unity's exact intention was, to me, it seems like a purposeful UX choice. It's the most simple and clear way to do it that matches how others parameters you can override work.

    With other parameters like floats, you check the checkbox and then enter your override value. But now suddenly, with bools there's only thing? And the default value for some parameters differs. Some are false by default, others are true. So I'm clicking this checkbox, and some things override from false to true, but others from true to false? What? That doesn't make any sense! Also, you'd have to display the default value that users are overriding, and add a message that the value they're overriding is being grabbed from "MyDefaultAsset.asset" or something.

    It'd just be messy, and probably get people more confused. The second checkbox basically unifies everything and makes it all consistent.
     
  6. MrBigly

    MrBigly

    Joined:
    Oct 30, 2017
    Posts:
    218
    Now that makes sense, thank you for the clarity of the context of the second check box.
     
  7. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    548
    @meicexl is right on both counts.

    Its related to how overrides work, because the Volume system is a core part of SRPs you will always have a base list of what's enabled for the system, these are your render pipeline assets ( which you can build for mulithardware targets)

    Local Profiles then have an
    override or not and
    state enabled or disabled.

    In 2023 this is a little clearer than check boxes and is an "(dis)/(en)abled state instead.

    Not everything is the same override state though SSAO for example if, for whatever reason you wanted it off in a scene but your project default is on and a state of 1, you'd need an enabled volume locally or global in the scene with a state of 0.

    Overrides and volumes are extremely powerful especially when contacting to other scripts or timelines/animations, and of course like I said it's a core system fof SRPs. Well worth mastering it where possible.