Lighting the pieces in Chess 2: Part Two (Advanced Lightmapping)
/There are three main ingredients used to cook up the lightmapping on the pieces.
- Smart IBL
- High-res Geometry
- Directional Lightmaps
To see the detailed effect that each of these had on my lighting, click on the images for an up-close view.
Smart IBL
Smart IBL (or sIBL) from HDRLabs is an open standard for one-click lighting solutions captured from real environments. The net effect is much more interesting color and fill in the lighting then I could get by placing lights in the scene. Even better than the quality of the results is the speed of iteration. Various sIBL sets can be quickly swapped in/out at the click of a button to view the effects of different lighting conditions on the scene without the need for a professional lighting artist.
Because my needs were limited to a small subset of the sIBL features, I have not yet written an importer for Unity. If there is sufficient demand in the comments I'll consider making one. For now, the easiest way to setup a light-emitting environment according to the sIBL spec is using this free plugin from the Unity Asset Store: Lightmapping Extended.
sIBL sets in the archive usually include blurred hdr files for light emission, sharp reflection maps, information like sun direction and color, and even seemingly esoteric things like how far off the ground the light probe was when capturing the maps. Clearly some thought has gone into this that's beyond what I would have considered attempting to light without it. They are of the highest quality. Careful though, not all of the sets in the archive are free for commercial use.
High-Res Geometry
One technical note. In Unity meshes that are larger than 65k vertices are split up into multiple meshes. If you simply bake before laying out the atlas to a shared space for all the mesh pieces there will be seams.
Directional Lightmaps
There's not much to say here, except that Unity supports a directional lightmapping mode which stores a map that encodes the direction of the most significant light source in addition to the normal light color.
If your shader has a specular component, this is critical. Hopefully Unity will get around to documenting this feature someday... so I won't here. Just, if you want specular or other light direction dependent effects turn it on.
In the next part, we'll discuss capturing the shadows.