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

Ambient light not applied to non-static objects with Precomputed GI

Discussion in 'Global Illumination' started by PsyDev, Oct 18, 2017.

  1. PsyDev

    PsyDev

    Joined:
    Sep 30, 2015
    Posts:
    31
    With Precomputed GI and Realtime Lighting (no Mixed/Baked GI), ambient lighting does not apply to static and non-static objects in the same way.

    For static objects, it appears to apply uniformly, without consideration for light probe positions (which is what I would expect). However, for non-static objects, the ambient light applied to the object is affected by how much ambient light is received by the light probes affecting it. Which leads to another mystery - ambient light is applied differently to different light probes. If you have a closed space like a room, and put some light probes inside the room and others outside, then bake lighting, you can actually see the light probes outside the room changing color as you adjust ambient lighting. Light probes inside the room do not get affected (or at least not nearly to the same extent) as the ones outside. If you move the non-static object closer to one of the light probes that is outside, one that is being affected by ambient light, then sure enough, the ambient light starts to apply to the non-static object.

    It appears that ambient light is being occluded on light probes, as opposed to being applied uniformly across all light probes. As if it ambient light was considered to be generated by the skybox?

    Is this expected behavior? I thought ambient light would be applied uniformly across all objects regardless of precomputed GI or light probes.

    In the screenshots included, you can see that different light probes are being affected differently by ambient light depending on whether they are inside the room or not.

    Note that Environment Lighting Source mode is Color.
     

    Attached Files:

    ksam2 likes this.
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Yes, it is expected behaviour, since it's not "ambient" light, but environment light. And the whole point of the light probes is to capture the light as it would be at the point they are placed.

    If you want dynamic objects to be lit like they aren't occluded, either don't use light probes at all, or if you only want some object to be fully "environment" lit, do an anchor override, to a transform that is outside your level.
     
  3. PsyDev

    PsyDev

    Joined:
    Sep 30, 2015
    Posts:
    31
    Thanks, that makes sense. Rereading the documentation, it states: "However if either Baked GI or Precomputed Realtime GI are enabled in your scene then this ‘skylight’ will be blocked by objects in your scene - giving a more realistic result." Which makes it pretty much useless for completely indoor scenes. I wish I knew a way " to increase the overall brightness of a scene without adjusting individual lights" as the same docs say, but for completely enclosed spaces. Post-processing color grading and brightness adjustments maybe?
     
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,631
    Yes, that could work.
     
  5. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    I have same issue! There should be a way to stop ambient light inside buildings. Any good solution for this?
     
  6. HugoCortell_VFS

    HugoCortell_VFS

    Joined:
    May 7, 2020
    Posts:
    1
    If you remove all probes and then utilize environmental reflections, it will add a tiny bit of ambient light.
    However, I find it insane that there is no actual ambient light tool or ambient light volumes.