What is baking lights in Unity3d, and what are the benefits?

Hey all,

I’m in a stage where I have 100+ lights in my scene. Now, I know this is too much, and I have methods in place to stop this affecting performance.

However, I was recently made aware of light baking, and now in turn I want to know more. I don’t wish to know how to do it; what I wish to know is what the benefits of light mapping are, what light mapping is, and basically anything that is useful.

Thanks,

Hi!

Lightmapping calculates the lighting for static geometry and saves it in textures. The benefits are, that it has awesome lighting effects, like light bouncing, Ambient Occlusion and Area lights work too! This means you lighting will look better without having to do much work. You can choose between single and dual lightmaps. Single means it replaces any dynamic shadows and lighting, only using the baked maps. This increases performance quite a bit, but reduces what you can do with lighting dynamiclly. With dual lighmaps, Unity bakes both lightmaps with shadows and without. It then uses the shadow distance to determine where to fade between lighmap shadows and realtime shadows. This is probably the best method.

There are some downsides to Lightmapping: You cant have lightmapped dynamic objects, so if your planning on moving thins that look good with shadows and all… you can’t. Lightmaps also take up a lot of space. Even on a small project my lightmaps fill up my 2Gb limit. Lightmaps also take a long time to calculate, so when changing things allot, it can get slow. Another downside, is that you can’t change things like light positions nd rotations without getting awefull results. One way around this is to bake dual lightmaps, but only use the non shadow ones, for stuff like Ambient Occlusion and light bouces.

Hope this helps,
Benproductions1

PS: It really depends on the project weaather or not you want to use them :slight_smile: