Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

GPU lightmapping fails in 2019.3.0b10

Discussion in '2019.3 Beta' started by hasseyg, Nov 13, 2019.

  1. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    82
    Hi, when I try and bake a large scene using the GPU lightmapper, it fails and switches to CPU with the error: CL_MEM_OBJECT_ALLOCATION_FAILURE error executing CL_COMMAND_NDRANGE_KERNEL.
    I am using an RTX 2060 Super and I have the lightmap size set to 2048. It fails after it has got more than half way. Is anyone else getting a similar problem?

    thanks
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448
  4. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    82
    Hi, I found out through trial and error that moving the viewport during GPU baking made it fail, as well as did having the viewport show the entire large scene. So I zoomed into one object and let it GPU bake without touching the editor window and it finally completed successfully. This was using a lightmap size of 2048. In my case I had 68 lightmaps of this size. I also found that everytime I wanted to do a new GPU bake I would have to close and restart the editor otherwise the mrays per second were drastically lower.

    thanks
     
    Last edited: Nov 17, 2019
    konsic likes this.
  5. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    mgear likes this.
  6. CosmosBear

    CosmosBear

    Joined:
    Aug 2, 2012
    Posts:
    67
    It fail 100% when I'm working with 3ds max at the same time with 2019.3.b11. It was fine with 2019.3.b7 tough it might be both my documents are bigger and I reached the treshold when it's too much for gpu mem. (I have a 2060RTX too)
    It's very annoying...
    If unity could somehow fix it, either by pausing the rendering and notifying you instead of just reverting to cpu and loose everything or something that would be great!