GPU Light mapper Failing

Hello there, recently got around to baking parts of my project. Ran into a problem. No matter how low I set the lighting settings, the light mapper fails to bake in GPU mode. I have a 980Ti, so the memory should not be an issue. The errors I get are the following,

OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_MEM_OBJECT_ALLOCATION_FAILURE error executing CL_COMMAND_NDRANGE_KERNEL on GeForce GTX 980 Ti (Device 0)

OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_MEM_OBJECT_ALLOCATION_FAILURE

OpenCL Error. Falling back to CPU lightmapper. Error callback from context: CL_MEM_OBJECT_ALLOCATION_FAILURE error executing CL_COMMAND_WRITE_BUFFER on GeForce GTX 980 Ti (Device 0)

Any suggestions or help would be appreciated, thank you.

Edit: My Unity Version is 2019.2.5f1

I’m having the same issue with GTX1080 8GB. It started happening when I added several large objects made with probuilder.

Interesting. Did removing the large objects completely fix your problem?

I haven’t tried that, but reducing lightmap resolution from 40 texels to 20 seemed to help, for now.

1 Like

I’m seeing the same thing, it’s rare occurence to get the GPU mapper going.
It seems to be related to the new option in the mesh renderers.

If you mark “Receive Global Illumination”, two options are presented, via Lightmaps or via Light Probes.
Apparently the “Light Probes” option is supposed to replace the old hack of using “0” in lightmap scale value when you wish for the object to affect baked light but not be lightmapped itself.

However, using the Light probe option apparently assigns some INSANE lightmap scale to the mesh anyway. A couple of rocks filled up my entire 4096 x 4096 map. I forgot to turn off that option for a couple of trees and here I am, fresh machine reboot and looking up the forums to see if anybody has this problem.

Is the new Light Probe option bugged? Anybody else seeing this?

Hi, right now you need a 16GB card if you want to bake a 4K lightmap, but 2020.1 should improve the memory usage situation a lot. If you don’t have more than 8GB of GPU memory, go with 1K maps and you should have a much better time with the GPU lightmapper.

Huh I could’ve sworn I baked 4096x4096 maps on my GTX1080 (8GB VRAM). Are there any other variables at play here that can influence the memory usage?

Perhaps the objects in your scene fit into a 2K map so a 4K map wasn’t generated after all?