Self-Study 05: Lighting in Unity


Baked Lighting

To get a basic grasp of baked lighting in Unity I follow Bracky's tutorial on lighting in Unity. This involved making a material and enabling Emission, and setting the Global Illumination to baked. I applied this material to two "doors" (flat rectangles) and gave them different colours.

By baking the lighting, calculations wont have to be done at runtime, thus improving performance.

Source: Brackeys 

Shaders

A simple but cool looking dissolve shader, once again followed by Brackeys!

Source: Brackeys  

Scene Lighting

To enhance the lighting of my scene I added a baked light into the building I made. I chose blue as its colour to make it look like artificial lighting.

I achieved this by adding an emission texture to a cube and marking what would be the affected game objects static to signify that they don't move, allowing baked lighting to work on them.

I also darkened the sun lighting a tad.

Before:


After:

(The light patch in the middle is due to a modelling issue with the building...whoops!)

Player Shader

To help the player stand out from the evil clones, I wanted to add a player outline. I wasn't sure where to start with this so I did what programmers do best and did some googling. I found a handy tutorial by AAVirusAA that achieved what I was looking for.

Shader Graph:

Result:

Much better! Now it's easier to spot the player in a crowd.

Get UTAS KIT207 Portfolio

Leave a comment

Log in with itch.io to leave a comment.