Search Unity

Why do I need reflection probes to prevent sky light when all light is baked?

Discussion in 'High Definition Render Pipeline' started by PutridEx, Mar 28, 2022.

  1. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Why do I need to painfully place reflection probes to prevent sky reflection? Isn't baking suppose to take care of that for me? This has been a pain point for a long time and I'd like to know why it's a thing.
    If I bake lights, isn't sky light baked?

    And isn't SSR supposed to help with that? It seems to do the job in built-in but not HDRP.
     
    blueivy likes this.
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Do you have picture examples? Fallback will fall back to whatever is set in your environment, the sky is default.
     
  3. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    with probes: Unity_aRtmvylNJq.png

    without:
    Unity_zaT5aSoriN.png



    With:
    Unity_j8ARLDUNdK.png

    without:
    Unity_LJdFwwZuVF.png

    Ignore the weird looking cubes, this sky issue always happens no matter what.
    Actually you can see it in action within the HDRP sample, go into the interior level and simply remove a reflection probe, then things will go very wrong. Even though lighting is baked there.

    I tried physical sky and HDRI, and both static & dynamic
     
    Last edited: Mar 28, 2022
  4. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    What is in your Volume Profile ?

    I'm going to guess here a little.
    When you disable light probes the global ambient light probe might be used.
    Also are your objects static ? I'm surprised light probes are used at all when you have baked lightmap.
     
  5. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Light probes are not used, it's all lightmaps. Light is baked and all the cubes are static & receive baked ligh
    It also is the same for the official HDRP sample
     
  6. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Lightmaps can store only diffuse lighting (view independent) but in PBR every surface also reflects some light (view dependent specularity). Without probes those reflections are sourced from the global reflection probe generated from the skybox, causing "reflection leaks".
     
    JamesArndt, JoNax97 and PutridEx like this.
  7. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    I recently got some problems with reflection probes.
    So baking reflection probe was using Window->Rendering->Lighting->Environment volume instead of scene volume.
    Also Baked reflection ,real time reflection, and custom reflection were like totally different.

    Can you set your reflection probe to realtime and see the behavior.

    But thinking some more about this it is not exactly your problem ;)
     
  8. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Did, similar results. The issue is that I need reflection probes in the first place to get correct lighting after baking, but neto's explanation makes sense.
     
  9. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Shouldn't SSR help with that, acting as a replacement for reflection probes? (even if the fact it's screen space can lead to issues with screen corners)
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,795
    Yes, but SSR still needs to fallback to something when it decides it doesn’t have the info it needs, and falling back to the sky color will look like ass. (as opposed to something from a local reflection probe, which will be a lot closer to correct color values)
     
    Last edited: Mar 29, 2022
  11. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    71