Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Indirect Lighting Controller has no effect in 2020.2

Discussion in 'High Definition Render Pipeline' started by Seith, Dec 19, 2020.

  1. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Hello, I just upgraded my project from 2019.4 to 2020.2 and the Indirect Lighting Controller doesn't seem to work anymore (no effect at all, whether it's set to 0 or 1000). Used to work perfectly fine in HDRP 9.2.

    The Indirect Lighting Controller is quite necessary to avoid shadows to be pitch black so it's kind of really important for it to work... Are you guys (@SebLagarde) already aware of this situation...?

    More info:
    I use a Physically Based Sky with a single directional light and no baking/light-mapping of any sort. Again, everything was working as expected in 2019.4.16f1.
     
    Last edited: Dec 19, 2020
    tkayaist likes this.
  2. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Alright I see now where this comes from. It seems in 2020.2 the Visual Environment section of the Sky and Fog Volume (the one that has the Physically Based Sky info) demands that Ambient Mode be set to ON (and then "Dynamic" in my case) in order to see the effect of the Indirect Lighting Controller.

    That same checkbox could be left to OFF in 2019.4 and caused no problem with the Indirect Lighting Controller (its effect was still visible).

    So I don't know if the bug was in 2019.4 or is in 2020.2 but that's the crux of the issue here...
     
  3. JansM

    JansM

    Unity Technologies

    Joined:
    May 20, 2019
    Posts:
    15
    Hey Seith,
    I've tried to follow your upgrade route: 2019.4.16f1, 7.5.2 -> 2020.2.0f1, 10.2.2, both HDRP imported from PackMan and as you see on the gif, Indirect Controller still works for me on 2020.2.
    I would like to specify the following:
    • What HDRP versions are you using?
    • If it only works when Ambient Mode is set to Dynamic, quite possibly Static Lighting Sky profile got reset during the upgrade. Could you recheck Lighting/Environment and see if all profiles and components are set correctly.
    • Does it reproduce for you on an empty project on 10.2.2 or only on upgraded one.
    • If it only reproduces on a specific project could you setup a simple repro project for me?
    Many Thanks!
     

    Attached Files:

  4. PowerJake

    PowerJake

    Joined:
    Nov 15, 2019
    Posts:
    64
    I am having the same issue. I do not understand much about lighting but if I understand the second bullet correctly I found this:
    upload_2020-12-21_13-55-20.png
    Both settings were "None." After changing the settings to what is shown in the screenshot, my scene went from this upload_2020-12-21_13-58-19.png

    to this:
    upload_2020-12-21_13-59-16.png

    So the indirect lighting appears to be working now, but it is really ugly. I can mess with exposure in my volume but the skybox gets too dark if I lower exposure. It is kinda like the indirect lighting is too intense or something. I would like to hear if this fixes the indirect lighting problem for @Seith as well, and if this fix causes the same overly bright scene issue.

    upload_2020-12-21_14-7-42.png
    (my eyes are bleeding oof ouch)

    Is this relevant to the original question or am I just not understanding how to do lighting?
     
  5. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    Hi @JansM, thanks for your reply.

    To answer your question, I'm using HDRP 10.2.2 (the one included in 2020.2.0f1).

    And you were right. During the project update the profile was somehow reset. I restored that so now I can uncheck Ambient Mode (in the Visual Environment part of the profile) and Indirect Lighting still works correctly!

    So thank you for that!

    Actually the project updating process also created another issue with Ambient Occlusion: In my window layout I can see both the scene cam view and the game cam view, and the ambient occlusion of the scene cam was overlaid over the game cam (and vice-versa!). Which you can imagine looked really weird.

    The only way I found to fix it was to remove the Ambient Occlusion override and then re-add it again. At that point the system was able to assign AO to the proper cameras.
     
  6. JansM

    JansM

    Unity Technologies

    Joined:
    May 20, 2019
    Posts:
    15
    @Seith,
    Glad to hear the issue got resolved, we will look more into why things in Environment tab got actually reset during the upgrade.

    Will try to reproduce your AO issue. Could you drop a screenshot of how it looks in your Unity? Does this ghosting appear only after upgrade? Thanks!

    Hey @GuardianOfTheLedge
    Seith's issue was that Indirect Lighting Controller volume component did not work. In your case you have correctly assigned a Volume that contains your cyan skies and it just bleeds a lot of color onto your objects. There are multiple easy ways to fix this (if you don't want to go deep into Shadergraph or custom passes):
    • You have tried adjusting exposure on HDRI side that is being used by a Visual Environment override. You can make another profile that contains only HDRI Sky component and plug it into Lighting/Environment tab. This way you have visual sky (used in volume) and the one that controls ambient lighting. You can freely adjust Exposure on the second one.
    • Actually use Indirect Lighting Controller. Select your main volume, click Add Override and add the controller. It allows you to control the amount of indirect diffuse and reflection light in your scene. More info: https://docs.unity3d.com/Packages/c...al/Override-Indirect-Lighting-Controller.html
    Hope that helps! :)
     
  7. Seith

    Seith

    Joined:
    Nov 3, 2012
    Posts:
    755
    @JansM Sorry I don't have a screenshot of the bug since I fixed it by removing the Ambient Occlusion from the post-effect profile entirely (and then added it again). The effect was simply that the AO pass was composited over the wrong camera view (Game AO -> Scene view and Scene AO -> Game view).

    In other words it was clearly a side-effect from Unity upgrading the project.
     
  8. PowerJake

    PowerJake

    Joined:
    Nov 15, 2019
    Posts:
    64
    I don't really know what I'm doing, but I kept those points in mind and pressed buttons for a while and now it works. Thanks for the help!
     
    Last edited: Dec 22, 2020