Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Progressive lightmapper fail to write lightning data

Discussion in 'Global Illumination' started by irobotgame, Jan 17, 2019.

  1. irobotgame

    irobotgame

    Joined:
    Oct 8, 2013
    Posts:
    3
    1. What happened

    I try to bake a scene with the progressive lightmapper. it finished baking all the maps but failed at writing the lighting data.

    This is from the console and the message keeps repeating.

    Failed copying the texture from 'C:/Users/Home/AppData/LocalLow/Unity/Caches/GiCache/a3/a310673e97f7cb0baacb22d2b804dd5b._comp_light.exr' to 'Temp/GI/ddf5f06eb8464973c0601e41d5d96bd0/Lightmap-45_comp_light.exr'.


    Failed to copy lightmap snapshot assets to directory: Temp/GI/ddf5f06eb8464973c0601e41d5d96bd0

    2. How we can reproduce it using the example you attached

    Not sure it only happens when the map size is 2048 or larger

    I try to clear the GI Cache and rebake but same problem failed when writing the lightning data.
    Can i save the maps i already baked? Or i have to rebake everything?

    I try to use enlighten but it took 2-3days and I had to cancel it.
    I try to report a bug but it also struck at uploading.

    unitybug_lightmapsettings.jpg unitybug.jpg
     
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    Hey!

    The lightmap in question gets flushed from the GI cache, thus you are receiving that particular error. We have already fixed the issue in Unity 2019.1.

    You can try one of the following to fix your issue:
    • Increase the GI Cache size in Preferences
    • If you are feeling adventurous, you can try downloading the latest 2019.1 alpha
    • Increase Lightmap Size to 4K
    I hope this helps.
     
    Last edited: Jun 26, 2020
  3. irobotgame

    irobotgame

    Joined:
    Oct 8, 2013
    Posts:
    3
    I try increasing the GI Cache to 35gb and increase light size to 4K. It just baked one map and then stop and does nothing. anyway I just use lightmap size 1024. that works
     
  4. Adil_Alhilali

    Adil_Alhilali

    Joined:
    May 16, 2020
    Posts:
    5
    in my case I decreased the lightmap size to 512 and it worked ok
     
  5. JohnDraisey

    JohnDraisey

    Joined:
    Jul 28, 2013
    Posts:
    22
    I just ran into this issue in Unity 2022.3.23 on Windows 11 on a 3080Ti Mobile GPU. The default GI Cache was 12GB, I raised that to 50GB. It says "Failed to copy lightmap snapshot assets to director Temp/GI/2336084f007deca8191b2c95475875d1. After raising the cache to 50GB the Building Assets Search Index started to move again. 52662 artifacts to resolve?? Pretty wild. FYI I started using Mesh Baker to make a 900 piece object into 1 object and told it to reconstruct UV2s so that I could lightmap it properly. Then all this went down.