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

Question Additive scene and ambient light

Discussion in 'High Definition Render Pipeline' started by FOXAcemond, Oct 9, 2020.

  1. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    Hello,

    I'm loading two scenes in my project at the same time that have very different ambient lighting.
    I'm trying to make it so that one does not influence the other.

    I've set up light layers but I'm having trouble with ambient light probe.
    This "fallback" probe is used when I disable traditional light probes (from light probe groups) on my meshes.

    The problem is that HDRP can only manage one ambient light probe, so it will pick the one from the last scene that I've loaded. If first scene is dark, and second one is bright, my meshes with light probes off become tiny local suns...



    What can I do to prevent that?
     
  2. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    I don't really care about this ambient probe light. And I don't want to remove Environment from lighting baking calculations.
     
  3. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    If you're wondering why I don't want light probes...



    Now, I kinda found a workaround for this issue. I'm setting the upper bar as static and I added more light probes in the dark area above the game. Not much happening there, but that's the point, since this object is a little above the game, it should know that this area is pitch black.

    Also, I removed light probes that are too close to the light source to avoid abusively bright objects.
     
  4. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    I still have no idea how to control ambient light probes when loading a scene additively though... I think there is no control over them and that the game just uses the one from the last scene that has been loaded.
     
  5. Camarent

    Camarent

    Joined:
    Feb 19, 2014
    Posts:
    168
    I think you right because Unity treats all lighting as unified system. As I know Unity saves ambient light probe inside Lighting data. When you load new scene you will load corresponding light data.
    https://forum.unity.com/threads/about-loading-lightmaping-data-from-scene-with-additive-mode.859612/
     
  6. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
  7. FOXAcemond

    FOXAcemond

    Joined:
    Jan 23, 2015
    Posts:
    99
    Hello pierred,

    I did try the setting in the local volume but I don't want to change the reflection behavior of the scene when it should not be influenced by the other.

    Today I tried to add a global volume to the game but it will either pick the global volume setting or the local setting. If I want to kill the effect the setting must be close to 0, but that also disables all GI on my local scene which is not what I want either.

    So to conclude, if the local setting is taken into account (set to 1, normal) it will reflect white, if the global volume setting is taken into account (~0.01) this reflection is fine but I lose all GI or reflections.

    Did I miss something?
     
    agus_r likes this.