Search Unity

Bug Where are volumes ACTUALLY defined?

Discussion in 'High Definition Render Pipeline' started by Cell-i-Zenit, Jun 6, 2021.

  1. Cell-i-Zenit

    Cell-i-Zenit

    Joined:
    Mar 11, 2016
    Posts:
    290
    Hi,

    What iam trying to do:

    I have two volumes, and i want to switch between them.

    What i tried to do this:

    Now in the documentation is says that i just need to create a new GO, with global volume, attach my new volume profile and change the weight of both global volumes and i should see a difference...

    But nothing happens when i change the weight... No difference in screen. But if i change some values inside my "DefaultVolume", the change is correctly applied to the scene.

    Now i disabled both gameobjects with the volume definition attached to them, but again: no change. My default volume is still applied.

    I also set both weights to 0, but again, only my default volume is applied.

    How does unity know about my volume? In my game scene are only 2 volume "definition objects" and apparently unity DOESNT use ANY of them, but somehow KNOWS that my default volume is used in this scene.

    So my question is: how can is use two *different* volumes in the same game scene?

    According to the unity docs, these are the steps:

    Code (CSharp):
    1. To add a Volume to your Scene and edit its Volume Profile:
    2.  
    3. Go to GameObject > Volume and select one of the options from the list.
    4. In the Scene or Hierarchy view, select the new GameObject to view it in the Inspector.
    5. On the Volume component, assign a Volume Profile to the Profile property field. If you want to create a new Volume Profile, click the New button to the right of the property field.
    6. The list of Volume overrides that the Volume Profile contains should now appear below the Profile property. Here you can add or remove Volume overrides and edit their properties.
    But this is just not true lmao.

    Here is the proof (Game is running):

    Weight is 0:

    Weight is 1:


    No difference...
     
    Last edited: Jun 6, 2021
  2. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, did you try assigning different priorities to each volume?

    Having the same priority is not recommended when the same parameters are overridden in both volumes.
     
    Ruchir likes this.
  3. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Also, try decreasing the weight of the default one (The "DefaultVolume" one) if you want to blend between two global volumes.

    Although try using local volumes as they work for sure if you want to blend between two profiles, evident by all the volumes present in the HDRP demo scene.
     
  4. Cell-i-Zenit

    Cell-i-Zenit

    Joined:
    Mar 11, 2016
    Posts:
    290
    I changed every single value possible and nothing really changed anything.

    I changed the weight, the priority.. even deleted the game object. Nothing worked. Nothing changed anything, except if i change any override in the "default" volume.

    But what i found out is that i need to go into the project settings, HDRP -> Default Settings -> and here i need to assign a different volume to the default values. If you dont do this, unity will just ignore anything you do with other volumes.

    But if you tell unity to use a "custom" volume in the default project settings, then everything works as expected

    super intransparent and the fact that i did only find this out via trial and error is super bad

    Here is the "Fix"