Physical Sky (mia)

| Render Tree Usage

Category: Environment

Shader Family: Volume

Output: Color

Related mental ray shader: mia_physicalsky

This shader is designed to be used together with the Physical Sun (mia) shader to enable physically plausible daylight simulations and accurate renderings of daylight scenarios. You can also use it in conjunction with the Architectural shader.

The Physical Sky shader creates the color gradient that represents the atmospheric skydome which is then used to light the scene with the help of final gathering. When used as an environment, it also displays the sky to the camera and in reflections.

This shader also creates a virtual ground plane that exists below the model so that you don't need to model geometry all the way to the horizon line — the virtual ground plane provides both the visuals and the bounce-light from the ground.

Some parameters exist in both the Physical Sun and Physical Sky shaders and do the same thing. For physical correctness, you need to keep these parameters in sync with each other in both shaders. If you run the Initialize Sky Shader plug-in (see below), these parameters are linked together so that they remain synchronized. For example, a sun with a different haze value than the sky cannot be guaranteed to be physically plausible. The most important common parameters are those that drive the entire shading and colorization models: Haze, Red-Blue Shift, and Saturation.

Creating the Physical Sky Shader Setup

The Physical Sky shader needs several shaders to be set up in order for it to be used properly. You can use the Initialize Sky Shader plug-in to automatically set up the shaders that you need. You can use an existing light as the sun, or let the plug-in create one for you.

Using the Initialize Sky Shader Plug-in

  1. Choose Pass Edit Initialize Sky Shader from the Render toolbar.

  2. In the Initialize Sky Shader dialog box that appears, select the pass to which the Physical Sky shader will be applied.

  3. Select a light (the sun) from the list, or you can have one automatically created for you.

    The new light is created with a direction constraint to a null at the scene's global origin. This light now controls the direction of the shader.

    You can create the light without the constraint if you deselect the If creating new light, constrain direction to world center option.

  4. The following things happen when you click the Apply button:

    • The Physical Sky shader is attached as an environment shader on the pass you selected.

    • The Photographic Exposure (mia) shader is added as a lens shader on the pass if you selected the Use exposure shader on lens option. This shader gives the correct candela-per-meter scale factor so that the image doesn't look overexposed (it tones the brightness down). You can adjust the brightness of the image using the Shutter Time and the F-Stop values in the lens shader.

      If you want to have more control over the brightness values using the Physical Sky shader parameters, or use a different lens shader, deselect this option so that no lens shader is automatically added. As well, when this option is off, these Physical Sky parameter values are automatically set: Multiplier: 0.01; RGB Unit Conversion: 0.001 for all channels

    • The Physical Sun (mia) shader is attached as the light shader on the light you selected or on the light that was automatically created.

    • These Physical Sun shader parameters are linked by expressions to the corresponding Physical Sky parameters: Multiplier, RGB Unit Conversion, Haze, Red Blue Shift, Saturation, and Horizon Height. This means that when you change the values for any of these parameters in the Physical Sky shader, the matching parameter values in the Physical Sun shader change accordingly in order to keep physical correctness.

    TipYou should also set the Color Profiles in Display Preferences > Color Management to get the correct display of these shaders. Select the Render Regions an/or Render Pass and Preview options to see the image render brighter.


Activates this shader.


A scalar multiplier for the light output. The default value is 1.

RGB Unit Conversion

Converts the output to something other than true photometric units. If this value is 1 1 1, both the values returned by the mental ray shader API functions mi_sample_light (for the sunlight) and mi_compute_avg_radiance (for the skylight), when sent through the mi_luminance function, will numerically match photometric values in lux.

Since the intensity of the sun outside the atmosphere is calibrated to 127500 lux, this is very bright when seen compared to a more classic rendering, where light intensities generally range from 0 to 1. The RGB Unit Conversion parameter is applied as a multiplier and should be set to a value below 1 (such as 0.001 0.001 0.001) to convert the raw lux value to something more manageable.

For convenience, the value of 0 0 0 is internally set so that 80000 lux (approximately the amount of light on a sunny day) equals the classic light level of 1.


Sets the amount of haze in the air. The range is from 0 (a completely clear day) to 15 (extremely overcast or like a sand storm). The haze influences the intensity and color of the sky and horizon, intensity and color of sunlight, softness of the sun's shadows, softness of the glow around the sun, and the strength of the aerial perspective.

Red Blue Shift

Controls the redness of the light. The default value of 0 is the physically correct value, but you can change that with this parameter. The range is from -1 (extremely blue) to 1 (extremely red).


Controls the saturation, where 1 is the physically calculated saturation level. The range is from 0 (black and white) to 2 (extremely boosted saturation).

Horizon Height

Sets the level of the horizon. The default value of 0 puts the horizon at a standard height, but you may need to change this to accommodate different rendering locations, such as the view from the top of a mountain or skyscraper.

The horizon doesn't actually exist at any specific "height" in 3D space — it is just a shading effect for rays that go below a certain angle, which you can change with this parameter. The total range is from -10 (the horizon is straight down) to 10 (the horizon is at the zenith), but smaller values are more useful; for example, -0.2 pushes the horizon down just below the edge of a finite visible ground plane.

This parameter affects not only the visual representation of the horizon in the Physical Sky shader, but also the color of the Physical Sun itself.

Horizon Blur

Sets the blurriness of the horizon. At 0, the horizon is completely sharp. Low values (lower than 0.5) are generally used, but the full range is up to 10 for a horizon which consists only of blur and no actual horizon line.

Ground Color

The color of the virtual ground plane. This is a diffuse reflectance value (i.e., albedo). The ground will appear as if it was a Lambertian reflector with this color, lit by the sun and sky only, and does not receive any shadows.

Night Color

The maximum darkest value that the sky can be. This can be useful for adding elements like the moon, stars, and high altitude cirrus clouds that remain lit after the sun sets. As the sun sets and the sky darkens, the contribution from this parameter is unaffected and remains as the base light level.

The following Sun parameters affect the visible result (what the camera sees and what is seen in reflections and refractions), but not the final gathering result. This is because the Physical Sky shader treats rays differently. Direct rays from the camera, as well as reflection and refraction rays, see the "entire" sky effect, including the Sun parameters. However, since the lighting already has a direct light that represents the sun (using the Physical Sun (mia) shader), the sun disk is not visible to the final gathering rays.

Sun Direction

The direction of the sun disk.

Sun Disk Intensity

The intensity of the visible sun disk, which can be used to tune the look of the sun.

Sun Disk Scale

Sets the size of the visible sun disk. The value of 1 is the physically correct size, but the default value of 4 provides a more visually pleasing appearance.

Sun Glow Intensity

The intensity of the visible sun disk's glow, which can be used to tune the look of the sun.

Use Background

If this option is on but no background has been set, the background of the rendering is a transparent black (suitable for external compositing). If there is a background shader, the background of the rendering comes from that shader (for example a texture shader that looks up a background photograph of a real location). In either case, the results of the Physical Sky shader is still visible in refractions and reflections.

Visibility Distance

Emulates aerial perspective, which is a term used by painters to convey how distant objects are perceived as being hazier and tinted towards the blue end of the spectrum.

When this parameter is a non-zero value, it defines the "10% distance" — the distance at which approximately 10% of haze is visible at a haze level of 0.

To use this effect, the Physical Sky shader must be applied as either a lens or camera volume shader.

In most cases, you need to increase this value a great deal. The default value of 1 is much too low for most scenes.

Render Tree Usage

This shader is designed to be used together with the shader called Physical Sun (mia). You can also use it in conjunction with the shader called Architectural.

This shader can be connected only to the Material node's Environment port to create an environment map for an object. This shader is also used as the scene's pass environment shader, and the Physical Sun shader is applied to a directional light that represents the sun. As well, the Photographic Exposure (mia) shader can be connected as the scene's pass lens shader.

The environment shader should be used to illuminate the scene with the help of final gathering, and bounced light from the sun can be handled either by final gathering diffuse light that is bounced or via global illumination (photons).