Related mental ray shader: mia_exposure_simple
When rendering physical light levels, problems can occur with managing the HDRI output of the real physics vs. the limited dynamic range of computer monitor displays. One method to deal with this to create visually pleasing results is known as tone mapping.
The Simple Tone Mapping (mia_Simple_Tone_Mapping) shader is a simple tone mapper. It simply adds a knee compression to "squash" overbrights into a manageable range. This shader takes the high dynamic range color and performs these operations in this order:
The color components are then multiplied by the Gain parameter value.
The resulting colors are checked if they are above the Knee parameter value.
If they are above this value, they are "squashed" by the Compression ratio value.
Pedestal |
Allows you to tweak the equivalent of the "black level". A positive value adds some light so even the darkest black becomes slightly gray. A negative value subtracts some light and lets you create more contrasting effects. |
Gain |
Controls the overall brightness. This is the main point where the high dynamic range values are converted to low dynamic range values. For example: if you know that the approximate range of color intensities goes between 0 and 10, the Gain value should be approximately 0.1 to get the larger color intensity range in the desired range of 0 to 1. However, since the point of tone mapping is not to blindly scale the range down, simply setting it to 0.1 will most likely yield a dark and boring image. A more likely value is 0.15 or even 0.2, but a value of 0.2 maps the 0-to-10 range down to 0 to 2. To deal with what's above 1, you need to use Compression. |
Knee |
The point where the overbrights begin to get "squashed". Since this is applied after Gain, it should be in the range of 0 to 1. A useful range is 0.5 to 0.75. |
Compression |
Compresses the overbrights. If you set this to 0.75, any color (after having Pedestal added and multiplied by Gain) that comes out above 0.75 is compressed. A value of 5.0 is fairly strong compression; 0 is no compression. |
Gamma |
Corrects the resulting compressed color for the output device (such as the computer screen). |
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].
You can also use this shader in conjunction with the shader Architectural.