Lighting Process

Lighting
What is a lightmap?

"A lightmap  is a data structure  which contains the brightness of surfaces in 3d graphics applications such as video games . Lightmaps are pre-computed, and normally used for static objects only. They are particularly suited to urban and indoor environments with large planar surfaces. " - Wikipedia

"Lightmaps can also be calculated in real-time [1]  for good quality colored lighting effects that are not prone to the defects of Gouraud shading, although shadow creation must still be done using another method such as stencil shadow volumes  or shadow mapping , as real-time ray-tracing is still too slow to perform on modern hardware in most 3D engines. "

Lightmaps are created via a technique called ray-tracing.

What is ray-tracing?

"In computer graphics ,  ray tracing is a technique for generating an image  by tracing the path of light  through pixels  in an image plane  <span style="font-size:14.399999618530273px;color:rgb(37,37,37);font-family:sans-serif;line-height:17.920000076293945px;"> and simulating the effects of its encounters with virtual objects. The technique is capable of producing a very high degree of visual realism, usually higher than that of typical scanline rendering <span style="font-size:14.399999618530273px;color:rgb(37,37,37);font-family:sans-serif;line-height:17.920000076293945px;"> methods, but at a greater computational cost <span style="font-size:14.399999618530273px;color:rgb(37,37,37);font-family:sans-serif;line-height:17.920000076293945px;">. This makes ray tracing best suited for applications where the image can be rendered slowly ahead of time, such as in still images and film and television visual effects <span style="font-size:14.399999618530273px;color:rgb(37,37,37);font-family:sans-serif;line-height:17.920000076293945px;">, and more poorly suited for real-time applications like video games <span style="font-size:14.399999618530273px;color:rgb(37,37,37);font-family:sans-serif;line-height:17.920000076293945px;"> where speed is critical. "

Implementing a lightmap in Unity

Basic lightmapping in Unity

Highly recommended link to UDN lighting

Tutorial: Lightmapping a graffiti wall

Step 1: Model your space



Step 2:  Create UV's



Step 3:  File -> Create new UV Set (Lightmap UV)



Step 4: Name Lightmap UV Set



Step 5: Note: Lightmap UV's are NOT to exceed the 0 -> 1 mark in UV space



Step 6: Lightmapped objects are '''static. This is due to lightmaps being pre-compiled''' textures.



Step 7: Non-lightmapped scene



Step 8: Window -> Lightmapping -> Bake scene or Bake selected



Step 9: Lightmapping allows you to bake lighting. This includes Ambient Occlusion



--WB