Related mental ray shader: mia_exposure_photographic
This shader is a tone mapper that converts actual pixel luminances (in candela per square meter) into image pixels as seen by a camera, applying camera-related parameters (such as f-stops and shutter times) for the exposure, as well as applying tone mapping that emulates film and camera effects.
The shader has two basic modes:
Photographic mode assumes that the input values are (or can be converted to) candela per square meter.
Arbitrary mode assumes that scene pixels are not in any particular physical unit, and are simply scaled by a factor to fit in the display range of the screen.
If the Film Speed (ISO) parameter is non-zero, the photographic mode is used, and if it is zero, the arbitrary mode is used.
In photography, the film speed (the ISO value), the aperture (f-number) and shutter time all interact to define the actual exposure of the camera. Therefore, to modify the exposure you could modify each of them to achieve the same result. For example, to make the image half as bright, you could halve the shutter time, halve the ISO of the film, or change the aperture one "stop" (for example from f/16 to f/22). In a real world camera there would be subtle differences between these different methods, but with this shader they are mathematically equivalent.
Film Speed (ISO) |
Specifies the ISO number of the film, also known as "film speed". As described above, if this is set to zero, the arbitrary mode is enabled and all color scaling is then strictly defined by the value of cd/m^2 Factor. |
Shutter Time Ratio |
The camera shutter time to be expressed in fractional seconds. For example, the value 100 means a camera shutter speed of 1/100. This value has no effect in arbitrary mode. |
f-Stop Number |
The fractional aperture number. For example, 11 means an aperture of f/11. Aperture numbers on cameras are expressed in specific standard series: f/8, f/11, f/16, f/22, etc. Each of these are referred to as a "stop" (from the fact that aperture rings on real lenses tend to have physical "clicks" for these values) and each such "stop" represents half the amount of light hitting the film at each increased "stop". It is important to note that this shader doesn't count "stops", you must give it the actually f-number for that stop. This value has no effect in arbitrary mode. |
Whitepoint |
A color that will be mapped to "white" on output. For example, an incoming color of this hue/saturation will be mapped to grayscale, but its intensity will remain unchanged. |
Vignetting |
In a real camera the angle with which the light hits the film impacts the exposure, causing the image to go darker around the edges. The vignetting parameter simulates this effect. When 0.0, vignetting is off, and higher values cause stronger and stronger darkening around the edges. Note that this effect is based on the cosine of the angle with which the light ray would hit the film plane, and it is affected by the field-of-view of the camera, and will not work at all for orthographic renderings. A good default is 3.0, which is similar to what a compact camera would generate. |
cd/m^2 Factor |
In photographic mode (a non-zero film speed) this is the factor used to convert between pixel values and candela per square meter. In arbitrary mode (a zero film speed), this factor is a multiplier applied when scaling rendered pixel values to screen pixels. This is analogous to the Gain parameter of the Simple Tone Mapping (mia) shader. |
The parameters Allowed Overexposure and Allowed Underexposure guide the actual "tone mapping" of the image. That is, they specify exactly how the high dynamic range imagery is adapted to fit into the black-to-white range of a display device.
If Allowed Overexposure is one and Allowed Underexposure is zero, the transfer is linear and the shader behaves like a simple linear intensity scaler only.
Supports the case where you want to insert an output shader prior to the conversion to "display pixel values".
This is accomplished by applying two copies of the shader, one as lens shader, the other as an output shader. The two shaders communicate via the "side channel", which is a separate floating point framebuffer that needs to be set up prior to rendering. See Render Channels & Framebuffers [Rendering].
Side Channel Mode |
|
[side channel] |
Select a custom render channel to act as the side channel. |
Add... |
If you have not created a custom render channel yet, then click the Add button and enter a name for the render channel. The render channel is automatically added to the scene's Available Channels grid using the appropriate data type for the output. See Creating a Custom Render Channel for the Scene [Rendering]. You will also have to add the render channel to the pass and set the pass options in order to render the output. See Adding a Render Channel for the Pass [Rendering]. |
Use Preview |
Makes the process of tweaking the tone mapper more interactive by allowing you to preview the results. To tweak the tone mapping using a preview image, do the following:
|
This shader can be applied directly to the camera in the lens shader stack. See Applying Lens Shaders to Cameras [Cameras and Motion Blur].
It is also used with the Physical Sky and Physical Sun shaders when you run the Initialize Sky Shader plug-in — see Creating the Physical Sky Shader Setup for more information.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License