GPU Lightmapping

Diary of an Indie Game Developer: Chapter 30

Jason Tuttle
2 min readAug 30, 2018

Baking lightmaps is not fun. You have to set up your UVs very carefully or else you get ugly baking errors. What’s more, baking lightmaps inevitably takes a very looooooooooooooooooooong time.

On one of my test levels, it currently takes about 30–40 minutes to bake, and from what I’ve heard, that’s not all that bad. I’ve heard horror stories of lightmaps taking hours or even days to bake on complex scenes.

Not only are long bake times very annoying, they seriously cut into your productivity as they dramatically lengthen the time it takes to iterate on your designs.

So, needless to say, I’m thrilled by the recent trend towards GPU based lightmapping in Unity!

First out of the starting gate seems to be a new Unity plugin called Bakery. Written by a solo developer, Arthur “Mr F” Rahteenko, Bakery is Windows only, and also only works on Nvidia GPUs, but I’ve tested it, and it’s very impressive. It doesn’t support Directional lightmaps or LODs yet, but even in it’s current state, it’s VERY fast and it produces crisp clean lightmaps. After running a test bake on Cyrtek’s Sponza scene, Arthur reported that Bakery baked the scene in 200 seconds on a GTX 1060 6GB. Using Unity’s builtin Enlighten Lightmapper, the same scene took more than an hour to bake. Ouch!

But wait, there’s more!

Later this year, Unity is expected to release an updated version of their builtin Progressive Lightmapper with support for GPU based baking:

I’ve really got my fingers crossed for this one because it should work on Macs as well as Windows. Since my current dev machine is a Hackintosh, Mac support is essential for me.

According to a Unity blog post, the same Sponza scene that Arthur used for testing Bakery baked in 1.05 minutes on Unity’s Progressive Lightmapper when running on an AMD Vega GPU vs 35.2 minutes when running on a quad-core CPU.

Sweet!

Can’t wait!!

See you next week…

--

--

Jason Tuttle

Indie Game Developer. Formerly, Associate Environment Artist at Santa Monica Studio working on God of War. In a previous life, I was the IT guy at TED.