Search Unity

Envioronment Lighting Not Working in Bake

Discussion in 'Global Illumination' started by Alde-Baran, Apr 28, 2020.

  1. Alde-Baran

    Alde-Baran

    Joined:
    Nov 15, 2019
    Posts:
    39
    Hello. I am making a FPS game in Unity 2018.2.8f1. I've tried to light bake and the Envioronment Lighting is not working in light map, but it's working in real time lighting.
    Real Time lighting:
    no bake.PNG
    After light bake:
    baked.PNG
    Note: The spheres and the door (rectangle on the right) are dymanic.
    My light settings:
    light settings.PNG

    The Environment Lighting is not working in light map.
    How can i fix it?
     
  2. uy3d

    uy3d

    Unity Technologies

    Joined:
    Aug 16, 2016
    Posts:
    187
    The environment lighting comes from infinitely far away. When you bake a closed room, no light from outside can enter this confined area, hence no red tint. The realtime result doesn't know anything about sky occlusion and applies the environment everywhere. That's the difference you see.
     
    Alde-Baran likes this.
  3. Alde-Baran

    Alde-Baran

    Joined:
    Nov 15, 2019
    Posts:
    39
    Thanks that's work, but it's still doesn't work on the static objects.
    The top of this wall still black.
    why2.PNG
    Is there a solution for this? Or i should add a red light top of the wall?
     
  4. JenniferNordwall

    JenniferNordwall

    Unity Technologies

    Joined:
    Sep 19, 2016
    Posts:
    160
    Hey, are you sure that wall is static? I'm struggling to see what's going on in the last picture. Do you mind going into the Scene view mode (top left dropdown in SceneView) called "Baked Lightmaps". There you will see the raw result of how your bake is done and which objects are included. Please post it here :)
     
  5. Alde-Baran

    Alde-Baran

    Joined:
    Nov 15, 2019
    Posts:
    39
    I am sure the wall is static.
    sure.PNG

    I go into Baked lightmaps mode, it's showing static object's and their lightmap uv's.
    yes.PNG
    But the problem is this static objects are not affect by Envirorment Lighting when i bake.

    Only things affected by Envirorment Lighting are light probes and dynamic object.
    I tried with light probes and without light probes.
    light probes.PNG no light probes.PNG
     
  6. Klausbdl

    Klausbdl

    Joined:
    Aug 12, 2013
    Posts:
    64
    Having the same problem. I have an open terrain with the sun pointing up, so its night time, so it looks all dark when I bake the lights :/