Physical Sun (mia)

 
 
 

| Render Tree Usage

Category: Light

Shader Family: Light

Output: Color

Related mental ray shader: mia_physicalsun

This shader is intended to be used together with the Physical Sky (mia) shader to enable physically plausible daylight simulations and accurate renderings of daylight scenarios. To have the Physical Sun shader set up automatically with the Physical Sky shader, see Creating the Physical Sky Shader Setup.

The Physical Sun shader determines the color and intensity of the sunlight, as well as emitting photons from the sun. The shader should be applied as a light shader and photon emission shader on a directional light source (it does not work on any other light type).

Some parameters exist in both the Physical Sun and Physical Sky shaders and all 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, as described in Creating the Physical Sky Shader Setup, 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.

On

Activates this shader.

Multiplier

A scalar multiplier for the light output. The default value is 1. You might want to turn down the multiplier to something like 0.01 as the default value is somewhat strong.

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.

Haze

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).

Saturation

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

Note: If you are using an HDR background, you can set the Saturation to zero because you probably don't need the "sun color".

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.

Shadow Softness

The softness level for soft shadows. A value of 1 matches the softness of real solar shadows most accurately. Lower values makes the shadows sharper, while higher values make them softer.

Samples

The number of shadow samples for the soft shadows. If set to 0, no soft shadows are generated.

Photon BBox Min, Photon BBox Max

Two XYZ positions that define the diagonally opposite corners of the bounding box used for photons.

Render Tree Usage

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

This shader is applied to a directional light that represents the sun, and the Physical Sky shader is used as the scene's pass environment 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). As well, the Photographic Exposure (mia) shader should be connected as the scene's pass lens shader.

This shader can be connected in the render tree as well as the light shader stack. Select the light and connect this shader to the light node's Light Shader input.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License