High dynamic range rendering

From Wikipedia, the free encyclopedia

High dynamic range rendering (HDRR or HDR Rendering), also known as high dynamic range lighting, is the rendering of 3D computer graphics scenes by using lighting calculations done in a larger dynamic range. Video games and computer generated movies greatly benefit from this as it creates far more realistic scenes than with the previous lighting model (referred to as "low dynamic range lighting" or "standard lighting").

Contents

[edit] History

The use of high dynamic range imaging (HDRI) in computer graphics was introduced by Greg Ward in 1985 with his Radiance rendering and lighting simulation software which created the first file format to retain a high dynamic range image. HDRI languished for more than a decade while held back by limited computing power and storage, as well as capture methods. Not until recently has the technology to put HDRI into practical use been developed. [1]

In 1997 Paul Debevec presented Recovering high dynamic range radiance maps from photographs[2] at SIGGRAPH and the following year presented Rendering synthetic objects into real scenes[3]. These two papers laid the framework for creating HDR light probes of a location and then using this probe to light a rendered scene.

HDRI and HDRL (High Dynamic range image-based lighting) have, ever since, been used in many situations in 3d scenes when inserting a 3d object into a real environment required the lightprobe data to provide realistic lighting solutions.

In gaming applications, after 2003, Valve Software released a demo movie of their Source Engine rendering a cityscape in a high dynamic range. The term wouldn't be brought up again until E³ 2004 where it gained much more attention when Valve Software announced Half-Life 2: Lost Coast and Epic Megagames showcased Unreal Engine 3.

[edit] Features and limits

A comparison of HDR and LDR in the game Far Cry
A comparison of HDR and LDR in the game Far Cry
From Half-Life 2: Lost Coast, comparing HDR to LDR on how light is reflected.
From Half-Life 2: Lost Coast, comparing HDR to LDR on how light is reflected.
From Half-Life 2: Lost Coast, comparing HDR to LDR on how light passes through transparent materials.
From Half-Life 2: Lost Coast, comparing HDR to LDR on how light passes through transparent materials.

[edit] Preservation of detail in large contrast differences

One of the primary features of HDRR is that both dark and bright areas of a scene can be accurately represented. Without HDR (sometimes called low dynamic range, or LDR, in comparison), areas that are too dark are clipped to black and areas that are too bright are clipped to white. These represented by the hardware as a floating point value of 0.0 and 1.0 for pure black and pure white, respectively.

Graphics processor company NVIDIA summarizes one of HDRR's features in three points[4]:

  • Bright things can be really bright
  • Dark things can be really dark
  • And details can be seen in both

The images on the right are from Crytek's FarCry, demonstrating a new patch that enables Shader Model 3.0 effects. In the HDR render (the left image), the bright light from the outside casts a blue glow where it enters using light blooming, allows details underwater to be seen, overall gives the scene more vibrance, and the darker spots have the same amount of detail compared to the low dynamic range image. In the low dynamic range render (the right image), there is no light blooming where the light enters from, and the overall scene looks dull.

[edit] Accurate preservation of light

Without HDRR, the sun and most lights are clipped to 100% (1.0 in the framebuffer). When this light is reflected the result must then be less than or equal to 1, since the reflected value is calculated by multiplying the original value by the surface reflectiveness, usually in the range 0 to 1. This gives the impression that the scene is dull or bland. However, using HDRR, the light produced by the sun and other lights can be represented with appropriately high values, exceeding the 1.0 clamping limit in the frame buffer, with the sun possibly being stored as high as 60000. When the light from them is reflected it will remain relatively high (even for very poor reflectors), which will be clipped to white or properly tonemapped when rendered.

Likewise when light passes through a transparent material, the light that passes through has a lower brightness than when the light entered. In the example pictures, with low dynamic range, much less light passes through the stained glass, causing the scene to be darker. The reason for this is that when light passes through a transparent material, it can be thought of as a light source. In a simple example, say the stained glass can block 40% of the light. Since the highest value of the low dynamic range light is 1.0, this means a brightness of .6 is illuminating the other side. The high dynamic range light is perhaps 100, which means a brightness of 60 is illuminating the other side.

An example of the differences between HDR & LDR Rendering can be seen in the images to the right, on Valve's Half-Life 2: Lost Coast which uses their latest game engine "Valve Source".

[edit] Limitations

The human eye supports a very high dynamic range, around 1,000,000:1. This is achieved in part through adjustments of the iris and slow chemical changes, which take some time (ie, the delay in being able to see when switching from bright lighting to pitch darkness.) At any given time, the eye's dynamic range is smaller, around 10,000:1. However, this is still much higher than the dynamic range achievable by most current display technology.

Negative black and white film can capture a dynamic range of about 4096:1 (12 stops) maximum, while colour slide film reach can typically capture a dynamic range of 64:1 (6 stops). Printing has the same problems as displaying on LDR monitors as colour paper only has about 64:1 (6 stops).[citation needed]

On average, most computer monitors have a specified contrast ratio between 500:1 and 1000:1, some reaching 2000:1 or higher, such as LG Electronic's L194WT models or ASUS Technology's LS201 models.[citation needed] Current plasma displays are specified at a 10,000:1 contrast ratio (most are 50% lower). However, the contrast of commercial displays is measured as the ratio of a full white screen to a full black screen in a completely dark room.[citation needed] The simultaneous contrast of real content under normal viewing conditions is significantly lower.

One of the few monitors that can display in true HDR is the BrightSide Technologies HDR monitor, which has a simultaneous contrast ratio of around 200,000:1 for a brightness of 3000 cd/m2, measured on a checkerboard image.[citation needed] In fact this higher contrast is equivalent to a ANSI9 contrast of 60,000:1, or about 60 times higher that the one of a TFT screen (about 1000:1). The brightness is 10 times higher that the one of the most CRT or TFT. But such display should only be useful if it needs to operate in a pitch-black room and in two seconds under bright lighting, and the eye should be able to see a full dynamic range on the display in both situations.

This means that HDR rendering systems have to map the full dynamic range to what the eye would see in the rendered situation. This tone mapping is done relative to what the virtual scene camera sees, combined with several full screen effects, e.g. to simulate dust in the air which is lit by direct sunlight in a dark cavern.

There are currently two graphical effects used to combat these limitations, tone mapping and light blooming, which are often used together.

[edit] Tone mapping

Main article: Tone mapping

Tone mapping, in the context of graphics rendering, is a technique used to map colours from high dynamic range (in which lighting calculations are performed) to low dynamic range that matches the capabilities of a computer display device. Typically, the mapping is non-linear - it preserves enough range for dark colours and gradually limits the dynamic range for bright colours. This technique often produces visually appealing images with good overall detail and contrast. Various tone mapping operators exist, ranging from simple real-time methods used in computer games to more sophisticated techniques that attempt to imitate the perceptual response of the human visual system.

Example of tone mapping
 Looking to the outside from in, the scene looks brighter. But when the camera shifts outside, the scene normalizes. Example is from Day of Defeat: Source
Looking to the outside from in, the scene looks brighter. But when the camera shifts outside, the scene normalizes. Example is from Day of Defeat: Source

[edit] Light bloom

Main article: Bloom (shader effect)

Light blooming exaggerates a bright spot in a scene. For example, a bright light in the background will appear to bleed over onto objects in the foreground. This is used to create an illusion to make the bright spot brighter than it really is.

[edit] Applications in computer entertainment

Currently HDRR has been prevalent in games. Though these games are mostly for the PC, it is also possible to render scenes in a high dynamic range in Microsoft's Xbox 360 and Sony's PlayStation 3. It has also been simulated on the PlayStation 2, GameCube, and Xbox. In desktop publishing and gaming, colour values are often processed several times over. As this includes multiplication and division it is useful to have the extended accuracy and range of 16 bit integer or 16 bit floating point format. This is useful irrespective of the abovementioned limitations in some hardware.

The development of HDRR into real time rendering mostly came from Microsoft's DirectX API.

[edit] Development of HDRR through DirectX

Complex shader effects began its days back with the release of Shader Model 1.0 with DirectX 8. Shader Model 1.0 illuminated 3D worlds with what is now called standard lighting. However, standard lighting had two problems:

  1. Lighting precision was confined to 8 bit integers, which limited the contrast ratio to 256:1. Using the HVS color model, the value (V), or brightness of a color has a range of 0 - 255. This means the brightest white (a value of 255) is only 255 times brighter than the darkest shade above pure black (i.e.: value of 1).
  2. Lighting calculations were integer based, which didn't offer much accuracy because the real world is not confined to whole numbers. “Nature isn't clamped to [0..1], neither should CG” [4].

Before HDRR was fully developed and implemented, games would create an illusion of HDR by using light blooming and sometimes using an option called "Enhanced Contrast Settings".

On December 24, 2002, Microsoft released a new version of DirectX. DirectX 9.0 introduced Shader Model 2.0, which offered one of the necessary components to enable rendering of high dynamic range rendering: lighting precision was not limited to just 8-bits. Although 8-bits was the minimum in applications, programmers could choose up to a maximum of 24-bits for lighting precision. However, all calculations were still integer based. One of the first graphics cards to take advantage of DirectX 9.0 was ATI's Radeon 9700, though the effect wasn't programmed into games for years to come. On August 23, 2003, Microsoft updated DirectX to DirectX 9.0b, which enabled Pixel Shader 2.x (Extended) profile for ATI's Radeon X series and NVIDIA's GeForce FX series of graphics processing units.

On August 9, 2004, Microsoft updated DirectX once more to DirectX 9.0c. This also exposed the Shader Model 3.0 profile for high level shader language (HLSL). Shader Model 3.0's lighting precision, according to Dr. Sim Dietrich Jr., has a minimum of 32-bits as opposed to 2.0's 8-bit minimum. Also all lighting precision calculations are now floating-point based. NVIDIA states that contrast ratios using Shader Model 3.0 can be as high as 65535:1 using 32-bit lighting precision. At first, HDRR was only capable on video cards capable of Shader Model 3.0 effects, but software developers soon added compatibility for Shader Model 2.0. The difference between an HDRR scene rendered in Shader Model 3.0 or 2.0 is negligible at this point. As a side note, when referred as Shader Model 3.0 HDR, the HDRR is really done by FP16 blending. FP16 blending is not part of Shader Model 3.0, but supported only by cards also capable of Shader Model 3.0, excluding the GeForce 6200 models as they lack the capabilities. FP16 blending is used as a faster way to render HDR in video games.

Shader Model 4.0 will be a feature of DirectX 10, which will be released in the future. Although not confirmed to be a hardware limitation of graphics cards using Shader Model 3.0 or a software limitation, Shader Model 4.0 will allow for 128-bit HDR rendering, as opposed to 64-bit HDR in Shader Model 3.0.

[edit] Graphics cards which support HDRR

This is a list of graphics cards that may or can support HDRR. It is implied that because the minimum requirement for HDR rendering is Shader Model 2.0 (or in this case DirectX 9), any graphics card that supports Shader Model 2.0 can do HDR rendering. However, HDRR may greatly impact the performance of the software using it, refer to your software's recommended specifications in order to run with acceptable performance.

Graphics cards designed for games

Shader Model 2 Compliant (Includes versions 2.0, 2.0a and 2.0b)
From ATI R300 series: 9500, 9500 Pro, 9550, 9550 SE, 9600, 9600 SE, 9600 AIW, 9600 Pro, 9600 XT, 9650, 9700, 9700 AIW, 9700 Pro, 9800, 9800 SE, 9800 AIW, 9800 Pro, 9800XT, X300, X300 SE, X550, X600 AIW, X600 Pro, X600 XT, ATi Hollywood (Wii)

R420 series: X700, X700 Pro, X700 XT, X800, X800SE, X800 GT, X800 GTO, X800 Pro, X800 AIW, X800 XL, X800 XT, X800 XTPE, X850 Pro, X850 XT, X850 XTPE,

From NVIDIA GeForce FX (includes PCX versions): 5100, 5200, 5200 SE/XT, 5200 Ultra, 5300, 5500, 5600, 5600 SE/XT, 5600 Ultra, 5700, 5700 VE, 5700 LE, 5700 Ultra, 5750, 5800, 5800 Ultra, 5900 5900 ZT, 5900 SE/XT, 5900 Ultra, 5950, 5950 Ultra
From S3 Graphics Delta Chrome: S4, S4 Pro, S8, S8 Nitro, F1, F1 Pole

Gamma Chrome: S18 Pro, S18 Ultra, S25, S27

From SiS Xabre: Xabre II
From XGI Volari: V3 XT, V5, V5, V8, V8 Ultra, Duo V5 Ultra, Duo V8 Ultra, 8300, 8600, 8600 XT
Shader Model 3.0 Compliant
From ATI R520 series: X1300 HyperMemory Edition, X1300, X1300 Pro, X1600 Pro, X1600 XT, X1650 Pro, X1650 XT, X1800 GTO, X1800 XL AIW, X1800 XL, X1800 XT, X1900 AIW, X1900 GT, X1900 XT, X1900 XTX, X1950 Pro, X1950 XT, X1950 XTX, ATi Xenos (X360), ATi Hollywood?
From NVIDIA GeForce 6: 6100, 6150, 6200, 6200 TC, 6500, 6600, 6600 LE, 6600 DDR2, 6600 GT, 6610 XL, 6700 XL, 6800, 6800 LE, 6800 XT, 6800 GS, 6800 GTO, 6800 GT, 6800 Ultra, 6800 Ultra Extreme

GeForce 7: 7300 LE, 7300 GS, 7300 GT, 7600 GS, 7600 GT, 7800 GS, 7800 GT, 7800 GTX, 7800 GTX 512MB, 7900 GS, 7900 GT, 7950 GT, 7900 GTO, 7900 GTX, 7900 GX2, 7950 GX2, 7950 GT

Shader Model 4.0 Compliant
From NVIDIA Geforce 8[5]: 8800 GTS, 8800 GTX

Graphics cards designed for workstations

Shader Model 2 Compliant (Includes versions 2.0, 2.0a and 2.0b)
From ATI FireGL: Z1-128, T2-128, X1-128, X2-256, X2-256t, V3100, V3200, X3-256, V5000, V5100, V7100
From NVIDIA Quadro FX: 330, 500, 600, 700, 1000, 1100, 1300, 2000, 3000
Shader Model 3.0 Compliant
From ATI FireGL: V7300, V7350
From NVIDIA Quadro FX: 350, 540, 550, 560, 1400, 1500, 3400, 3450, 3500, 4000, 4400, 4500, 4500SDI, 4500 X2, 5500, 5500SDI
From 3Dlabs Wildcat Realizm: 100, 200, 500, 800

[edit] Video games and HDR rendering

With the release of the seventh generation video game consoles, and the decrease of prices in capable graphics cards such as the GeForce 6, 7, and Radeon X1000 series, HDR rendering is becoming a standard feature in a lot games as of late 2006. Options may exist to turn the feature on or off as it is stressful for graphics cards to process.

However, certain lighting styles may not benefit from HDR as much, such as if the game contains dominantly dark scenery (likewise, dominantly bright scenery) and thus may not be included.

[edit] References

  1. ^ Reinhard, Erik; Greg Ward, Sumanta Pattanaik, Paul Debevec (August 2005). High Dynamic Range Imaging: Acquisition, Display, and Image-Based Lighting. Westport, Connecticut: Morgan Kaufmann. ISBN 0125852630. 
  2. ^ Paul E. Debevec and Jitendra Malik (1997). "Recovering High Dynamic Range Radiance Maps from Photographs". SIGGRAPH. 
  3. ^ Paul E. Debevec (1998). "Rendering Synthetic Objects into Real Scenes: Bridging Traditional and Image-Based Graphics with Global Illumination and High Dynamic Range Photography". SIGGRAPH. 
  4. ^ a b Simon Green and Cem Cebenoyan (2004). High Dynamic Range Rendering (on the GeForce 6800) (PDF). GeForce 6 Series 3. nVidia.
  5. ^ Geforce 8800 Technial Specifications. Geforce 8 Series. Retrieved on 2006-11-20.

[edit] See also

[edit] Links

[edit] External links and sources

[edit] Software developer websites

[edit] Real-time HDR rendering