Customizable Navigation Bar

Friday, November 8, 2013

Recommended Tools: Lightmapping Extended In Unity

When developing, I like to have the ability to tinker with and manipulate every single property of an object. It doesn't matter if I am changing something about a cube or if I am fiddling with light map settings, if I want to fiddle, I like to have the ability to.

While I was working on CuBlitz, I found that the default light mapping settings just didn't have enough there for me. They were great for getting really quick test results, but when I wanted to finalize everything and tinker with settings, there just wasn't anything there for me. Unity did let you export an XML file that the Beast light mapper would look at, but that seemed like a slightly archaic way to do things. I felt like there could have been a better way to approach it than manually edit an XML file.

While browsing the net, looking for better ways to do things, and what everything in the XML file meant, I came across a tool called Lightmapping Extended. This completely free tool created an editor that made tinkering with the beast settings extremely easy, and it even exposed some settings that were not documented by Unity.

One thing to keep in mind is that some of these settings require Unity Pro, such as the global illumination settings, so if you are using Unity Free, this may help with some settings, but not everything will be usable for you.

Lightmapping Extended made changing basic Beast settings and baking extremely convenient, and some of the previously unexposed settings are really nice to have.


The settings window of Lightmapping extended brings up a ton of additional settings for the general usage of Beast, like how to handle shadows, geometry, anti-aliasing, and it even gives you the option to leave a thread open so beast doesn't take all of your system's resources baking a light map. This was actually a problem I had while working with the default light mapper. The low powered laptop I was using to bake lights was also the same low powered laptop I was using to develop in Unity, and when I was baking lights it made my computer so unusable that I just had to sit and wait for 2 hours until the light maps were done baking.


Lightmapping Extended also brings up a bunch of settings for global illumination and how light bounces. In this window you also find a previously unexposed setting to use the Monte Carlo algorithm for light mapping. The Monte Carlo algorithm is much slower, but it is also the most accurate.

Here are examples of a scene using the different algorithms that are exposed with Lightmapping Extended
This uses the default algorithm called FinalGather
This image shows a mixture of the FinalGather algorithm and the PathTracer algorithm. Using similar settings as the first image we see that the light is much brighter, adn the light spread is a little bit difference
Here is the Monte Carlo algorithm. It provides a nice balance between the two previous images, and the light spreadis much more realistic

The last image is for environmental lighting. This contains settings for adding a skylight for softer lighting throughout the scene, but it also gives you an option for something known as Image Based Lighting (IBL). With IBL if you have a cube map texture (Example Here) that is an EXR or HDR format you can use it to bake lights as if the scene was in that environment. So you can create a cube map of the sky and everything else at a sunset, and instead of fiddling around with environment lights, you can pass the cube map into Lightmapping Extended and bake the image lighting into the scene. 


I highly recommend grabbing Lightmapping Extended from the Asset Store, and if you are worried about having to pay for a tool like this, worry no more, because it is absolutely free. 

Anyways that is all for this week, I hope you guys enjoyed the post, and give the tool a shot, it is extremely useful.