From BlenderWiki

Jump to: navigation, search

If you want to document Blender 2.5 features please edit pages under Doc:2.5/Manual.

If a "2.5" page doesn't exist please copy the text from 2.4x Manual and edit the new page (i.e. you should paste the wikitext from this 2.4x page to this new 2.5x page and then update the latter with 2.5 features)

[edit] Sun: Sky & Atmosphere

Mode: All Modes (Sun lamp)

Panel: Shading context → Lamp sub-context → Sky/Atmosphere

Hotkey: F5


[edit] Description

The Sky/Atmosphere panel of the Sun light source.

This panel allows you to enable a new effect that simulates various properties of real sky and atmosphere: the scattering of the sun light as it crosses the kilometres of air overhead. For example, when the Sun is high, the sky is blue (and the horizon, somewhat whitish). When the Sun is near the horizon, the sky is dark blue/purple, and the horizon turns orange. The dispersion of the atmosphere is also more visible, when it is a bit foggy: the more away is an object, the more “faded” in light grey it is… Go out in the countryside, a nice hot day, you will see…

To enable this effect, you have to use a Sun light source. If, as usual, the position of the lamp has no importance, its rotation is crucial: it determines which hour it is! As a start point, you should reset rotation of your Sun (with AltR, or typing 0 in each of the three fields RotX/RotY/RotZ in the Transform Properties panel – N). This way, you’ll have a nice mid-day sun (in the tropics!).

Now, there are two important angles for the Sky/Atmosphere effect: the “incidence” angle (between light direction and X-Y plane), which determine the “hour” of the day (as you might expect, default rotation – straight down – is “mid-day”, a light pointing straight up is “mid-night”, and so on…). And the rotation around the Z axis determines the position of the sun around the camera.

The dashed “light line” of the Sun lamp crossing the camera focal point.

In fact, to have a good idea of where the sun is in your world, relative to the camera, you should always try to have in your 3D view the dashed “light line” of the lamp crossing the centre of the camera (its “focal” point), as shown in (The dashed “light line” of the Sun lamp crossing the camera focal point). This way, in camera point of view (0 NumPad, centre window in the example picture), you will see where will be the “virtual” sun created by this effect.

It is important to understand that the position of the sun has no importance for the effect: only its orientation is relevant. The position might just help you in your scene design.

[edit] Options

Turbidity
This is a general parameter that affects sun view, sky and atmosphere, it’s an atmosphere parameters that low values describe clear sky, and high values shows more foggy sky. In general, low values give clear, deep blue sky, with “little” sun; high values give more reddish sky, with a big halo around the sun. Note that this parameter is one which can really modify the “intensity” of the sun lighting. See examples below.


[edit] Sky

Sky
This button enables the sky settings: it will create a “sky”, with a “sun” if visible, and mix it with the background as defined in World settings.

Here are its specific controls:

Mix menu
The first drop-down list shows you a menu of various mix methods. The one selected will be used to blend the sky and sun with the background defined in the World settings. The mixing methods are the same as described e.g. in the Mix compositing node page. And the numeric field at the right of the list allows you to control how much the sky and sun effect is applied to the World background.
Colour Space menu
This drop-down list allows you to select which colour space the effect uses, with following choices:
  • CIE
  • REC709
  • SMPTE
Note: I do not understand very well this control… But it surely affects the colours of the effect!
Exp
This numeric field allows you to modify the exposition of the rendered Sky and Sun (0.0 for no correction).
Hor.Bright
For “Horizontal Brightness”, controls brightness of horizon colours. Its value should be in range 0.0 to 10.0, values near zero means no horizontal brightness, and large values for this parameter increase horizon brightness. See examples below.
Hor.Spread
For “Horizontal Spread”, controls spread of light at horizon. Its value should be in range 0.0 to 10.0, low values in the range result in less spread of light at horizon, and high values in the range result all horizon light spread in sky.
Sun Bright
For “Sun Brightness”, controls sun brightness! Its value should be in range 0.0 to 10.0, with low values the sky has no sun and with high values sky only have sun.
Sun Size
Controls size of sun. Its values should be in range 0.0 to 10.0, but note that low values result in large sun size, and high values result in small sun size. Note that the overall brightness of the sun remains constant (set by Sun Bright), so the larger the sun (the smaller Sun Size!), the more it “vanishes” in the sky, and vice-versa.
Back Light
For “Back Scatter Light”, result on sun’s colour, high values result on more light around the sun. Its values range is -1.0 to 1.0. Negative values result on no more light around sun.


[edit] Atmosphere

Atmosphere
This button enables the atmosphere settings. It will not modify the background, but it tries to simulate the effects of an atmosphere: scattering of the sun light in the atmosphere, its attenuation, …
Sun Intensity
Sets sun intensity. Its values are in range 0.0 to 10.0. High values result more blue light in far objects.
Inscattering
This factor can be used to decrease the effect of light inscattered into atmosphere between camera and objects in scene. This value should be 1.0 but its change may results in some nice, not realistic, images.
Extinction
This factor can be use to decrease the effect of extinction light from objects in the scene, like Inscattering factor, this parameter should be 1.0 but you can change it, low values result in less light extinction. Its value is in range 0.0 to 1.0.
Distance
This factor is used to convert Blender unit into an understandable unit for atmosphere effect, it starts from 0 and high values result in more yellow light into the scene.


[edit] Examples

First, let’s see what happens when we modify the orientation of the sun:

With sun right overhead (mid-day).
With sun deep “under the Earth” (mid-night).
Sun slightly above the horizon (start of twilight).
Sun slightly bellow the horizon (end of twilight).
Variations in Sun orientation, Sun Size to 5.0, all other settings to default.
The .blend file of these examples.

And now, the effects of various settings (examples created with this .blend file):

Turbidity: 2.0.
Turbidity: 2.3.
Turbidity: 5.0.
Turbidity: 10.0.
Variations in Turbidity parameter, all other settings to default.


[edit] Sky

Hor.Bright: 0.0.
Hor.Bright: 0.85.
Hor.Bright: 1.04.
Hor.Bright: 1.13.
Variations in Hor.Bright parameter, all other settings to default.


Hor.Spread: 0.7.
Hor.Spread: 1.2.
Hor.Spread: 2.2.
Hor.Spread: 5.0.
Variations in Hor.Spread parameter, all other settings to default.


Sun Bright: 0.2.
Sun Bright: 0.5.
Sun Bright: 0.75.
Sun Bright: 1.0.
Variations in Sun Bright parameter, all other settings to default.


Sun Size: 2.0.
Sun Size: 4.0.
Sun Size: 7.0.
Sun Size: 10.0.
Variations in Sun Size parameter, all other settings to default.


Back Light: -1.0.
Back Light: -0.33.
Back Light: 0.33.
Back Light: 1.0.
Variations in Back Light parameter, Sun Bright to 2.5, all other settings to default.


[edit] Atmosphere

For all renders bellow, Hor.Bright is set to 0.2, and Sun Bright to 2.0.

Sun Intensity: 1.0.
Sun Intensity: 3.33.
Sun Intensity: 6.66.
Sun Intensity: 10.0.
Variations in Sun Intensity parameter, all other settings to default.


Inscattering: 0.1.
Inscattering: 0.33.
Inscattering: 0.66.
Inscattering: 1.0.
Variations in Inscattering parameter, all other settings to default.


Extinction: 0.0.
Extinction: 0.33.
Extinction: 0.66.
Extinction: 1.0.
Variations in Extinction parameter, all other settings to default.


Distance: 1.0.
Distance: 2.0.
Distance: 3.0.
Distance: 4.0.
Variations in Distance parameter, all other settings to default.


[edit] Hints and limitations

To always have the Sun pointing at the camera centre, you can use a TrackTo constraint on the sun object, with the camera as target, and -Z as the “To” axis (use either X or Y as “Up” axis). This way, to modify high/position of the sun in the rendered picture, you just have to move it, orientation is automatically handled by the constraint!

If you use the default Add mixing type, you should use a very dark-blue world colour, to get correct “nights”…

This effect works quite well with a Hemi lamp, or some ambient occlusion, to fill-in the Sun shadows.

Atmosphere shading currently works incorrectly in reflections and refractions and is only supported for solid shaded surfaces. This will be addressed in a later release.

[edit] See Also