Lighting can either make a bad level look good, or a good level look bad. This is a very important step for the aesthetic of your map.
First, we'll create a material for the Skybox. Anywhere in the Project panel, right click and go to Create > Material.
Rename your material to something appropriate. I'll name mine Skybox. In the Inspector you'll see a dropdown labeled as "Shader". Click on it and go to Unknown Studios > Skybox. This is a skybox shader I found somewhere on the internet long ago and that I've kept using and tweaking ever since. It's my ol' reliable skybox shader. Drag your material and drop it in the scene vierport, right in the sky. You will note that the color of the sky changes.
Let's look at some of its settings in the Inspector:
Procedural skyboxes, such as this one, normally blend two colors to give the appearance of atmosphere. Change these colors into whatever you want. The skybox values will be used to calculate the lightmapping.
Games will, most of the time, use a mixture of real time lights and baked lights. Real time lights are computed every frame (that is 60 times a second) so they can be expensive when piled up. Baked lights are used to pre-calculate how the lighting will be throughout a level and will be, to some extent, "painted" on top of every surface. In truth, there are more things going on, but at a basic level that is lightmapping.
Calculating a light map, or "baking" it, can be a very expensive process that can take even some hours. The good thing about it is that once it's done, and if it's done right, your level will look much better at no expense to the performance. However, it's not very likely that you'll end up making lightmaps on that order of complexity (unless you really want to get into that!). The lightmaps we will be making for our levels won't take nearly as long to bake.
Let's look at the Lighting settings in Unity.
First we have the Environment category. Here we can set a Skybox for our scene. You should also put your main light in Sun Source. Under Environment Lighting, Source should be set to Skybox. This setting will make the color of the ambient light match your skybox's. Intensity Multiplier can help make your scene lighter or darker. If you want a night time level, you can lower the Intensity Multiplier. You might need to bake a lightmap first in order to see the effects of this, but first let's keep reviewing the Lighting settings. Environment Reflections are probably not going to be of interest to us, since Orchid Rain makes very little use, if any at all, of reflections.
The next category of relevance to us is Lightmapping Settings. Unity has used different Lightmapping engines in the past, with Progressive CPU being the favored now. You can leave this setting untouched. Almost every other setting here is directly tied to the quality of the lightmap and to the time it will take to bake. To the left you can see the default settings. To the right are my "prototyping" settings for a quick lightmap. You can tweak all of these values on your own if you want to, but let me warn you that lightmapping is almost a science of its own. It's really quite a big area to wrap your head around.
Even the most bare bones of lightmap will be an enormous improvement over a level without any baked lighting, so we can press the Generate Lighting button now and see what we get.
The baking process should be fairly quick for a simple level as the one we are working with. It might take less than a minute. This is my result "out of the box" with my minimal settings.
The colors are too overblown to my taste and there's a yellowish tint that I don't particularly dig right now. The source of this yellow is the main Directional Light in the scene. After changing itscolor to white this is what we get.
I'll also lower the Instensity of the Directional Light from 1 to 0.75 and re bake the lightmap. This is the result.
There's one more Lighting setting left to explore. Fog is a simple effect that can be added to levels, specially if they're bigger in size or have places where the player can look at things that are very far away. Tweaking these settings you can achieve a really nice look for areas like these. Setting the fog color to the Skybox horizon can give a really nice effect for distant objects.
You can see that the little indoor area we made previously is less lit than the outside. It's not completely dark because light has lots of opportunities to bounce, and some of it reaches this room. A closed room would be significantly darker. Interiors need also lights of their own.
Let's add one Point Light to the dark room. This type of light will illuminate everything insie a radius. This is usually the type of light you might want for a room like this.
Place it close to the ceiling. Be aware that putting a light exactly in the same point as some other object might make that object not be lit.
Let's see the default Point Light settings:
For baked lights, shadows are pretty important. With shadows disabled, a light source in a room will illuminate other rooms. This is not desirable, so enabled shadows for all baked lights. We'll set this Point light to baked and enable soft shadows. I'll also give it a red color and play around with its Intensity and Range. After baking again, this is what my scene looks like.
A lightmap will increase the size of your map. Specially if using high quality settings, like a bigger size and disabling compression. Bigger maps will also end up needing bigger lightmap sizes. Let's save and build our level to see how it looks in game now.
Unity will, by default, use the skybox color to tint all non-static objects in a scene. This works for most cases, as it helps give more color cohesion to a scene. But there are times when that just doesn't cut it. For example, let's say we have a night-time map, with a dark skybox. As long as we're on dim-lit areas, the dark skybox tint will look good.
In the following example, I created a map with a darker skybox and with dimmer light. You can see that the white cube I added has a blueish tint, as you would expect from the dark blue skybox.
In an interior area,, this cube should be tinted with the color of the room's light it is in. But that's not what we see.
Light Probes are a Unity component that fills the scene with many points, or probes, that will retain the light-color information of their surroundings, and then apply that light-color to any non-static object in the vicinity. Create a Light Probe Group by navigating to GameObject > Light > Light Probe Group.
This creates a new GameObject with a Light Probe Group component attached. When you select the Light Probe Group you will see some yellow points floating in the your map connected with purple lines. These yellow points are the Light Probes. Normally, you will have to manually edit your Light Probes. I've included a tool that will help you generate probes procedurally, but I'll teach you how to manually edit them anyway.
First, you'll need to toggle the Edit Light Probes button. When you press it, the four buttons an the bottom will become enabled, and you will also be able to move your light probes in the Scene viewport.
With this option enabled, go to the Scene viewport and try to select the top 4 probes at the top by clicking and dragging, as if you were trying to select multiple files in the Windows Explorer.
The selected probes will turn blue. You can move them with the Move tool (W). The usual workflow is to select a group of probes, duplicate them by pressing Ctrl + D, and move the duplicated probes with the move tool. When you duplicate a group of probes, there won't be any feedback telling you that you actually duplicated them. Immediately after pressing Ctrl + D, move your selection. If you don't do that, you will have overlapping light probes, and that might cause your lighting to not behave as your would expect.
Just with this approach, you can starting filling your level with Light Probes. But there's a faster way to generate probes. I've included a little tool in the Map Editor project that will help you with this. Go to Window > Generate Light Probes.
This will open a window with two fields. Drag and drop your Light Probe Group GameObject in the Probe GameObject field. Then press "Generate probes".
Note: this tool needs your scene to have a NavMesh, as it will use it to compute the position of the generated Light Probes.
The result of this operation will depend on your map. You should see many probes placed around the scene.
Most of the time, the generated light probes will be enough, but you can change some settings to get different results. In case your objects are not lighting correctly, add an extra layer of probes by setting "Number of extra Light Probes" to 1. This will duplicate the generated Light Probes and place them above by the value set on "Light probe layer height". "Additional probe height" will move the first layer of Light Probes upwards. 0.1 will be fine 99.9% of the time.
You will also need to change a couple more settings in your scene to make the most out of the Light Probes.
For every Light in your map, you'll need to set its Mode to Mixed.
And in the Lighting window, under Environment Lighting, change Ambient Mode to Baked. These settings will make all lighting information to be stored in the Light Probes. Without doing this, the Light Probes won't contain all lighting information and some objects won't be lit accordingly.
After tweaking your Light Probes and lighting settings, you can bake the lightmap of your level. This process is necessary for the Light Probes to work.
This is how the cubes I created at the beginning of this sub-chapter look now. They have more accurate lighting now.