Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Progressive Lightmapper keeps rebaking.

Discussion in '2018.1 Beta' started by hasseyg, Feb 18, 2018.

  1. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    78
    Hi, every time I either close and reopen Unity or complete a build, the progressive lightmapper rebakes the scene from scratch even though no changes have been made to the scene. Does anyone know how to prevent this, as it is frustrating having to wait for it to complete everytime.

    thanks
     
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,438
    Have you tried to turn off the "Auto Generate" option in the Lighting Settings window?
     
  3. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    78
    Hi, yes I have tried this but what happens when I restart Unity is that the lightmap is not displayed and my interior scene goes dark. If I then turn on auto generate, it rebakes the lighting again. The problem also happens when creating a new scene and then returning back to the original one.
     
    Last edited: Feb 18, 2018
    better_walk_away likes this.
  4. Giuseppe

    Giuseppe

    Joined:
    Dec 4, 2011
    Posts:
    26
    I notice the behaviour in general is different to enlighten in this regard, I am finding that if I make a small change, the whole scene rebakes.
     
  5. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    78
    Hi, yes it is supposed to rebake if you make a change to an object in the scene, but I am not making any changes at all and it is still doing it.
     
    better_walk_away likes this.
  6. ZiadJ

    ZiadJ

    Joined:
    Sep 3, 2011
    Posts:
    62
    Same thing happening here. It loses all the baked information once the editor is restarted. The only work around for now is to revert back to Enlighten for now I guess.
     
    better_walk_away likes this.
  7. kemalakay

    kemalakay

    Unity Technologies

    Joined:
    Jul 12, 2016
    Posts:
    224
    Hey @ZiadJ @Giuseppe @hasseyg

    Thank you for sharing your feedback. Currently, Progressive Lightmapper doesn't load converged lightmaps from cache, all the lightmaps are stored in memory. Thus, unlike Enlighten, Progressive Lightmapper restarts baking lightmaps since there's no cached data available.

    Until that feature is added to Progressive Lightmapper, I recommend using auto mode only while working on the scene. Once you're done with the setup in the scene or you want to load a different scene, you can disable auto mode and generate lighting manually. Generating lighting manually fetches the lightmap data from memory and loads it to your project, and a lighting data asset is created. Once you've a lighting data asset, the scene loads the lightmap data from that lighting data asset instead of restarting baking.

    TLDR; Auto mode in Progressive Lightmapper should only be used while working on the scene setup entirely. When you're done with the scene, or need to switch to a different scene, then please disable auto and generate the lighting manually (this step stores your data from memory to your project). So the next time you load the scene, baking won't restart and instead, lighting data will be instantly loaded.

    Thanks
     
    astraR and syscrusher like this.
  8. ZiadJ

    ZiadJ

    Joined:
    Sep 3, 2011
    Posts:
    62
    So, if I got it right, all I need to do is use manual baking once to force cache the data on disk and then I can move on to auto mode and the editor will fall back onto the on-disk cache when needed. It takes hours to complete here so I can't afford to give it a try right now to confirm.