11.07.2015 Views

mental ray Architectural and Design Visualization Shader Library

mental ray Architectural and Design Visualization Shader Library

mental ray Architectural and Design Visualization Shader Library

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

92 4 Camera- <strong>and</strong> Exposure Effects1, a strong “toe” region is added to the transfer curve so that low intensities gets pushed moretowards black, but in a gentle (soft) fashion.Compressing bright color components inherently moves them towards a less saturated color.Sometimes, very strong compressions can make the image in an unappealingly de-saturatedstate. The saturation parameter allows an artistic control over the final image saturation.1.0 is the st<strong>and</strong>ard “unmodified” saturation, higher increases <strong>and</strong> lower decreases saturation.The gamma parameter applies a display gamma correction. Be careful not to apply gammatwice in the image pipeline. This is discussed in more detail on page 4.The side channel <strong>and</strong> side channel mode is intended for OEM integrations of the shader,to support “interactive” tweaking as well as for the case where one wants to insert an outputshader prior to the conversion to “display pixel values”.This is accomplished by applying two copies of the shader, one as lens shader, the other asoutput shader. The two shaders communicate via the “side channel”, which is a separatefloating point frame buffer that needs to be set up prior to rendering.Valid values for side channel mode are:• 0 - the shader is run normally as either lens- or output-shader.• 1 - the lens shader will save the un-tonemapped value in the side channel frame buffer.The output shader will re-execute the tone mapping based on the data in the sidechannel, not the pixels in the main frame buffer.• 2 - the lens shader works as for option 1, the output shader will read the pixels from theside channel frame buffer back into the main frame buffer. This is useful when onewant to run third party output shaders on it that only support working on the mainframe buffer.One may wonder, if one wants to apply the tone mapping as a post process, why not skipapplying the lens shader completely? The answer is twofold: First, by applying the lens shader(even though it’s output is never used), one can see something while rendering, which is alwayshelpful. Second, the <strong>mental</strong> <strong>ray</strong> over-sampling is guided by the pixels in the main frame buffer.If these are left in full dynamic range, <strong>mental</strong> <strong>ray</strong> may needlessly shoot thous<strong>and</strong>s of extrasamples in areas of “high contrast” that will all be tone mapped down to white in the finalstage.The use preview <strong>and</strong> preview work exactly like in the mia exposure simple shader describedabove.4.1.2.2 ExamplesLets walk through a practical example of tuning the photographic tone mapper. We have ascene showing both an indoor <strong>and</strong> outdoor area, using the sun <strong>and</strong> sky, mia material, <strong>and</strong> a

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!