Having learned how to set up a basic time of day parameter, the next step will be to adjust the level's lighting direction and dynamic characteristics using the Terrain Lighting dialog. This tool allows you to set the direction from which the sun rises as well as the distance your location is from the North Pole to the South Pole.
For this tutorial, you should have the forest level forest.cry
opened. This level was installed as a sample level upon the installation of the CryENGINE SDK.
We will now explore the terrain lighting dialog:
This will change the tilt of the sun; when set at the centre, setting the current time to 1200 will cause the sun to be directly above you. Adding a tilt in either direction will infer that your level's location in reality is closer to either pole of the planet.
The terrain lighting works in unison with the time of day settings to give the level its outdoor lighting characteristics.
It is good to have some rotation on the sun so that the shadows are not aligned with the world direction and thus, the objects that may be aligned. This is all to make man made buildings and other level objects look better as they are often world aligned and built straight up.
You may want to know more about the transitioning in shading from the sun to the moon or how to adjust the terrain ambient occlusion.
Adjust the quality of the terrain occlusion by adjusting the slider at the bottom of the Terrain Occlusion dialog box. Increasing the Sky terrain occlusion quality (low..high) will adjust the amount of light occlusion and render a real-time preview. Terrain occlusion is often used to create the effect of indirect lighting.
A fundamental principal of the time of day is that there can be either sun or moon lighting, but not both. You need to adjust the Moon/Sun Shadow Transition (advanced) parameters to adjust the time when the sun should be active and when the moon lighting should become active and vice versa.
Ambient occlusion is a well-known technique in the movie industry to approximate the effect of indirect lighting. Usually, it needs to be computed during the game production time and it only supports static scenes.
CryENGINE 3 uses a technique that is very suitable for real-time and can support dynamic scenes. Because it does not have to be pre-computed, there is no production time lost in creating this effect.
With SSAO (screen-space-ambient occlusion), you can expose the geometric detail of scenes and ensure that its complexity is retained. This is a screenspace effect, so performance is not affected by scene complexity.
You can adjust the SSAO amount multiplier in the Time Of Day dialog.
3.145.179.59