We did it, we changed to Unity 5 with the game Erwin’s timewarp. The first thing we did is to use two new incredible features of Unity 5: The new standard shader and global illumination to enhance the lighting of our scenes.
Erwin’s timewarp with Unity 5
First of of all here are few screenshots of the intro scene, the destroyed city level and the middle ages using realtime GI (global illumination):
How to use Unity’s GI
Well, basically there are just some simple steps to use Unity’s global illumination and the standard shader.
1. Use the default skybox in your scene
When you create a new scene this is already done for you. In Unity 5 there is a new default skybox added automatically. This skybox is used as the ambient source for the environmental lighting.
2. Use a directional light
This tasks is also done for you when creating a new scene. A directional light is added and aligned with the skybox:
3. Set the Light setings for your scene
These are the default settings Unity applies for a new scene:
Here you can see that the skybox is used as ambient source for the environment lighting, you can also change this and use a color or a gradient as ambient source, just play around with these settings and see what fits best for you.
The default settings for ambient GI is Realtime. This is the most dynamic way to use lighting for the environment but it is also costly as far as performance is concerned. If you are creating a project that should run on mobile platforms for example, you can make use of baking the ambient GI. Set the value to Baked and press the Build button in the lower right corner of the Lighting window. Then the light’s effects are baked to a lightmap image that is used in your game instead of realtime calculation.
Another option is to use Continuous Baking. When using this setting then the lightmaps are baked every time you change something in your scene-editor that influences the lights (also indirect influences like changing the position of a door that let’s a directional light shine into the room).
Lights for a simple model
Now let’s add a terrain and a model to the scene and see how it looks like. To enhance the light effects we add a red point light to the scene:
As you can see it’s really impressing and easy to use, the red point light is also casting shadows to the model cause we used Hard shadows for it.
One important point to mention is that you have to set your object to be static if you want it to contribute to your scene’s global illumination. Select the gameobject and in the Inspector window check the Static-checkbox for the object.
Unity 5 is shipped with a new shader that we use in our scenes for most of our models. Here are 2 models for which we just let the standard shader do it’s work:
We use this settings for the tire for example:
These were just a few simple steps for getting used to the feature and Unity 5, there is a lot of new stuff to explore.