High Dynamic Range Environment Mapping On Mainstream Graphics Hardware
I. IntroductionThe computer graphics industry has seen dramatic leaps in visual fidelity due to advances in hardware, memory density, and display resolution in the past decade. Researchers in computer graphics have been exploring the dynamic range of the visual display and how to best make use of its limited display range for some time now. Rendering algorithms that utilize high dynamic range imagery is one way to better utilize the display. With programmable graphics hardware widely deployed, game developers can take advantage of these effects in their game engines. This article discusses the capture, storage, and display of high dynamic range images. The capability to display and process high dynamic range imagery is widely available today - for example, in mainstream computer graphics chipsets such as the Intel® 915G Express Chipset. The article also demonstrates the ability to use high dynamic range images without support for floating point texture formats. This is demonstrated by environment mapping objects in a scene with HDR textures in real-time on integrated graphics processors.
The article first presents background on high dynamic range imagery and describes the theory and the mathematics of high dynamic range image capture and display with emphasis on Erik Reinhard's photographic tone reproduction operator. The authors then describe their own implementation of HDR environment mapping provided with this article including an SSE optimized HDR image loader, SSE optimized image key calculator, and a Pixel Shader 2.0 implementation of high dynamic range tone mapping. An example of the results can be seen in Figure 1. The authors obtained a >20% speedup on HDR image loading and a >30% speedup on image key calculations using SSE2 optimized routines. Performance is based on a wide variety of factors including hardware, software, and system configuration - your results may vary. II. Background2.1 A trip down the image acquisition pipeline
Figure 2 depicts a simplified image acquisition pipeline inspired by [Debevec97]. After passing through the lens, photons travel through the shutter to a light sensor, typically a CCD. The shutter is used to control the amount of time the light sensor accumulates photons and the lens is used to focus the incoming photons onto the light sensor. After arriving at the light sensor the photons are converted into digital values by passing through an analog digital converter (ADC). These digital values will travel through some final adjustments depending on the camera manufacturer and camera settings and be written to an image as RGB values. 2.2 Dynamic Range
In Figure 3 we can see the variations in dynamic range of the human visual system compared to the dynamic range of visible light and LCD display range. The human visual system adapts the amount of incoming light via moderation of the pupil as well as chemical and neural processes in the photoreceptors and neurons. Photographic devices mimic this behavior via a lens aperture and exposure time. However, in doing so, the remainder of the information outside the range of the lens and exposure combination is forever lost - a significant blow to the use of these images for real-time rendering purposes, where the conditions under which the light is perceived may warrant modification. In other words, we may want to capture all the information in of the full dynamic range in a scene, and only later chose which parts to discard. As we'll demonstrate in this article, the use of high dynamic range images allows for the storage of more lighting information in the source image, and therefore runtime modification of the end users perception of this lighting information 2.3 Storage of HDR ImagesAfter creating an HDR image, it will need to stored for later retrieval, processing, and display. [Ward03] has a summary of different formats for storing HDR images. Examples include Pixar's 33 bit log encoded TIFF, Radiance's 32-bit RGBE and XYZE, IEEE 96-bit TIFF and Portable FloatMap, LogLuv TIFF, and ILM's 48-bit OpenEXR format. Each format has its own set of advantages and disadvantages including file size, dynamic range, and quantization. For our work we have used the RGBE file format. Ultimately, the format you choose will be dependent on the context of your work and the tools available. We need a tool to manage and manipulate HDR images. Fortunately there is a tool available on-line to help in this effort, HDRShop. Since HDRShop exports RGBE files and RGBE files have an acceptable displayable range we chose to use them for our work [HDRShop04]. Commercial software packages are also available, including Version 2.0 of HDRShop and Photogenics [Photogenics04]. |
|