07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

High dynamic range rendering 60<br />

Tone mapping<br />

Tone mapping, in the context of <strong>graphics</strong> rendering, is a technique used to map colors from high dynamic range (in<br />

which lighting calculations are performed) to a lower dynamic range that matches the capabilities of the desired<br />

display device. Typically, the mapping is non-linear – it preserves enough range for dark colors and gradually limits<br />

the dynamic range for bright colors. This technique often produces visually appealing images with good overall<br />

detail and contrast. Various tone mapping operators exist, ranging from simple real-time methods used in computer<br />

games to more sophisticated techniques that attempt to imitate the perceptual response of the human visual system.<br />

Applications in computer entertainment<br />

Currently HDRR has been prevalent in games, primarily for PCs, Microsoft's Xbox 360, and Sony's PlayStation 3. It<br />

has also been simulated on the PlayStation 2, GameCube, Xbox and Amiga systems. Sproing Interactive Media has<br />

announced that their new Athena game engine for the Wii will support HDRR, adding Wii to the list of systems that<br />

support it.<br />

In desktop publishing and gaming, color values are often processed several times over. As this includes<br />

multiplication and division (which can accumulate rounding errors), it is useful to have the extended accuracy and<br />

range of 16 bit integer or 16 bit floating point formats. This is useful irrespective of the aforementioned limitations in<br />

some hardware.<br />

Development of HDRR through DirectX<br />

Complex shader effects began their days with the release of Shader Model 1.0 with DirectX 8. Shader Model 1.0<br />

illuminated <strong>3D</strong> worlds with what is called standard lighting. Standard lighting, however, had two problems:<br />

1. Lighting precision was confined to 8 bit integers, which limited the contrast ratio to 256:1. Using the HVS color<br />

model, the value (V), or brightness of a color has a range of 0 – 255. This means the brightest white (a value of<br />

255) is only 256 levels brighter than the darkest shade above pure black (i.e.: value of 0).<br />

2. Lighting calculations were integer based, which didn't offer as much accuracy because the real world is not<br />

confined to whole numbers.<br />

Before HDRR was fully developed and implemented, games may have attempted to enhance the contrast of a scene<br />

by exaggerating the final render's contrast (as seen in Need For Speed: Underground 2's "Enhanced contrast" setting)<br />

or using some other color correction method (such as in certain scenes in Metal Gear Solid 3: Snake Eater).<br />

On December 24, 2002, Microsoft released a new version of DirectX. DirectX 9.0 introduced Shader Model 2.0,<br />

which offered one of the necessary components to enable rendering of high dynamic range images: lighting precision<br />

was not limited to just 8-bits. Although 8-bits was the minimum in applications, programmers could choose up to a<br />

maximum of 24 bits for lighting precision. However, all calculations were still integer-based. One of the first<br />

<strong>graphics</strong> cards to support DirectX 9.0 natively was ATI's Radeon 9700, though the effect wasn't programmed into<br />

games for years afterwards. On August 23, 2003, Microsoft updated DirectX to DirectX 9.0b, which enabled the<br />

Pixel Shader 2.x (Extended) profile for ATI's Radeon X series and NVIDIA's GeForce FX series of <strong>graphics</strong><br />

processing units.<br />

On August 9, 2004, Microsoft updated DirectX once more to DirectX 9.0c. This also exposed the Shader Model 3.0<br />

profile for high level shader language (HLSL). Shader Model 3.0's lighting precision has a minimum of 32 bits as<br />

opposed to 2.0's 8-bit minimum. Also all lighting-precision calculations are now floating-point based. NVIDIA states<br />

that contrast ratios using Shader Model 3.0 can be as high as 65535:1 using 32-bit lighting precision. At first, HDRR<br />

was only possible on video cards capable of Shader-Model-3.0 effects, but software developers soon added<br />

compatibility for Shader Model 2.0. As a side note, when referred to as Shader Model 3.0 HDR, HDRR is really<br />

done by FP16 blending. FP16 blending is not part of Shader Model 3.0, but is supported mostly by cards also<br />

capable of Shader Model 3.0 (exceptions include the GeForce 6200 series). FP16 blending can be used as a faster

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

Saved successfully!

Ooh no, something went wrong!