Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Baker switches to CPU when using light probes

Discussion in 'Global Illumination' started by Crystalline, Nov 28, 2019.

  1. Crystalline

    Crystalline

    Joined:
    Sep 11, 2013
    Posts:
    151
    The scene bakes just fine with the GPU when no light probes are added to the scene, but as soon as I add one, it says its out of memory and switches to CPU..

    Why is that happening?
    Using the latest 2019.3 version.

    Im using a 1060 6GB.
     
  2. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    551
    There is bug the GPU progessive lightmapper. After every bake, you have to delete folder: /AppData/Roaming/NVIDIA/ComputeCache/.

    Also, with the GPU lightmapper, you can only use up to 2 GB of your graphic's card ram because of resrections by Nvidia.
     
    ROBYER1 likes this.
  3. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,335
    Each Light probe group takes up a significant amount of memory in the 2019.3 preview version. A better allocation strategy was added in 2020.1a15 so please use that version if possible.
     
    hippocoder likes this.
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,335
    These statements are both incorrect.
    - The kernel caching done by the Nvidia driver is caching kernels per Unity version and you don't have to delete that folder any more as the bug causing it to cache incorrect kernels has been fixed.
    - There is a 25% contiguous allocation size limit (only happens to be 2GB if you have an 8GB card). The lightmapper can use all of your GPU memory but the chunk size can be a problem in 2019.x versions. Lower the lightmap atlas size to work around this issue. We aim to fix this in version 2020.2.
     
    ROBYER1 likes this.
  5. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    551
    Sorry, but I just can say what I experienced with the GPU lightmapper. Had to delete the Cache every time and I was not able to bake a 4k lightmap with my RTX due to the chunk limitation. So these tips might be useful for user who can't upgrade just for the GPU lightmapper because new Unity versions break other things. So your technical information is right, the practical use is not so. Why I have an expensive GPU then I cannot use it's full power?
     
    Last edited: Dec 2, 2019
  6. Crystalline

    Crystalline

    Joined:
    Sep 11, 2013
    Posts:
    151
    Alright, thanks for clarification .
     
  7. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,335
    I am sorry to hear you can't use the latest version, did you file a bug report about that breaking change?
    Keep in mind that the GPU lightmapper is still in preview and we are working on improving the memory consumption.
     
unityunity