Search Unity

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:

  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,261
    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:
    6,261
    Yes, that could work.