Exploring enthusiastically Unity5’s new features, obviously, I worked on the light’s baking. In this new version, it’s known under the sweet name of Global illumination, and, if I decided to write a little article on it, that’s because my use of it wasn’t very….intuitive (and also because I’m rather satisfacted of the result).
Indeed, Global Illumination is an extremely customizable functionnality, and….extremely costly in computation time. So, I faced some matters of stack overflow and computation time. After several trials, I found the following configuration rather conclusive, for the simulation of a town :
The baked resolution is set to 10, which represents a 10 texels per unit-resolution (a unit is equal to about 1 meter, on Unity). A too large resolution can bring stack overflows during the last baking steps.
In the General GI parameters, always to keep the memory cost low, it’s better to check the Directional Mode : Non directional. This option is determining to know the quantity of data we’ll stock into the lightmaps. Of course, non directional mode implies a less réalistic and beautiful result. The directional and directional specular modes add thelight direction, and more details on the indirect lighting. This article will soon (or not so soon) be extended by some trials on these lightmap types.
To reduice again the computing costs, I personalized the computing parameters, by creating a specialization for the houses. Indeed, the shadows on the buildings are less showy than the others.
Less precision for the realtime computing, and identical parameters for the rest will do the trick, here. So, here are the results on a testing scene. (generated by my city Engine)
Without lightmaps :
With non directional lightmaps :
Coming “soon” : tests with directional lightmaps.