Category: mental ray > Environment
Related Softimage shader: Physical Sky (mia)
This shader is designed to be used together with the mia_physicalsun shader to enable physically plausible daylight simulations and accurate renderings of daylight scenarios. You can also use it in conjunction with the mia_material 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 all do the same thing. For physical correctness, you need to keep these parameters in sync with each other in both shaders. 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.
Name |
The name of the shader node displayed in the render tree. Enter any name you like, or leave the default. |
on |
Activates this shader. |
multiplier |
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. |
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. |
redblueshift |
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). |
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 shader), the sun disk is not visible to the final gathering rays. |
|
sun_direction |
The direction of the sun disk. |
sun |
Pick a light (the sun) from the pop-up explorer. The light you choose becomes the controller for the direction of the shader. It should be the directional light that represents the sun. For exmaple, the same light that has the mia_physicalsun shader. This will make the visible sun disk automatically follow the direction of the actual sunlight. |
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. |
background |
Pick a shader (the background) from the pop-up explorer. |
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. |
y_is_up |
Defines what constitutes "up". In Softimage, the Y axis is "up" and this parameter should be on. |
flags |
For future expansion, testing and internal algorithm control. Should be set to zero. |
sky_luminance_mode |
If sky_luminance_mode is zero, the luminance of the sky is calculated automatically based on the haze level, sun position, etc. If sky_luminance_mode is non-zero, the luminance distribution across the sky dome will follow the Perez model, which is driven by five parameters named a, b, c, d and e. So to use this mode you must have a valid set of Perez coefficients. Note that the color distribution across the sky dome is still driven by the haze parameter. If sky_luminance_mode is 1, the luminance of the sky can either be defined by setting the zenith_luminance parameter or by setting the diffuse_horizontal_illuminance parameter, but not both. If sky_luminance_mode is 2, the zenith luminance is calculated from the CIE Clearsky model (see mia_ciesky). |
zenith_luminance |
Define the luminance of the sky using a candela per square meter measurement. |
diffuse_horizontal_illuminance |
Defines the luminance of the sky using a specific lux value. |
a, b, c, d, e |
Specify valid Perez coefficients. |
This shader is designed to be used together with the shader called mia_physicalsun. You can also use it in conjunction with the shader called mia_material.
This shader can be connected only to the material node's Environment parameter to create an environment map. This shader is used as the scene's camera environment shader, and the Physical Sun shader is applied to a directional light that represents the sun.
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).
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License