Search Unity

Disable light probes in outside areas?

Discussion in 'Global Illumination' started by WildStyle69, Jan 14, 2020.

  1. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    So my VR project has interior and exterior areas - interiors are baked / mixed lighting and outside real-time (sun) with time of day.

    Because I had problems getting the light probes to work / blend correctly last year, my quick fix was to disable probes on all the mesh renderer in the outside areas, and not put any probes outside at all.

    Now my project is getting closer to completion, I need to revisit this issue. Is it worth spending time to get light probes setup in the exterior areas too? Will it be possible to get a blend between the darker interior and exterior areas? What's the benefit - is there any?

    Any pointers appreciated, thanks!

    // Wildstyle
     
    Last edited: Jan 14, 2020
    AntonioModer likes this.
  2. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    Hey WildStyle69,

    I don't know how your setup looks like exactly, but you could try to place probes on either side of the border from exterior to interior (so that you have a quick blend when going from outside to inside) and place very few probes scattered in the exterior environment. That way, you prevent leaking light from outside to inside or vice versa.

    Cheers
     
    WildStyle69 likes this.
  3. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,073
    Light probes add indirect lighting, so in exterior areas you will get reflected light from the surface your objects are on.
    Depends on your project but generally light probes do make the better impression.

    If you got something like passage from dark to light area I would add some extra probes there.
     
    WildStyle69 likes this.
  4. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Thanks for the feedback - seems like I should give this another try, and that it's possible.. based on your comments. I'll take another crack at it and try to get it working, would be great to have indirect on the exterior areas too.

    // Wildstyle
     
  5. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    So yeah - I must have been doing something wrong last time I tried, as I've now been able to get things setup and working pretty well with light probes in the outside areas. :)

    // Wildstyle
     
  6. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    OK - so I was wrong, it seems things are not working correctly still.

    Additional config info -- my project running on Unity 2019.2.17f1, has a multi-scene setup, lighting data is in the main / world systems scene, other scenes loaded additively. When I bake the lighting I do it with all scenes open right now. Light probes are also in the main scene, and I've merged them into one probe set for baking.

    Current issue seems to be that all scenes lighting looks correct after baking in the editor completes. However when I restart the editor or unload / reload the scene in editor, the lightmapping between the interior and exteriors scenes is then much darker on the exterior.

    I'm also using an anchor override object to match sure the models mesh renderer are using a reference point from the outside lighting setup, but that does not seem to help much.

    See screenshots attached for comparison.

    Before (looks more correct to me)

    GB-IMG-Lighmapping-Light-Probes-Before-1-0.png

    After (looks too dark for the shadows?)
    GB-IMG-Lighmapping-Light-Probes-After-1-0.png
     
    Last edited: Jan 16, 2020
  7. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Also tested baking only outside probes a the single scene for the building as per screenshots above. The result is exactly the same as the darker shadow images, so I guess this is the expected result?

    So using light probes on dynamic objects basically makes all the shadows much darker by default? As in effect you get the light probes shadow, plus the directional light shadow stacking together... which seems weird to me.

    // Wildstyle
     
  8. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    Also perhaps worth noting that that I'm using Realtime Lighting and Mixed Lighting together. Mixed using Shadowmask. I also just tested by changing the only active light for the sun (Directional Light) from mixed to real-time only, and changed the Light Settings > Mixed Lighting to use Baked Indirect and still the shadows are very dark from the Light Probes, is this expected?

    2020-01-16_16h06_10.png

    // Wildstyle
     
  9. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    318
    After chatting with a few peeps, seems this behavior is expected. So I'm going to understand some more, experiment and work with it until I can get things looking as I'd like.

    // Wildstyle
     
  10. FiveFingerStudios

    FiveFingerStudios

    Joined:
    Apr 22, 2016
    Posts:
    510
    When loading scenes additively, Unity does not merge light probes. Unity always uses the light probes from the last scene loaded.


    Ive come up with a solution that I’m using in my project (it’s pretty complicated), and I was thinking about releasing a asset in the Asset Store, but I have not gotten enough interest.

    Light Probes Working with Scenes Loaded Asynchronously
     
    mbussidk and WildStyle69 like this.