A High Dynamic Range Rendering Pipeline for Interactive Applications
Total Page:16
File Type:pdf, Size:1020Kb
Vis Comput DOI 10.1007/s00371-010-0430-5 ORIGINAL ARTICLE A high dynamic range rendering pipeline for interactive applications In search for perceptual realism Josselin Petit · Roland Brémond © Springer-Verlag 2010 Abstract Realistic images can be computed at interactive 1 Introduction frame rates for Computer Graphics applications. Mean- while, High Dynamic Range (HDR) rendering has a grow- Immersion is a major goal for virtual reality applications. ing success in video games and virtual reality applications, Among the factors which contribute to this objective, the as it improves the image quality and the player’s immersion perceptual realism of the displayed images is paramount [8]. feeling. In this paper, we propose a new method, based on The most straightforward way to achieve perceptual realism a physical lighting model, to compute in real time a HDR is to get physical realism. However, reaching physical real- illumination in virtual environments. Our method allows ism raises tough problems, both in terms of real-time com- to re-use existing virtual environments as input, and com- putation and physical modeling. First, true photorealism im- putes HDR images in photometric units. Then, from these plies very accurate 3D models. Next, one must collect the HDR images, displayable 8-bit images are rendered with a photometric and colorimetric inputs (light source descrip- tone mapping operator and displayed on a standard display tion, spectral representation, material texture, BRDF, etc.) device. The HDR computation and the tone mapping are needed for the illumination computation. Then, the full sim- implemented in OpenSceneGraph with pixel shaders. The ulation of the scene illumination (either with radiosity or ray lighting model, together with a perceptual tone mapping, tracing methods) in large virtual environments is far from improves the perceptual realism of the rendered images at real time. And finally, one cannot avoid the technical limits low cost. The method is illustrated with a practical applica- tion where the dynamic range of the virtual environment is of current display devices, which are not designed to dis- a key rendering issue: night-time driving simulation. play physical High Dynamic Range (HDR) luminance val- ues but Low Dynamic Range (LDR) 8-bit images (however, Keywords Rendering · High dynamic range · Perceptual see Seetzen et al. [35]). realism · Interactivity · Pixel shader Due to the limited luminance gamut of typical LDR display devices, one cannot avoid to lose physical realism somewhere along the rendering pipeline. For instance, usual LCD display devices cannot render light sources (they are limited around 300 cd/m2), and cannot render very dark ar- eas (the minimum luminance in an office may be around 1cd/m2). In contrast, the sensitivity of the human pho- −6 2 J. Petit · R. Brémond () toreceptors ranges between 10 cd/m for starlight and Université Paris-Est, LEPSiS, 75015 Paris, France 108 cd/m2 for sunlight [9]. Thus, the input range of the e-mail: [email protected] physical visual signal must be mapped to the dynamic range J. Petit of the display device (2 orders of magnitude only). The pur- e-mail: [email protected] pose of tone mapping operators is to transform the HDR im- J. Petit ages into LDR images which can be displayed on conven- Université Lyon 1, LIRIS, UMR5205, 69622, Lyon, France tional display devices, still keeping perceptual realism. J. Petit, R. Brémond Recent advances in hardware enable to program OpenGL and DirectX applications to compute environment mapping (an efficient method to simulate complex mirroring surfaces) using HDR image-based lighting [6]. These applications simulate light reflection, refraction, Fresnel effect, chro- matic dispersion, blooming and glare. However, the eight Fig. 1 Proposed approach: a physically-based HDR rendering is fol- light sources provided by OpenGL do not suffice for most lowed by a perceptual tone mapping applications. Some libraries for HDR rendering have emerged, no- tably in the open-source rendering engines Ogre3D [20] and This perceptual realism is related to photometric indexes: OpenSceneGraph [26, 37]. HDR rendering is also becoming for instance, the human visual system is sensitive to lumi- a standard feature in video games such as Half Life and Cr- nance contrast rather than to its absolute values [39]. Thus, ysis [5, 23], where it makes participative media and bright one may modify the physical luminance values in the im- light sources more realistic. HDR rendering is used with ad- ages, and still keep the perceptual levels of contrast percep- vanced lighting and post-processing effects, such as glare, tion [27, 40]. which improves the apparent brightness of the light sources. To address the issue of perceptual realism for interactive applications, we propose a two-step approach, summarized 2.2 Glare rendering in Fig. 1. 1. A real-time model of illumination leads to an interme- Usual display devices are not bright enough to produce a diate HDR physical representation of the images to be glare experience. Thus, post-processing effects have been displayed, in photometric units, owing to a photometric proposed in order to simulate glare in Computer Graphics description of the light sources and of the surfaces. applications [24]. Spencer et al. [36] used a point-spread- 2. A glare simulation [16] followed by a tone mapping oper- function as a convolution filter to simulate the physiologi- ator [14] transform the physically realistic HDR images cal veiling luminance responsible for the glare, however not into perceptually realistic LDR images on the fly. in real time. Some tone mapping operators included a glare The graphic pipeline is implemented in OpenSceneGraph simulation based on Spencer’s paper [7, 41]. with pixel shaders, and runs in real time (30 frames per sec- Instead of this physiological model, Gaussian functions ond) in full HD. To our sense, our main contribution is that may be used around light sources to simulate the glare expe- any existing virtual environment may be rendered with this rience [16]. This technique is fast and very popular in video pipeline, with only a few modifications of the environment games, and was implemented in our pipeline. Recently, two and a true improvement of the perceptual realism. models of glare based on wave optics also gave convinc- ing results; however, these techniques need more computing power [15, 32]. 2 Background 2.3 Tone mapping operators 2.1 HDR rendering The interest for HDR capture and imaging may be noticed There are many ways to perform the lighting of a virtual from the beginning of photographic art, and was already ad- environment. For real-time applications, ray-tracer engines dressed by painters. But there was an increasing interest in such as OptiX [25] are emerging; however, these tools are the image community since the development of tone map- still limited to specific GPUs, and do not provide any in- ping operators (see Reinhard et al. for a review [31]). terface between the virtual environment and the render- Some of these operators can process HDR videos ing engine. In video games, one popular method is to pre- [14, 28], create glare and blooming effects [17, 41] and sim- compute light-maps with a global illumination algorithm, ulate the visual acuity and adaptation to light and darkness, and to load them in the application which avoids comput- using criteria related to psychophysical data [9, 28]. These ing the lighting in real time. For instance, interactive appli- techniques are of great interest for the rendering of virtual cations were proposed with this approach, including a tone environments because they make it possible to use an HDR mapping at interactive frame rates [7, 33]. The problem with representation of the scene illumination far away in the ren- pre-computed global illumination is that it excludes mov- dering pipeline, thus improving the final visual quality. ing light sources and moving objects passing under the light In the past 15 years, a number of operators were pro- sources. Thus, most interactive applications need alternative posed, and the focus of attention moved towards assessing rendering strategies. the visual quality of the resulting images [3, 18, 19, 43]. A high dynamic range rendering pipeline for interactive applications The key issue is the difference, depending on the operator, 3.2 HDR light sources in terms of the resulting visual appearance. To select an op- erator for a given application, the main image quality criteria To render virtual environments with luminance and color deal with immersion (e.g. visual appearance, see [22]) and values related to real physical data, we propose a photomet- fidelity (e.g. visual performance, see [11]). ric interpretation of modified virtual environments. Depend- Note that the tone mapping operators used in video ing on the available virtual environment, the light sources games are generally very basic (e.g. a power function, a log- must be either modified or added. arithm, or a sigmoid), due to the need for a fast rendering. Two descriptions are used for each light source: one for the illumination model, another one for the rendering of the direct illumination when the light source is in the field of 3 The HDR rendering pipeline view. 3.1 Framework – For the illumination model, the intensity and the shape of the light sources are given in photometric and gonio- Perceptual realism is not always a major objective in video metric units, taken from lighting designers and lighting games and interactive applications, where esthetics and ex- databases. pressivity may be more important. However, when available, – For the direct illumination, the light source texture is con- perceptual realism improves the immersion feeling. Our pro- verted from an LDR to an HDR texture image, accord- posal is that an HDR rendering can take advantage of a phys- ing to photometric data.