Advanced lightmapping in Unity
Note: Lightmapping Extended is no longer compatible with Unity since the Beast light baking system has been removed from the engine.
While investigating potential lightmapping solutions for RedFrame, we explored Unity's own lightmapping system which leverages Autodesk's Beast. Beast unfortunately is lacking a few more obscure features useful for simulating realistic artificial indoor lighting, most notably photometric lights for reconstructing the unique banding patterns indicative of incandescent bulbs installed in housings. This prevents us from completely switching our workflow from Mental Ray to Beast, though we'll likely still use Beast for specific locations in the game that are favorable to Beast's feature set.
Beast is a quite a full-featured lightmapping solution in itself, however Unity's specific implementation of the tool favors simplicity over customization. Some very useful features are hidden away, and it's not immediately obvious how to enable them. To give Beast a fair evaluation, I needed to access them.
Unity fortunately is able to accept Beast XML configuration files, opening up nearly the full potential of the system. There are a plethora of additional options recognized by Beast, but only a limited number are documented by Unity. After a bit of digital archaeology I was able to unearth documents that revealed the missing parts of the API.
I've created a Unity editor tool called Lightmapping Extended that implements the full Beast XML specification and presents all available (and compatible) options in a user-friendly UI. It's available on GitHub:
This tool unlocks a few key hidden features not available in Unity's built-in Lightmapping settings window:
- Image-Based Lighting - light a scene with an HDR skybox, mimicking realistic outdoor lighting
- Path Tracer GI - a fast, multi-bounce lighting solution
- Monte Carlo GI - a very slow but extremely accurate lighting solution
Keep an eye on the Lightmapping Extended thread on the Unity forum for future updates. If you run into any issues, please let me know either through the blog comments or the Unity forum thread. I'd like to make this the best and most complete solution for lightmapping inside of Unity.