Search Unity

Reflection Probe always loses data after baking lightmap

Discussion in 'General Graphics' started by arvzg, Sep 4, 2021.

  1. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    I'm finding that after re-baking my lightmaps, it seems to always clear the data on my reflection probes so I always have to re-bake the probes after baking lightmaps. Is this normal? I'm following a tutorial and they don't seem to be having this issue.

    using Unity 2021.1.19, with HDRP template
     
  2. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    Typically the baking process does indeed re bake the reflection probe data at the end of baking process

    Are you experiencing the reflection probe data missing? Or simply rebaked.

    If the former, maybe file a bug report or some more data on it here.
     
  3. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    missing. If I click on the probe after re-baking my lightmap, the reflection probe shows the HDRI cubemap and not any of the mesh surrounding it. Might be a bug, yeah
     
  4. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595

    Ah, I see, in that case, the problem may be that you haven't "told" the probes to include objects in the reflection process.

    To do this, you need to mark objects (prefabs) as static if you want them to be included in a certain feature.
    There are a few of them to consider too. Make sure you set up your objects correctly per project needs.

    ( please ignore the fact that I'm highlighting a reflection probe in the inspector image)


    https://docs.unity3d.com/Manual/StaticObjects.html

    Hope these help some.
     

    Attached Files:

  5. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    My reflection probes are working just fine, and everything that needs to be reflection probe static are marked appropriately. My problem as I stated originally is that baking the lightmap clears the reflection probe data and I have to re-bake the reflection probe after baking my lightmap - which is just super annoying and time consuming if I'm tuning my scene's lighting
     
  6. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    595
    Ah
    Hrmm , yes you're right, my apologies.

    personally, I've yet to test too much in the tech stream, but certainly, create a repro and bug report if this is repeatable.
     
  7. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    did you get an answer? I cant get reflection probes to bake, they always bake black.
     
  8. arvzg

    arvzg

    Joined:
    Jun 28, 2009
    Posts:
    619
    hmm that's a different problem than what I was having. my probes were baking perfectly fine, they just lose all that data when I hit play. I found a bunch of other people posting about the same bug and even found the bug report that's been around for a really long time and left unsolved. In the end I gave up on HDRP and went to URP

    You sure your gameobjects are set to Reflection Probe static?
     
  9. transporter_gate_studios

    transporter_gate_studios

    Joined:
    Oct 17, 2016
    Posts:
    219
    lol im on URP. yeah they are static, but you should still get the skybox even if nothing is set to static.
     
  10. abszisse

    abszisse

    Joined:
    Jul 10, 2019
    Posts:
    2
    Hey,

    I just run into a similar problem (using built-in render pipeline): Every time I bake the lighting, the lightmaps are fine, but the reflection probe cubemap are nearly black. After baking the reflection probes manually they are ok.

    The problem was gone, after I cleaned the GI cache: Edit -> Preferences -> GI Cache -> Clean Cache