Skip to main content

A Beginner's Guide To Using The In-Built Unity Lightmappers

(Unfortunately, this is really more a *cynicist's* guide.)

This section will go over using the in-built Unity bakers. Unity provides three options for lightmap baking.

  • Enlighten is tried, true, terribly outdated, and depreciated in newer Unity versions.
  • The Progressive bakers are buggy with their own set of idiosyncrasies, especially in Unity 2018.

If you use Enlighten, you can also use Realtime GI. Realtime GI bakes a meta-lightmap that stores what each part of the lightmap can see, and then calculates the lighting while the scene is running in realtime, refreshing them whenever the lighting changes. This is great for when you want a cinema, or changing light source, but it requires keeping the size of the map small or else the time it takes to update the lightmap will be too slow to look good. Realtime GI also affects performance, even though it's refreshed so slowly. If you don't NEED it, turn it off. Keep that in mind for the next sections.

The Lighting Window

In the Lighting window, you can configure the most important settings for the in-built lightmappers. I'll cover them one-by-one.

For Environment Lighting, I recommend always using Skybox mode and always having a skybox in your scene that represents the ambient lighting you want. Always have the intensity multiplier at 1. Ambient Mode should match whether you want the skybox to change the lighting (use Realtime) or if the skybox is static (use Baked).

For Environment Reflections, it is best left to either Skybox, or a Custom probe referring to a probe in your scene. For more details, please see my Reflection Probe guide. Never leave this blank.

Realtime Lighting = do you want it? If not, make sure to disable this.

Mixed Lighting - as mentioned before, these are the mixed lighting modes. Choose carefully.

Lightmapping Settings - this is where you pick your poison. If you disable Realtime or Baked GI, different options will be disabled. These options mainly affect the end result. This is the options for Enlighten, because the Progressive ones are better explained in the Unity documentation.
* Indirect Resolution sets the lightmap size for Realtime GI. It has no effect on the baked static lightmap.
* Lightmap Resolution sets the texel size for the baked lightmap. You can view how many texels are applied to each object by selecting Baked Lightmap from the dropdown in the top-right corner of the Scene view.
* Lightmap Padding sets how big the gaps between each object on the lightmap are, but you rarely need to mess with it.
* Lightmap Size sets the maximum size a lightmap can be generated at. If an object has a big lightmap scale or scale in the scene, it will be clamped to fit in one of these textures, and if it's smaller than that, it'll be grouped with other small textures until they fill a lightmap. Bigger is better, but Unity isn't the best at filling these up tightly, so a bigger lightmap with small objects can often have big regions of wasted space.
* Compress Lightmaps should always be on. Without compression, lightmaps become incredibly large.
* Ambient Occlusion will add extra darkening to the corners of the lightmap, which can improve how it looks aesthetically even if it isn't exactly realistic.
* Final Gather will improve the quality of the final result and it looks nicer. However, it takes a bit extra to bake.
* Directional Mode sets whether directionality maps are generated. Directionality maps are required for normal maps to work with baked lighting.
* Indirect Intensity scales up and down how powerful indirect lighting is. The documentation suggests it should be a direct multiplier to the lightmap.
* Albedo Boost makes objects have a brighter base colour. The documentation suggests it makes things white, but that doesn't seem to actually be the case.
* Lightmap Parameters is a seperate settings file with even more options that are harder to explain. Please check the Unity documentation for more info.