#9: Lighting & Post Processing

 

Lighting 

 

Lighting is a fundemental part of video games, as it is the element of the build that allows player/users to see their surrounding envrironment. Without it players would not only be in total darkness (which wouldnt be very fun) but it create a world of less detail. Each program uses slightly different lighting methods, but they often share traits that move acoross platforms. I will be looking at Unity's Personal version lighting as that is what I have been using for the project. All details regarding Unity's lighting can be found here (15W).  

 

 

Directional Lighting 

 

Unity Directional Light - Mootzart
Directional Lighting - Ambitown - Mootzart
Unity Point Light Example - Mootzart
Unity Spot Light - Mootzart
Unity Area & Emissive light example - mootzart
Unity Post Processing Example - Mootzart
Unity Scene Example 1 Without Post Processing - Mootzart
Unity Scene Example 2 with Post Processing - Mootzart

Directional Lighting is usually used to emulate the sun/moon. It can be applied as a distant light source and is one of the only light sources in the personal version that casts realtime shadows with light baking. The above images shows one of the prototype levels with the directional light coming through the skylight casting realtime shadows from the instruments and other geometry within the scene. 

Point Lighting

Spot Lighting

Area & emissive LightiNG

Baking/Lightmaps

 

The term bakeing comes up quite often within game development. The term itself basically means renders or processes. The act of baking is used when there are static objects within the scene (that will not move) that you wish to have pre defined lighting effects applied. This is usually used to save on porcessing power when realtime lighting is not a option due to computer graphics specifications. Baking creates what is known as a lightmap. A lightmap is basically a pre rendered texture map that tells the engine where lighting effects are in the scene... such as shadows or direct light. 

 

The baking process can take a long time depending on your computers specifications, but can be well worth the wait. The lightmap tends to work with the geometry's UV maps to calculate the angles and reference points for the asset. So it is important to make sure this part is done to a good standard early on within the 3D modeling software. All of Unitys information on baking can be found here (16W). 

Post Processing 

 

 

Post processing is any additional effects that are applied to a scene to give it a more polished or finalised look. Within game engines it is usally low cost 2D effects that can be applied to the player controller camera to make the scene have a little bit more artistic flare or realism. These can be things such as motion blur as the player walks, bloom effects, depth of feild and so on. These can really make the game look alot better and cost little in proessing. If you wish to read Unity's information on PP then follow this link here (17W). 

 

I learned all I needed to know about PP within a few moments on this video by Brackey's. His video on lighting and post processing makes it easy to get a visual representation of the possible effects that Unity can do. 

 

Brackey's video: (9DL) LIGHTING in Unity. 

 

 

Below shows a example of what I did early on with PP to make my scenes look a little better using depth of field and some bloom effects.

Point lights are probably the most common type of lighting that would be used throughout most games. It uses a point in the scene and casts light in all directions from that point, making it very good to emulate lamps and other similar light sources. (The term point was confusing for me personally at first as I often mixed it up with spot lighting). 

 

The point light can be modified with script to create things such as sparks, animations and potentially fire simulations. 

Spot lights are as they sound. They cast light from a specific point but are confined to specific angles that the user can determine. The personal verison of Unity dosnt allow spot lights to cast realtime shadows so they have to be used with that in mind. So the above image shows a spot light lamp lighting the guitar with the shadows being cast from the outside directional light for visual effect. 

 

With the upgraded version of Unity or in other engines, this type of light would be great to script and animate with movement to create search lights or stage lighting for musical performances. (This will be looked into for a later version to include automated coloured light shows). 

The above image shows a example of both emmsion and area lighting. Emissive lighting can be appled as a material/texture to an asset within the scene to give it emissive properties. This is great for simulating light bulbs, strip lights like the 'neon' strips I have within this scene. Emissive lights do not cast shadows in the personal version so I combined them with area lighting (that does cast shadows) to create better effects. The hidden red light is just a emissive strip that casts light against the wall. The lower yellow light is a combination of both. 

 

Area lights can be blended to create great colour transitions with effective styles. They cast shadows and really bring scenes to life.

The next two images show the effects I used before and after...

Mootzart.