As you might have guessed this controls the specular contribution of the sunlight. For any realistic lighting scenario this value should always be kept at 1.
You’re probably wondering why we skipped all the way to sky light. The reason is a lot of the settings in the environment editor affect each other. It’s good practice to get the sun/sky settings nailed down before you go into setting up your fog.
Sun Intensity Multiplier
Change the time to 12:00 and set the intensity to 50. At 05:45 and 18:15 drop this value to 1. Create two more keys at 00:00 and 23:59 and set the value to 0. The transition from 0 to 1 gives us the effect of the sky brightening in the area where the sun is just about to set.
Parameters in this section are solely used to compute the sun light scattering through the atmosphere effectively controlling the appearance of the sun disk as well as the hue of your sky. They do not directly affect the rendering of objects in the world (for example, lighting colors and intensities). They do however affect the overall illuminance of your scene through the use of Environment Probes as mentioned earlier.
To get an accurate reading of the illuminance in your level you need to measure it on a surface that’s perpendicular to the sun. We already have a couple of planes set up for this purpose so all you need to do is set r_HDRdebug 1 in the console and simply look at the surface. Keep in mind that turning this on brightens the whole scene so don’t forget to turn it off once you’re done measuring your illuminance.
Pic 7: Planes facing the sun used for measuring full sunlight/shadow illuminance.
By looking directly at the surface we’re getting a reading of approximately 80000 lux. At this point the only source for our illuminance is the sun light so to refine this further we will have to enable the sky light to contribute to it as well.
In order to do that we will need to set up an Environment Probe. This handles indirect lighting effectively acting as ambient lighting that you would normally get from the sky. We won’t get into specifics about Environment Probes ( for that check the dedicated page Environment Probes ) but for now go to your objects tab and under Misc there’s the Environment probe entity. Drag that into your scene, change its size to encompass your whole terrain, make it active and generate cubemap. Keep in mind that any changes that you do to your time of day will require regenerating the cubemap ( It’s recommended to do that with the entity turned off so it doesn’t pick up any lighting information from a previously generated cubemap ).
By doing this we are now getting blue tinted shadows as opposed to pure black and our lux value also jumped up to about 100000 which suits our given scenario.
This controls how much the sun light is scattered by the atmosphere. Set this to 1 for the whole timeline.
The parameters that control the hue of the atmosphere are the Wavelength (R/G/B) values. We only need to set these once for the whole cycle.
Taken from the Wikipedia page on Diffuse Sky Radiation ( also known as Skylight ) we set these values at 650 (R), 550 (G), 450 (B).