Adding more lights to a project makes it possible to achieve subtle lighting effects, but at the cost of increased calculation times. One way around this is to render lightmaps. This incorporates lighting information into the surface textures of the models. Because the highlights and shadows are effectively ‘baked’ into the surfaces, the lights that created them are no longer needed in the scene, making it more responsive to work with.
To demonstrate this, we’ve created a project based on Mies van der Rohe’s famous Barcelona pavilion. It is lit using image-based lighting and a single directional light that casts strong shadows beneath the roofs of the pavilion.
To bake the lighting, we can select Render Lightmaps from the Render menu.
A new dialog appears. We just click Continue.
Now the RENDER LIGHTMAPS dialog appears. We will look at what the settings do in a minute. For now, we will just click Render to begin calculating the lightmaps.
This process can take a few minutes. For a complex scene, you may want to schedule it to run over lunch, or during a coffee break. The time required for automatic lightmap rendering vary depending on the number of polygons and other characteristics of the scene.
And here’s the result. The lighting information has been baked into the surface textures of the objects.
Setting lightmap quality
Now let’s look at what the settings in the RENDER LIGHTMAPS dialog do. The Resolution drop-down determines the size of the new texture maps CL3VER will generate in pixels. Raising this setting increases image quality, but at the cost of longer calculation times.
Below, you can see a side-by-side comparison of two of the Resolution settings.
Antialiasing determines how smooth edges will appear. The effect can be subtle, but higher values will result in higher image quality – again, at the cost of longer calculation times.
Gather Samples determines in how much detail CL3VER will sample the lighting in the project before baking it into the texture. Below a certain threshold, this setting has a major impact on the quality of the lightmaps.
The final two settings from the AUTOMATIC COORDINATES rollout, UV margin and UV angle threshold, control the placement of the baked textures over the surfaces of the models in the project.