Unleash the beast

So often when you're trying to improve the performance of your application you will have to make trade-offs between the visual presentation of your application and its performance. This time we will perform optimizations that will enhance both the performance and visual quality of our application is by using the integrated Beast lightmapping system from Illuminate Labs.

The goal of lighting in our game is to provide a realistic depiction of our world. Normally the objects in the world would have some base material or texture that describes their natural surface. The lighting algorithms used by the engine would then compute the effects of the lights on the pixels or texels of the object's surface when it is rendered.

Lightmapping, as its name implies, is the process of utilizing lighting data (emissive properties, real lights, and so on) and casting rays from these lights as if they were active in the scene. The engine will then take the actual effect of these lights and store it in texture maps that will be mapped onto textures at run time (Unity refers to this process as baking the lights). As a result you can have a very complex lighting environment based upon a computationally intensive number of lights. You can also have all of this information baked into the texture maps of the scene, resulting in increased visual quality without the expense of having lights within your scene.

As lighting is one of the more expensive operations you can perform on mobile devices, using lightmaps represents a major performance win. While lightmapping will eventually be replaced with per pixel lighting in shaders, today's mobile hardware isn't quite up to the task.

So let's look at how we can make this work for our application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.221.113