175
Debevec, Ward, and Lemmon, “HDRI and Image-Based Lighting”, SIGGRAPH 2003 Course #19 0-1 HDRI and Image-Based Lighting Paul Debevec USC Institute for Creative Technologies Greg Ward Anyhere Software Dan Lemmon WETA Digital FX SIGGRAPH 2003 Course 19 (Tutorial) Monday, July 28, 2003 Course Abstract This course presents newly developed techniques for realistically compositing CG imagery into live photography using measurements of real-world lighting. The course presents material on high dynamic range photography, global illumination, HDRI file formats, acquiring light probe measurements real-world lighting and rendering CG objects illuminated by captured light. The techniques are illustrated with recent Electronic Theater animations and feature film projects. Methods to apply the techniques - and approximations to them - using standard rendering packages are included. The course concludes with systems to apply image-based lighting to live-action subjects for photoreal virtual set compositing.

HDRI and Image-Based Lighting

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

Page 1: HDRI and Image-Based Lighting

Debevec, Ward, and Lemmon, “HDRI and Image-Based Lighting”, SIGGRAPH 2003 Course #19

0-1

HDRI and Image-Based Lighting

Paul Debevec USC Institute for Creative Technologies

Greg Ward

Anyhere Software

Dan Lemmon WETA Digital FX

SIGGRAPH 2003 Course 19 (Tutorial) Monday, July 28, 2003

Course Abstract This course presents newly developed techniques for realistically compositing CG imagery into live photography using measurements of real-world lighting. The course presents material on high dynamic range photography, global illumination, HDRI file formats, acquiring light probe measurements real-world lighting and rendering CG objects illuminated by captured light. The techniques are illustrated with recent Electronic Theater animations and feature film projects. Methods to apply the techniques - and approximations to them - using standard rendering packages are included. The course concludes with systems to apply image-based lighting to live-action subjects for photoreal virtual set compositing.

Page 2: HDRI and Image-Based Lighting

Debevec, Ward, and Lemmon, “HDRI and Image-Based Lighting”, SIGGRAPH 2003 Course #19

0-2

Presenters Paul Debevec Executive Producer, Graphics Research University of Southern California Institute for Creative Technologies 13274 Fiji Way, 5th Floor Marina del Rey, CA 90292 (310) 574-7809 office / (310) 577-9140 fax [email protected] / http://www.debevec.org/ Paul Debevec received his Ph.D. from UC Berkeley in 1996 where he worked with C.J. Taylor and Jitendra Malik to produce Facade, an early image-based modeling and rendering system for creating photoreal architectural models from still photographs. His work with high dynamic range imagery (HDRI) and image-based lighting has been incorporated into commercial rendering systems such as LightWave and RenderMan and has helped influence recent advancements in dynamic range in graphics hardware. The technology used in Debevec's short films at the SIGGRAPH Electronic Theater including "The Campanile Movie", "Rendering with Natural Light", and "Fiat Lux" has contributed to the visual effects in films including "The Matrix", "X-Men", and "The Time Machine". In 2001 he received ACM SIGGRAPH's Significant New Researcher award and in 2002 was named one of the world's top 100 young innovators by MIT's Technology Review Magazine for his work to develop the Light Stage. Today Debevec leads the computer graphics laboratory at USC's Institute for Creative Technologies and is a Research Assistant Professor in USC's computer science department. Greg Ward Anyhere Software 1200 Dartmouth Street #C Albany, CA 94706 [email protected] Greg Ward (a.k.a.Greg Ward Larson) graduated in Physics from UC Berkeley in 1983 and earned a Masters in Computer Science from SF State University in 1985. Since 1985, he has working in the field of light measurement, simulation, and rendering variously at the Berkeley National Lab, EPFL Switzerland, Silicon Graphics Inc., Shutterfly, and Exponent. He is the author of the widely used RADIANCE package for lighting simulation and rendering. Dan Lemmon Technical Director WETA Digital PO Box 15-208 Miramar, Wellington, New Zealand [email protected] Dan Lemmon received a Bachelor's of Fine Arts in Industrial Design from Brigham Young University. While at BYU he began his work in Computer Graphics as an intern at Wavefront Technologies and Cinesite. Also while earning his BFA, Dan participated in three internships at James Cameron’s visual effects company Digital Domain. Dan's film work includes The Fifth Element, Titanic, Fight Club, The Grinch, and a variety of other films and television commercials. On The Grinch Dan led the creation of an automated tool for creating and clothing the huge library of characters to populate the town of Whoville. Dan has led recent efforts to incorporate image-based lighting, global illumination and high dynamic range rendering into the Digital Domain pipeline. In February of 2002 Dan joined WETA Digital to work on effects for the sequels to the Lord of the Rings.

Page 3: HDRI and Image-Based Lighting

Debevec, Ward, and Lemmon, “HDRI and Image-Based Lighting”, SIGGRAPH 2003 Course #19

0-3

Course Schedule and Syllabus

1. Introduction (Debevec) 10:30-10:40 o What is image-based lighting? o How HDR/IBL differs from traditional techniques

2. Global Illumination and HDRI File Formats (Ward) 10:40-11:05

o Global Illumination techniques Radiosity, Ray-tracing, Monte Carlo

o High Dynamic Range Image File Formats HDR, PFM, LogLuv TIF, EXF

3. Image-Based Lighting (Debevec) 11:05-11:50

o Capturing Real-World Illumination How Cameras measure light HDR: Taking a series of photographs Deriving the response curve Combining the photographs into a radiance map HDR Shop: Creating, viewing and editing HDR imagery

o Illuminating Synthetic Objects with Real Light Making "Rendering with Natural Light" (SIGGRAPH 98 Electronic Theater)

1. Modeling the scene 2. Acquiring the light 3. Rendering the scene 4. Vignetting, Defocus, Glare, and Motion Blur

o Rendering Synthetic Objects into Real Scenes Image-Based Lighting in "Fiat Lux" (SIGGRAPH 99 Electronic

Theater) 1. Combining Image-Based Lighting with Image-Based

Modeling and Rendering 2. Creating "illum" light sources for direct lighting 3. Integrating animated objects 4. Inverse global illumination for the floor of St. Peter's

o Illuminating real objects and people Acquiring Reflectance Fields with Light Stage 1 and 2 Illuminating reflectance fields Interactive image-based lighting of human faces Real-Time Lighting Reproduction with Light Stage 3

4. HDRI and Image-Based Lighting in Production (Lemmon) 11:50-12:15

o On-set lighting capture o HDRI in a production pipeline o Useful Approximations to HDRI/IBL

5. End 12:15

Page 4: HDRI and Image-Based Lighting

Debevec, Ward, and Lemmon, “HDRI and Image-Based Lighting”, SIGGRAPH 2003 Course #19

0-4

Course Notes Table of Contents

0. Prologue: Speakers, Schedule and Syllabus, and Table of Contents

1. Introduction

Paper: A Tutorial on Image-Based Lighting. Paul E. Debevec, Computer Graphics and Applications, March/April 2002

2. Course Slides

Slides: 1. Introduction: What is Image-Based Lighting? (Debevec)

2. Capturing, Representing, and Manipulating High Dynamic Range Imagery

3. Capturing Real-World Illumination

4. Illuminating Synthetic Objects with Real Light

5. Making "Rendering with Natural Light"

6. Rendering Synthetic Objects into Real Scenes

7. Image-Based Lighting in "Fiat Lux"

8. Image-Based Lighting Real Objects and Actors

Slides: Global Illumination and HDRI Formats (Ward)

3. Supplemental Material

Notes: The Story of Reflection Mapping Paul Debevec

Notes: Illumination and Reflection Maps: Simulated Objects in Simulated and Real Environments Gene S. Miller and C. Robert Hoffman, Course Notes for Advanced Computer Graphics Animation, SIGGRAPH 84

Sketch: Image-Based Modeling, Rendering, and Lighting in Fiat Lux Paul Debevec, SIGGRAPH 99 Technical and Animation Sketch

Sketch: HDR Shop Chris Tchou and Paul Debevec, SIGGRAPH 2001 Technical Sketch

Sketch: Light Stage 2.0 Tim Hawkins, Jonathan Cohen, Chris Tchou, and Paul Debevec, SIGGRAPH 2001 Technical Sketch

4. Paper Reprints

Paper: Recovering High Dynamic Range Radiance Maps from Photographs. Paul E. Debevec and Jitendra Malik, Proc. SIGGRAPH 97

Paper: Rendering Synthetic Objects into Real Scenes: Bridging Traditional and Image-Based Graphics with Global Illumination and High Dynamic Range Photography Paul Debevec, Proc. SIGGRAPH 98

Paper: Acquiring the Reflectance Field of a Human Face Paul Debevec, Tim Hawkins, Chris Tchou, Haarm-Pieter Duiker, Westley Sarokin, and Mark Sagar, Proc. SIGGRAPH 2000

Page 5: HDRI and Image-Based Lighting

Debevec, Ward, and Lemmon, “HDRI and Image-Based Lighting”, SIGGRAPH 2003 Course #19

0-5

Paper: Overcoming Gamut and Dynamic Range Limitations in Digital Images Larson, G.W, Proc. Sixth Color Imaging Conference, November 1998

Paper: A Visibility Matching Tone Reproduction Operator for High Dynamic Range Scenes Gregory Ward Larson, Holly Rushmeier, and Christine Piatko IEEE Transactions on Visualization and Computer Graphics, 3:4 December 1997

Paper: High Dynamic Range Imaging Greg Ward, Proc. Ninth Color Imaging Conference, November 2001

5. CDROM Material: Images ( Images directory )

Image: Rendering with Natural Light still (1600 × 1200)

Image: Fiat Lux still (3000 × 952)

Image: Light Stage 2.0 still (2160 × 1440)

Image: Image-Based Lighting in “Arnold” Mosaic (1280 × 1000)

6. CDROM Material: Animations ( Movies directory )

Animation: The Candlestick and Spheres on an Overcast Day (1998)

Animation: The Space-Age Sepia Kitchen with Blur and Vignetting (1998)

Animation: Synthetic Dominos on the Kitchen Table (1998)

Film: Rendering with Natural Light (SIGGRAPH 98 Electronic Theater) Paul Debevec et al.

Film: Fiat Lux (SIGGRAPH 99 Electronic Theater) Paul Debevec et al.

Film: Image-Based Lighting (SIGGRAPH 2000 Electronic Theater) Paul Debevec, Tim Hawkins, Chris Tchou, Haarm-Pieter Duiker, and Westley Sarokin

7. CDROM Material: Light Probe Image Library ( Probes directory )

Program: HDRView.exe Windows program for viewing and converting HDR images.

Probes: Light Probe Images from Rendering with Natural Light, Fiat Lux , and the SIGGRAPH 98 image-based lighting paper. See also http://www.debevec.org/Probes

8. CDROM Material: Rendering with Natural Light Source Files ( RNL_Source directory )

Files: Everything needed to render the animation “Rendering with Natural Light” using the RADIANCE rendering system. See the README file for details.

Page 6: HDRI and Image-Based Lighting

Image-based lighting (IBL) is the process ofilluminating scenes and objects (real or syn-

thetic) with images of light from the real world. Itevolved from the reflection-mapping technique1,2 in

which we use panoramic images astexture maps on computer graphicsmodels to show shiny objects reflect-ing real and synthetic environments.IBL is analogous to image-basedmodeling, in which we derive a 3Dscene’s geometric structure fromimages, and to image-based render-ing, in which we produce the ren-dered appearance of a scene from itsappearance in images. When usedeffectively, IBL can produce realisticrendered appearances of objectsand can be an effective tool for inte-grating computer graphics objectsinto real scenes.

The basic steps in IBL are

1. capturing real-world illumination as an omnidirec-tional, high dynamic range image;

2. mapping the illumination onto a representation ofthe environment;

3. placing the 3D object inside the environment; and4. simulating the light from the environment illumi-

nating the computer graphics object.

Figure 1 shows an example of an object illuminatedentirely using IBL. Gary Butcher created the models in3D Studio Max, and the renderer used was the Arnoldglobal illumination system written by Marcos Fajardo.I captured the light in a kitchen so it includes light froma ceiling fixture; the blue sky from the windows; andthe indirect light from the room’s walls, ceiling, andcabinets. Gary mapped the light from this room onto alarge sphere and placed the model of the microscopeon the table in the middle of the sphere. Then, he usedArnold to simulate the object’s appearance as illumi-nated by the light coming from the sphere of incidentillumination.

In theory, the image in Figure 1 should look abouthow a real microscope would appear in that environ-ment. It simulates not just the direct illumination fromthe ceiling light and windows but also the indirect illu-mination from the rest of the room’s surfaces. The reflec-tions in the smooth curved bottles reveal the kitchen’sappearance, and the shadows on the table reveal thecolors and spread of the area light sources. The objectsalso successfully reflect each other, owing to the ray-tracing-based global-illumination techniques we used.

This tutorial gives a basic IBL example using the freelyavailable Radiance global illumination renderer to illu-minate a simple scene with several different lightingenvironments.

Capturing lightThe first step in IBL is obtaining a measurement of

real-world illumination, also called a light probe image.3

The easiest way to do this is to download one. There areseveral available in the Light Probe Image Gallery athttp://www.debevec.org/Probes. The Web site includesthe kitchen environment Gary used to render the micro-scope as well as lighting captured in various other inte-rior and outdoor environments. Figure 2 shows a few ofthese environments.

Light probe images are photographically acquiredimages of the real world, with two important proper-ties. First, they’re omnidirectional—for every directionin the world, there’s a pixel in the image that corre-sponds to that direction. Second, their pixel values are

Tutorial

26 © 2002 IEEE. Reprinted, with permission, from IEEE Computer Graphics and Applications, March/April_2002

This tutorial shows how

image-based lighting can

illuminate synthetic objects

with measurements of real

light, making objects appear

as if they’re actually in a

real-world scene.

Paul DebevecUSC Institute for Creative Technologies

Image-BasedLighting

1 A micro-scope, modeledby Gary Butcherin 3D StudioMax, renderedusing MarcosFajardo’s Arnoldrenderingsystem as illumi-nated by lightcaptured in akitchen.

Page 7: HDRI and Image-Based Lighting

linearly proportional to the amount of light in the realworld. In the rest of this section, we’ll see how to takeimages satisfying both of these properties.

We can take omnidirectional images in a number ofways. The simplest way is to use a regular camera to takea photograph of a mirrored ball placed in a scene. A mir-rored ball actually reflects the entire world around it,not just the hemisphere toward the camera. Light raysreflecting off the outer circumference of the ball glancetoward the camera from the back half of the environ-ment. Another method of obtaining omnidirectionalimages using a regular camera is to shoot a mosaic ofmany pictures looking in different directions and com-bine them using an image stitching program such asRealViz’s Stitcher. A good way to cover a particularlylarge area in each shot is to use a fisheye lens,4 whichlets us cover the full field in as few as two images. A finaltechnique is to use a special scanning panoramic camera(such as the ones Panoscan and Sphereon make), whichuses a vertical row of image sensors on a rotating cam-era head to scan across a 360-degree field of view.

In most digital images, pixel values aren’t proportion-al to the light levels in the scene. Usually, light levels areencoded nonlinearly so they appear either more correctlyor more pleasingly on nonlinear display devices such ascathode ray tubes. Furthermore, standard digital imagestypically represent only a small fraction of the dynamicrange—the ratio between the dimmest and brightestregions accurately represented—present in most real-world lighting environments. When part of a scene is toobright, the pixels saturate to their maximum value (usu-ally 255) no matter how bright they really are.

We can ensure that the pixel values in the omnidi-rectional images are truly proportional to quantities oflight using high dynamic range (HDR) photographytechniques.5 The process typically involves taking aseries of pictures of the scene with varying exposure lev-els and then using these images to solve for the imagingsystem’s response curve and to form a linear-responsecomposite image covering the entire range of illumina-tion values in the scene. Software for assembling imagesin this way includes the command-line mkhdr programat http://www.debevec.org/Research/HDR and theWindows-based HDR Shop program at http://www.debevec.org/HDRShop.

HDR images typically use a single-precision floating-point number for red, green, and blue, allowing thefull range of light from thousandths to billions to berepresented. We can store HDR image data in a vari-ous file formats, including the floating-point versionof the TIFF file format or the Portable Floatmap vari-ant of Jef Postsanzer’s Portable Pixmap format. Sever-al other representations that use less storage areavailable, including Greg Ward’s Red-Green-BlueExponent (RGBE) format6 (which uses one byte eachfor red, green, blue and a common 8-bit exponent) andhis new 24-bit and 32-bit LogLuv formats recentlyincluded in the TIFF standard. The light probe imagesin the light probe image gallery are in the RGBE for-mat, which lets us easily use them in Ward’s Radianceglobal illumination renderer. (We’ll see how to do pre-cisely that in the next section.)

Figure 3 (next page) shows a series of images usedin creating a light probe image. To acquire these images,we placed a three-inch polished ball bearing on top ofa tripod at Funston Beach near San Francisco and useda digital camera with a telephoto zoom lens to take aseries of exposures of the ball. Being careful not to dis-turb the camera, we took pictures at shutter speedsranging from 1/4 second to 1/10000 second, allowing

© 2002 IEEE. Reprinted, with permission, from IEEE Computer Graphics and Applications, March/April_2002 27

2 Several lightprobe imagesfrom the LightProbe ImageGallery athttp://www.debevec.org/Probes. Thelight is from (a) a residentialkitchen, (b) theeucalyptusgrove at UCBerkeley, (c) theUffizi gallery inFlorence, Italy,and (d) GraceCathedral inSan Francisco.

(a)

(b)

(c)

(d)

Page 8: HDRI and Image-Based Lighting

the camera to properly image everything from the darkcliffs to the bright sky and the setting sun. We assem-bled the images using code similar to that now foundin mkhdr and HDR Shop, yielding a high dynamicrange, linear-response image.

Illuminating synthetic objects with reallight

IBL is now supported by several commercial ren-derers, including LightWave 3D, Entropy, and Blender.For this tutorial, we’ll use the freely downloadableRadiance lighting simulation package written by GregWard at Lawrence Berkeley Laboratories. Radiance isa Unix package, which means that to use it you’ll needto use a computer running Linux or an SGI or Sunworkstation. In this tutorial, we’ll show how to performIBL to illuminate synthetic objects in Radiance in justseven steps.

1. Download and install RadianceFirst, test to see if you already have Radiance installed

by typing whichrpict at a Unix command prompt. Ifthe shell returns “Command not found,” you’ll need toinstall Radiance. To do this, visit the Radiance Web siteat http://radsite.lbl.gov/radiance and click on thedownload option. As of this writing, the current ver-sion is 3.1.8, and it’s precompiled for SGI and Sun work-stations. For other operating systems, such as Linux,you can download the source files and then compile theexecutable programs using the makeall script. Onceinstalled, make sure that the Radiance binary directo-ry is in your $PATH and that your $RAYPATH environ-ment variable includes the Radiance library directory.Your system administrator should be able to help youif you’re not familiar with installing software packageson Unix.

2. Create the sceneThe first thing we’ll do is create a Radiance scene file.

Radiance scene files contain the specifications for yourscene’s geometry, reflectance properties, and lighting.We’ll create a simple scene with a few spheres sitting ona platform. First, let’s specify the material propertieswe’ll use for the spheres. Create a new directory andthen call up your favorite text editor to type in the fol-lowing material specifications to the file scene.rad:

# Materials

void plastic red_plastic

0

0

5 .7 .1 .1 .06 .1

void metal steel

0

0

5 0.6 0.62 0.68 1 0

void metal gold

0

0

5 0.75 0.55 0.25 0.85 0.2

void plastic white_matte

0

0

5 .8 .8 .8 0 0

Tutorial

28 March/April 2002

3 A series ofdifferentlyexposed imagesof a mirroredball photo-graphed atFunston Beachnear San Fran-cisco. I mergedthe exposures,ranging inshutter speedfrom 1/4 sec-ond to 1/1000second, into ahigh dynamicrange image so we can use it as an IBLenvironment.

Page 9: HDRI and Image-Based Lighting

void dielectric crystal

0

0

5 .5 .5 .5 1.5 0

void plastic black_matte

0

0

5 .02 .02 .02 .00 .00

void plastic gray_plastic

0

0

5 0.25 0.25 0.25 0.06 0.0

These lines specify the diffuse and specular charac-teristics of the materials we’ll use in our scene, includ-ing crystal, steel, and red plastic. In the case of the redplastic, the diffuse RGB color is (.7, .1, .1), the proportionof light reflected specularly is .06, and the specularroughness is .1. The two zeros and the five on the sec-ond through fourth lines are there to tell Radiance howmany alphanumeric, integer, and floating-point para-meters to expect.

Now let’s add some objects with these materialproperties to our scene. The objects we’ll choose willbe some spheres sitting on a pedestal. Add the fol-lowing lines to the end of scene.rad:

# Objects

red_plastic sphere ball0

0

0

4 2 0.5 2 0.5

steel sphere ball1

0

0

4 2 0.5 -2 0.5

gold sphere ball2

0

0

4 -2 0.5 -2 0.5

white_matte sphere ball3

0

0

4 -2 0.5 2 0.5

crystal sphere ball4

0

0

4 0 1 0 1

!genworm black_matte twist \

“cos(2*PI*t)*(1+0.1*cos(30*PI*t))” \

“0.06+0.1+0.1*sin(30*PI*t)” \

“sin(2*PI*t)*(1+0.1*cos(30*PI*t))” \

“0.06” 200 | xform -s 1.1 -t 2 0 2 \

-a 4 -ry 90 -i 1

!genbox gray_plastic pedestal_top 8 \

0.5 8 -r 0.08 | xform -t -4 -0.5 \

–4

!genbox gray_plastic pedestal_shaft \

6 16 6 | xform -t -3 -16.5 -3

These lines specify five spheres made from variousmaterials sitting in an arrangement on the pedestal.The first sphere, ball0, is made of the red_plas-ticmaterial and located in the scene at (2,0.5,2) witha radius of 0.5. The pedestal itself is composed of twobeveled boxes made with the Radiance genbox gen-erator program. In addition, we invoke the genwormprogram to create some curly iron rings around thespheres. (You can leave the genworm line out if youwant to skip some typing; also, the backslashes indi-cate line continuations which you can omit if you typeeverything on one line.)

3. Add a traditional light sourceNext, let’s add a traditional light source to the scene

to get our first illuminated glimpse —without IBL—ofwhat the scene looks like. Add the following lines toscene.rad to specify a traditional light source:

# Traditional Light Source

void light lightcolor

0

0

3 10000 10000 10000

lightcolor source lightsource

0

0

4 1 1 1 2

4. Render the scene with traditional lightingIn this step, we’ll create an image of the scene. First,

we need to use the oconv program to process thescene file into an octree file for Radiance to render.Type the following command at the Unix commandprompt:

# oconv scene.rad > scene.oct

The # indicates the prompt, so you don’t need to type it.This will create an octree file scene.oct that can be ren-dered in Radiance’s interactive renderer rview. Next,we need to specify a camera position. This can be doneas command arguments to rview, but to make things

IEEE Computer Graphics and Applications 29

rview -vtv -vp 8 2.5 -1.5 -vd -8 -2.5 1.5 -vu 0 1 0 -vh 60 -vv 40

4 Use your text editor to create the file camera.vp with the camera parameters as the file’s first and only line.

Page 10: HDRI and Image-Based Lighting

simpler, let’s store our camera parameters in a file. Useyour text editor to create the file camera.vp with thecamera parameters as the file’s first and only line (seeFigure 4). In the file, this should be typed as a single line.

These parameters specify a perspective camera (-vtv) with a given viewing position (-vp), direction(-vd), and up vector (-vu) and with horizontal (-vh)and vertical (-vv) fields of view of 60 and 40 degrees,respectively. (The rview text at the beginning of theline is a standard placeholder in Radiance camera files,not an invocation of the rview executable.)

Now let’s render the scene in rview. Type:

# rview -vf camera.vp scene.oct

In a few seconds, you should get an image window sim-ilar to the one in Figure 5. The image shows the sphereson the platform, surrounded by the curly rings, and illu-minated by the traditional light source. The image mightor might not be pleasing, but it certainly looks comput-er generated. Now let’s see if we can make it more real-istic by lighting the scene with IBL.

5. Download a light probe imageVisit the Light Probe Image Gallery at http://www.

debevec.org/Probes and choose a light probe image todownload. The light probe images without concentratedlight sources tend to produce good-quality renders morequickly, so I’d recommend starting with the beach, uffizi,or kitchen probes. Here we’ll choose the beach probe forthe first example. Download the beach_probe.hdr file byshift-clicking or right-clicking “Save Target As...” or “SaveLink As...” and then view it using the Radiance imageviewer ximage:

# ximage beach_probe.hdr

If the probe downloaded properly, a window shouldpop up displaying the beach probe image. While the

window is up, you can click and drag the mouse point-er over a region of the image and then press “=” to re-expose the image to properly display the region ofinterest. If the image didn’t download properly, trydownloading and expanding the all_probes.zip orall_probes.tar.gz archive from the same Web page,which will download all the light probe images and pre-serve their binary format. When you’re done examin-ing the light probe image, press the “q” key in theximagewindow to dismiss the window.

6. Map the light probe image onto theenvironment

Let’s now add the light probe image to our scene bymapping it onto an environment surrounding ourobjects. First, we need to create a new file that willspecify the mathematical formula for mapping thelight probe image onto the environment. Use your texteditor to create the file angmap.cal with the followingcontent (the text between the curly braces is a com-ment that you can skip typing if you wish):

{

angmap.cal

Convert from directions in the world \

(Dx, Dy, Dz) into (u,v) \

coordinates on the light probe \

image

-z is forward (outer edge of sphere)

+z is backward (center of sphere)

+y is up (toward top of sphere)

}

d = sqrt(Dx*Dx + Dy*Dy);

r = if(d, 0.159154943*acos(Dz)/d,0);

u = 0.5 + Dx * r;

v = 0.5 + Dy * r;

This file will tell Radiance how to map direction vec-tors in the world (Dx, Dy, Dz) into light probe imagecoordinates (u, v). Fortunately, Radiance acceptsthese coordinates in the range of zero to one (forsquare images) no matter the image size, making iteasy to try out light probe images of different resolu-tions. The formula converts from the angular map ver-sion of the light probe images in the light probe imagegallery, which differs from the mapping a mirroredball produces. If you need to convert a mirrored-ballimage to this format, HDR Shop has a PanoramicTransformations function for this purpose.

Next, comment out (by adding #’s at the beginningof the lines) the traditional light source in scene.rad thatwe added in step 3:

#lightcolor source lightsource

#0

#0

#4 1 1 1 2

Tutorial

30 March/April 2002

5 The Radiance rview interactive renderer viewing the scene as illuminatedby a traditional light source.

Page 11: HDRI and Image-Based Lighting

Note that these aren’t new lines to add to the file butlines to modify from what you’ve already entered. Now,add the following to the end of scene.rad to include theIBL environment:

# Image-Based Lighting Environment

void colorpict hdr_probe_image

7 red green blue beach_probe.hdr

angmap.cal u v

0

0

hdr_probe_image glow light_probe

0

0

4 1 1 1 0

light_probe source ibl_environment

0

0

4 0 1 0 360

The colorpict sequence indicates the name of thelight probe image and the calculations file to use to mapdirections to image coordinates. The glow sequencespecifies a material property comprising the light probeimage treated as an emissive glow. Finally, the sourcespecifies the geometry of an infinite sphere mapped withthe emissive glow of the light probe. When Radiance’srays hit this surface, their illumination contribution willbe taken to be the light specified for the correspondingdirection in the light probe image.

Finally, because we changed the scene file, we need toupdate the octree file. Run oconvonce more to do this:

# oconv scene.rad > scene.oct

7. Render the scene with IBLLet’s now render the scene using IBL. Enter the fol-

lowing command to bring up a rendering in rview:

# rview -ab 1 -ar 5000 -aa 0.08 –ad \

128 -as 64 -st 0 -sj 1 -lw 0 -lr \

8 -vf camera.vp scene.oct

Again, you can omit the backslashes if you type thewhole command as one line. In a few moments, youshould see the image in Figure 6 begin to take shape.Radiance is tracing rays from the camera into the scene,as Figure 7 illustrates. When a ray hits the environment,it takes as its pixel value the corresponding value in thelight probe image. When a ray hits a particular point onan object, Radiance calculates the color and intensity ofthe incident illumination (also known as irradiance) onthat point by sending out a multitude of rays (in this case192 of them) in random directions to quantify the lightarriving at that point on the object. Some of these rayswill hit the environment, and others will hit other partsof the object, causing Radiance to recurse into comput-ing the light coming from this new part of the object.After Radiance computes the illumination on the object

point, it calculates the light reflected toward the cam-era based on the object’s material properties and thisbecomes the pixel value of that point of the object.Images calculated in this way can take a while to ren-der, but they produce a faithful rendition of how the cap-tured illumination would illuminate the objects.

The command-line arguments to rview tell Radiancehow to perform the lighting calculations. The -ab 1indicates that Radiance should produce only one ambi-ent-bounce recursion in computing the object’s illumi-nation—more accurate simulations could be producedwith a value of 2 or higher. The -ar and -aa set the res-olution and accuracy of the surface illumination calcu-lations, and the -ad and -as set the number of raystraced out from a surface point to compute its illumina-

IEEE Computer Graphics and Applications 31

IBL environment

Surface point being shaded

Rays samplingthe incidentillumination

Rays occludedfrom directlyhitting theenvironment

6 The spheres on the pedestal illuminated by the beach light probe imagefrom Figure 3.

7 How Radiance traces rays to determine the incident illumination on asurface from an IBL environment.

Page 12: HDRI and Image-Based Lighting

tion. The -st, -sj, -lw, and -lr specify how the raysshould be traced for glossy and shiny reflections. Formore information on these and more Radiance parame-ters, see the reference guide on the Radiance Web site.

When the render completes, you should see an imageof the objects as illuminated by the beach lighting envi-ronment. The synthetic steel ball reflects the environ-ment and the other objects directly. The glass ball bothreflects and refracts the environment, and the diffuse

white ball shows subtle shading, which is lightertoward the sunset and darkest where the ball contactsthe pedestal. The rough specular reflections in the redand gold balls appear somewhat speckled in this medi-um-resolution rendering; the reason is that Radiancesends out just one ray for each specular sample(regardless of surface roughness) rather than the muchgreater number it sends out to compute the diffuse illu-mination. Rendering at a higher resolution and filter-ing the image down can alleviate this effect.

We might want to create a particularly high-qualityrendering using the command-line rpict renderer,which outputs the rendered image to a file. Run the fol-lowing rpict command:

# rpict -x 800 -y 800 -t 30 -ab 1 – \

ar 5000 -aa 0.08 -ad 128 -as 64 – \

st 0 -sj 1 -lw 0 -lr 8 -vf \

camera.vp scene.oct > render.hdr

The command-line arguments to rpict are identi-cal to rview except that one also specifies the maxi-mum x and y resolutions for the image (here, 800 × 800pixels) as well as how often to report back on the ren-dering progress (here, every 30 seconds.) On an 800-MHz computer, this should take approximately 10minutes. When it completes, we can only view the ren-dered output image with the ximage program. To pro-duce high-quality renderings, you can increase the x andy resolutions to high numbers, such as 3,000 × 3,000pixels and then filter the image down to produce anantialiased rendering. We can perform this filteringdown by using either Radiance’s pfilt command or theHDR Shop. To filter a 3,000 × 3,000 pixel image down to1,000 × 1,000 pixels using pfilt, enter:

# pfilt -1 -x /3 -y /3 -r 1 \

render.hdr > filtered.hdr

I used this method for the high-quality renderingsin this article. To render the scene with different light-ing environments, download a new probe image,change the beach_probe.hdr reference in the scene.radfile, and call rview or rpict once again. Light probeimages with concentrated light sources such as graceand stpeters will require increasing the -ad and -assampling parameters to the renderer to avoid mottledrenderings. Figure 8 shows renderings of the objectsilluminated by the light probes in Figure 2. Each ren-dering shows different effects of the lighting, from theparticularly soft shadows under the spheres in theovercast Uffizi environment to the focused pools oflight from the stained glass windows under the glassball in the Grace Cathedral environment.

Advanced IBLThis tutorial has shown how to illuminate synthetic

objects with measurements of real light, which canhelp the objects appear as if they’re actually in a real-world scene. We can also use the technique to lightlarge-scale environments with captured illuminationfrom real-world skies. Figure 9 shows a computer

Tutorial

32 March/April 2002

8 The objectsilluminated bythe kitchen,eucalyptusgrove, UffiziGallery, andGrace Cathedrallight probeimages in Figure2.

Page 13: HDRI and Image-Based Lighting

model of a virtual environment of the Parthenon illu-minated by a real-world sky captured with high dynam-ic range photography.

We can use extensions of the basic IBL technique inthis article to model illumination emanating from a geo-metric model of the environment rather than from aninfinite sphere of illumination and to have the objectscast shadows and appear in reflections in the environ-ment. We used these techniques3 to render various ani-mated synthetic objects into an image-based model ofSt. Peter’s Basilica for the Siggraph 99 film Fiat Lux, (seeFigure 10). (You can view the full animation at http://www.debevec.org/FiatLux/.)

Some more recent work7 has shown how to use IBLto illuminate real-world objects with captured illumi-nation. The key to doing this is to acquire a large set ofimages of the object as illuminated by all possible light-ing directions. Then, by taking linear combinations ofthe color channels of these images, images can be pro-duced showing the objects under arbitrary colors andintensities of illumination coming simultaneously fromall possible directions. By choosing the colors andintensities of the incident illumination to correspond tothose in a light probe image, we can show the objectsas they would be illuminated by the captured lightingenvironment, with no need to model the objects’ geom-etry or reflectance properties. Figure 11 shows a col-lection of real objects illuminated by two of the lightprobe images from Figure 2. In these renderings, weused the additional image-based technique of envi-ronment matting8 to compute high-resolution refrac-tions and reflections of the background image throughthe objects.

ConclusionIBL lets us integrate computer-generated models

into real-world environments according to the princi-ples of global illumination. It requires a few specialpractices for us to apply it, including taking omnidi-rectional photographs, recording images in highdynamic range, and including measurements of inci-dent illumination as sources of illumination in com-

puter-generated scenes. After some experimentationand consulting the Radiance reference manual, youshould be able to adapt these examples to your ownscenes and applications. With a mirrored ball and a dig-ital camera, you should be able to acquire your ownlighting environments as well. For more information,please explore the course notes for the Siggraph 2001IBL course at http://www.debevec.org/IBL2001.Source files and more image-based lighting examplesare available at http://www.debevec.org/CGAIBL. �

IEEE Computer Graphics and Applications 33

9 A computer model of the ruins of the Parthenon as illuminated just aftersunset by a sky captured in Marina del Rey, California. Modeled by BrianEmerson and Yikuong Chen and rendered using the Arnold global illumina-tion system.

10 A rendering from the Siggraph 99 film Fiat Lux,which combined image-based modeling, rendering,and lighting to place monoliths and spheres into aphotorealistic reconstruction of St. Peter’s Basilica.

11 Real objectsilluminated bythe Eucalyptusgrove andGrace Cathedrallighting envi-ronments fromFigure 2.

Page 14: HDRI and Image-Based Lighting

References1. J.F. Blinn, “Texture and Reflection in Computer Generated

Images,” Comm. ACM, vol. 19, no. 10, Oct. 1976, pp. 542-547.2. G.S. Miller and C.R. Hoffman, “Illumination and Reflection

Maps: Simulated Objects in Simulated and Real Environ-ments,” Proc. Siggraph 84, Course Notes for Advanced Com-puter Graphics Animation, ACM Press, New York, 1984.

3. P. Debevec, “Rendering Synthetic Objects Into Real Scenes:Bridging Traditional and Image-Based Graphics with Glob-al Illumination and High Dynamic Range Photography,”Computer Graphics (Proc. Siggraph 98), ACM Press, NewYork, 1998, pp. 189-198.

4. N. Greene, “Environment Mapping and Other Applicationsof World Projections,” IEEE Computer Graphics and Appli-cations, vol. 6, no. 11, Nov. 1986, pp. 21-29.

5. P.E. Debevec and J. Malik, “Recovering High DynamicRange Radiance Maps from Photographs,” ComputerGraphics (Proc. Siggraph 97), ACM Press, New York, 1997,pp. 369-378.

6. G. Ward, “Real Pixels,” Graphics Gems II, J. Arvo, ed., Aca-demic Press, Boston, 1991, pp. 80-83.

7. P. Debevec et. al, “Acquiring the Reflectance Field of aHuman Face,” Computer Graphics (Proc. Siggraph 2000),ACM Press, New York, 2000, pp. 145-156.

8. D.E. Zongker et. al, “Environment Matting and Composit-ing,” Computer Graphics (Proc. Siggraph 99), ACM Press,New York, 1999, pp. 205-214.

Paul Debevec is an executive pro-ducer at the University of SouthernCalifornia’s Institute for CreativeTechnologies, where he directsresearch in virtual actors, virtualenvironments, and applying com-puter graphics to creative projects.

For the past five years, he has worked on techniques forcapturing real-world illumination and illuminating syn-thetic objects with real light, facilitating the realistic inte-gration of real and computer-generated imagery. He hasa BS in math and a BSE in computer engineering from theUniversity of Michigan and a PhD in computer science fromUniversity of California, Berkeley. In August 2001, hereceived the Significant New Researcher Award from ACMSiggraph for his innovative work in the image-based mod-eling and rendering field. He is a member of ACM Siggraphand the Visual Effects Society, and is a program cochairfor the 2002 Eurographics Workshop on Rendering.

Readers may contact Paul Debevec at USC/ICT, 13274Fiji Way, 5th Floor, Marina Del Rey, CA 90292, [email protected].

For further information on this or any other computingtopic, please visit our Digital Library at http://computer.org/publications/dlib.

Tutorial

34 March/April 2002

Page 15: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 1

HDRI and Image-Based LightingHDRI and Image-Based Lighting

Monday, July 28, 200310:30-12:15

www.debevec.org/IBL2003

Monday, July 28, 200310:30-12:15

www.debevec.org/IBL2003

Paul DebevecUSC ICT

Paul DebevecUSC ICT

SIGGRAPH 2003 Course #19SIGGRAPH 2003 Course #19

Dan LemmonWETA FX

Dan LemmonWETA FX

Greg WardAnyhere SoftwareGreg WardAnyhere Software

What is Image-Based Lighting?What is Image-Based Lighting?

Page 16: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 2

Real-World HDR Lighting Environments

Lighting Environments from Debevec98:http://www.debevec.org/Probes/Lighting Environments from Debevec98:http://www.debevec.org/Probes/

FunstonBeach

UffiziGallery

EucalyptusGrove

GraceCathedral

Page 17: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 3

Illuminating Objects using Measurements of Real LightIlluminating Objects using Measurements of Real Light

ObjectObject

LightLight

http://radsite.lbl.gov/radiance/http://radsite.lbl.gov/radiance/See also: Larson and Shakespeare, “Rendering with Radiance”, 1998See also: Larson and Shakespeare, “Rendering with Radiance”, 1998

Environment assigned “glow”

material property in

Greg Larson’s RADIANCE

system.

Environment assigned “glow”

material property in

Greg Larson’s RADIANCE

system.

Page 18: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 4

High-Dynamic Range PhotographyHigh-Dynamic Range Photography

300,000 : 1300,000 : 1

Debevec and Malik, SIGGRAPH 97 Visualization: Greg Ward

Panoramic (Omnidirectional) PhotographyPanoramic (Omnidirectional) Photography

Page 19: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 5

Arnold Rendering

Global Illumination

Course OverviewCourse Overview10:30 Introduction10:40 Greg Ward

- Global illumination overview- HDR Image Formats

11:05 Paul Debevec- Capturing real-world illumination- Illuminating synthetic objects with real light- Rendering synthetic objects into real scenes

11:50 Dan Lemmon- HDRI and IBL in Production

12:15 End

10:30 Introduction10:40 Greg Ward

- Global illumination overview- HDR Image Formats

11:05 Paul Debevec- Capturing real-world illumination- Illuminating synthetic objects with real light- Rendering synthetic objects into real scenes

11:50 Dan Lemmon- HDRI and IBL in Production

12:15 End

www.debevec.org/IBL2003

Page 20: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 6

Global Illumination and High Dynamic Range Image File Formats

Global Illumination and High Dynamic Range Image File Formats

Greg WardAnyhere Software

Greg WardAnyhere Software

Capturing Real-World Illumination

Capturing Real-World Illumination

Page 21: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 7

Dynamic Range in the Real WorldDynamic Range in the Real World

1500

1

25,000

400,000

2,000,000,000

The real world ishigh dynamic range.

Ways to vary exposureWays to vary exposure

Shutter Speed

F/stop (aperture, iris)

Neutral Density (ND) Filters

Shutter Speed

F/stop (aperture, iris)

Neutral Density (ND) Filters

Page 22: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 8

www.debevec.org/HDRShop

Chris Tchou et al. HDR Shop. S2001 Technical Sketch

Methods for taking omnidirectional HDR imagesMethods for taking omnidirectional HDR images

Mirrored ball + cameraFisheye lens imagesPanoramic cameraStitching images together

Mirrored ball + cameraFisheye lens imagesPanoramic cameraStitching images together

Page 23: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 9

Mirrored Ball -Records light in all directionsMirrored Ball -Records light in all directions

Brightest regions are saturated

Intensity and colorinformation lost

Brightest regions are saturated

Intensity and colorinformation lost

kitchen scenekitchen scene

HDR Image of aMirrored BallHDR Image of aMirrored Ball

Assembled from ten digital images,∆ t = 1/4 to 1/10000 secAssembled from ten digital images,∆ t = 1/4 to 1/10000 sec

(60,40,35)(60,40,35)(18,17,19)(18,17,19)

(5700,8400,11800)(5700,8400,11800)(620,890,1300)(620,890,1300)(11700,7300,2600)(11700,7300,2600)

Page 24: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 10

Sources of Mirrored BallsSources of Mirrored Balls

2-inch chrome balls ~ $20 ea.McMaster-Carr Supply Companywww.mcmaster.com

6-12 inch large gazing ballsBaker’s Lawn Ornamentswww.bakerslawnorn.com

Hollow Spheres, 2in – 4inDube Juggling Equipmentwww.dube.com

FAQ on www.debevec.org/HDRShop

2-inch chrome balls ~ $20 ea.McMaster-Carr Supply Companywww.mcmaster.com

6-12 inch large gazing ballsBaker’s Lawn Ornamentswww.bakerslawnorn.com

Hollow Spheres, 2in – 4inDube Juggling Equipmentwww.dube.com

FAQ on www.debevec.org/HDRShop

Page 25: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 11

0.34 0.34

0.580.58

59% Reflective59% Reflective

Need to Measure Mirrored Sphere Reflectivity

Need to Measure Mirrored Sphere Reflectivity

Capturing HDR Outdoor Lighting with LDR ImagesCapturing HDR Outdoor Lighting with LDR Images

Page 26: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 12

Fisheye ImagesFisheye Images

Types of Omnidirectional ImagesTypes of Omnidirectional Images

Mirrored Ball Angular Map

Page 27: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 13

Types of Omnidirectional ImagesTypes of Omnidirectional Images

Latitude/Longitude

Cube Map

Illuminating Synthetic Objects with Real Light

Illuminating Synthetic Objects with Real Light

Page 28: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 14

IBL TutorialIBL Tutorial

In Jan/Feb Computer Graphics and Applications and the SIGGRAPH 2002 IBL Course Notes

In Jan/Feb Computer Graphics and Applications and the SIGGRAPH 2002 IBL Course Notes

Illuminating Objects using Measurements of Real LightIlluminating Objects using Measurements of Real Light

ObjectObject

LightLight

http://radsite.lbl.gov/radiance/http://radsite.lbl.gov/radiance/See also: Larson and Shakespeare, “Rendering with Radiance”, 1998See also: Larson and Shakespeare, “Rendering with Radiance”, 1998

Environment assigned “glow”

material property in

Greg Larson’s RADIANCE

system.

Environment assigned “glow”

material property in

Greg Larson’s RADIANCE

system.

Page 29: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 15

Paul Debevec. A Tutorial on Image-Based Lighting. IEEE Computer Graphics and Applications, Jan/Feb 2002.

Page 30: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 16

{angmap.cal Convert from directions in the world to coordinates on the angular sphere image

-z is forward (outer edge of sphere)+z is backward (center of sphere)+y is up (toward top of sphere)}

norm = 1/sqrt(Py*Py + Px*Px + Pz*Pz);DDy = Py*norm;DDx = Px*norm;DDz = Pz*norm;

r = 0.159154943*acos(DDz)/sqrt(DDx*DDx + DDy*DDy);

u = 0.5 + DDx * r;v = 0.5 + DDy * r;

Light Probe Coordinate Mapping

# Lighting Environment# specify the probe image and how it is mapped onto# geometry

void colorpict hdr_env7 red green blue rnl_probe.hdr angmap.cal u v00

# specify a "glow" material that will use this image hdr_env glow env_glow 0 0 4 1 1 1 0

# specify a large inward-pointing box for the HDR envir.!genbox env_glow box 500 500 500 -i | xform -t -250 -18 -250

Putting the probe onto the sphere

Page 31: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 17

!genrev exmat torus '-cos(2*PI*t)' '2-sin(2*PI*t)' 50 -s | xform -s 0.3 -ry 340 -rx 310

!echo exmat cylinder spike1 0 0 7 2 0 0 2 0 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

!echo exmat cylinder spike2 0 0 7 0 2 0 0 2 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

!echo exmat cylinder spike3 0 0 7 -2 0 0 -2 0 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

!echo exmat cylinder spike4 0 0 7 0 -2 0 0 -2 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

!echo exmat sphere cap1 0 0 4 2 0 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

!echo exmat sphere cap2 0 0 4 -2 0 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

!echo exmat sphere cap3 0 0 4 0 2 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

!echo exmat sphere cap4 0 0 4 0 -2 2.5 0.2 | xform -s 0.3 -ry 340 -rx 310

Specifying the Geometry

Illumination ResultsIllumination Results

Page 32: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 18

Comparison: Radiance map versus single imageComparison: Radiance map versus single image

MakingRendering with Natural Light

MakingRendering with Natural Light

SIGGRAPH 98 Electronic Theater

Page 33: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 19

Acquiring the Light ProbeAcquiring the Light Probe

Assembling the Light ProbeAssembling the Light Probe

Page 34: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 20

RNL Environment mapped onto

interior of large cube

Page 35: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 21

http://www.daionet.gr.jp/~masa/

Masaki Kawase DirectX 9 DemoMasaki Kawase DirectX 9 Demo

www.debevec.org/RNL

Page 36: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 22

“LightGen” by Jon Cohen et al. at www.debevec.org/HDRShop

Supports Maya, RADIANCE, Mental Ray, Lightwave

Rendering CausticsRendering Caustics

Page 37: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 23

Arnold Rendering in the Uffizi Gallery courtesy ofGary Butcher andMarcos Fajardo

Arnold Rendering in the Uffizi Gallery courtesy ofGary Butcher andMarcos Fajardo

Arnold Rendering in the Kitchen Scene courtesy ofGary Butcher andMarcos Fajardo

Arnold Rendering in the Kitchen Scene courtesy ofGary Butcher andMarcos Fajardo

Page 38: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 24

Outdoor Light ProbesOutdoor Light Probes

Page 39: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 25

24 Samples per Pixel – 6h, 22min

Page 40: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 26

24 Samples per Pixel – 6h, 22min

Brian Emerson’s model of the Duveen Gallery in the British Museum.

Page 41: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 27

Tone MappingAlgorithmsTone MappingAlgorithmsImages and Video Tuesday, 23 July 8:10 - 10:15 am Ballroom C1 & C2

Gradient Domain High Dynamic Range Compression

Raanan Fattal, Dani Lischinski, Michael Werman

Fast Bilateral Filtering for the Display of High Dynamic Range Images

Frédo Durand and Julie Dorsey

Photographic Tone Reproduction for Digital Images

Erik Reinhard, Michael Stark, Peter Shirley, James Ferwerda

Images and Video Tuesday, 23 July 8:10 - 10:15 am Ballroom C1 & C2

Gradient Domain High Dynamic Range Compression

Raanan Fattal, Dani Lischinski, Michael Werman

Fast Bilateral Filtering for the Display of High Dynamic Range Images

Frédo Durand and Julie Dorsey

Photographic Tone Reproduction for Digital Images

Erik Reinhard, Michael Stark, Peter Shirley, James Ferwerda

Real-Time Image-Based Lighting!Real-Time Image-Based Lighting!

Homomorphic Factorizationof BRDF-Based LightingComputation

Lutz Latta, Andreas Kolb,SIGGRAPH2002

Frequency Space Environment Map RenderingRavi Ramamoorthi, Pat Hanrahan, SIGGRAPH2002

Precomputed Radiance Transfer for Real-Time Rendering in Dynamic, Low-Frequency Lighting Environments

Peter-Pike Sloan, Jan Kautz, John Snyder, SIGGRAPH2002

Homomorphic Factorizationof BRDF-Based LightingComputation

Lutz Latta, Andreas Kolb,SIGGRAPH2002

Frequency Space Environment Map RenderingRavi Ramamoorthi, Pat Hanrahan, SIGGRAPH2002

Precomputed Radiance Transfer for Real-Time Rendering in Dynamic, Low-Frequency Lighting Environments

Peter-Pike Sloan, Jan Kautz, John Snyder, SIGGRAPH2002

Page 42: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 28

RNL in Real Time!RNL in Real Time!

Rendered in Real Time on ATI RADEON™ 9700Rendered in Real Time on ATI RADEON™ 9700

Rendering Synthetic Objects into Real Scenes

Rendering Synthetic Objects into Real Scenes

Page 43: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 29

Compositing Objects into a SceneCompositing Objects into a Scene

Paul Debevec. Rendering Synthetic Objects into Real Scenes: Bridging Traditional and Image-Based Graphics with Global Illumination and High Dynamic Range Photography. SIGGRAPH 98.

Light Probe / Calibration GridLight Probe / Calibration Grid

Page 44: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 30

Rendering into the SceneRendering into the Scene

Objects and Local Scene matched to Scene

Objects and Local Scene matched to Scene

Differential RenderingDifferential Rendering

Local scene w/o objects, illuminated by model

Local scene w/o objects, illuminated by model

Page 45: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 31

Differential Rendering 2Differential Rendering 2

-- ==

Differential Rendering 3Differential Rendering 3

Final ResultFinal Result

Page 46: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 32

Differential RenderingDifferential Rendering

Final ResultFinal Result

IMAGE-BASED LIGHTING IN FIAT LUXPaul Debevec, Tim Hawkins, Westley Sarokin, H. P. Duiker, Christine Cheng, Tal Garfinkel, Jenny Huang

SIGGRAPH 99 Electronic Theater

Page 47: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 33

HDR Image SeriesHDR Image Series

2 sec2 sec 1/4 sec1/4 sec 1/30 sec1/30 sec

1/250 sec1/250 sec 1/2000 sec1/2000 sec 1/8000 sec1/8000 sec

Page 48: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 34

Stp1 PanoramaStp1 Panorama

Assembled PanoramaAssembled Panorama

Page 49: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 35

Processed PanoramaProcessed Panorama

- Completed with paint + probe- Specularities removed- Glare reduced- Flares removed

- Completed with paint + probe- Specularities removed- Glare reduced- Flares removed

Light Probe ImagesLight Probe Images

Page 50: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 36

Interior of St. Peter’s from one Viewpoint

Interior of St. Peter’s from one Viewpoint

Lighting CalculationLighting Calculation

Page 51: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 37

Lighting CalculationLighting Calculation

“illum” light sources

“illum” light sources

Identified Light SourcesIdentified Light Sources

Page 52: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 38

Lighting CalculationLighting Calculation

“Impostor” light sources

“Impostor” light sources

Renderings made with Radiance: http://radsite.lbl.gov/radiance/Renderings made with Radiance: http://radsite.lbl.gov/radiance/

Image-Based Lighting Real Objects and Actors

Image-Based Lighting Real Objects and Actors

Page 53: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 39

Light Stage 1.0Light Stage 1.0

Debevec, Hawkins, Tchou, Duiker, Sarokin, and Sagar. Acquiring the Reflectance Field of a Human Face. SIGGRAPH 2000.

The Light Stage:60-second exposureThe Light Stage:60-second exposure

Page 54: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 40

Light Stage – 4D Reflectance FieldLight Stage – 4D Reflectance Field

Light Stage – 4D Reflectance FieldLight Stage – 4D Reflectance Field

Page 55: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 41

Interactive Lighting DemoChris Tchou, Dan MaasSIGGRAPH 2000 Creative Applications Laboratorywww.debevec.org/FaceDemo

Interactive Lighting DemoChris Tchou, Dan MaasSIGGRAPH 2000 Creative Applications Laboratorywww.debevec.org/FaceDemo

Page 56: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 42

A Lighting Reproduction Approach to Live-Action Compositing

A Lighting Reproduction Approach to Live-Action Compositing

Paul Debevec Andreas Wenger Chris TchouAndrew Gardner Jamie Waese Tim Hawkins

USC Institute for Creative Technologies

Paul Debevec Andreas Wenger Chris TchouAndrew Gardner Jamie Waese Tim Hawkins

USC Institute for Creative Technologies

Page 57: HDRI and Image-Based Lighting

SIGGRAPH 2003 Course #19 - HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 43

HDRI and IBL in Commercial Production

HDRI and IBL in Commercial Production

Dan LemmonWETA FX

Dan LemmonWETA FX

www.debevec.org/IBL2003

Page 58: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 1

Global Illumination& HDRI FormatsGlobal Illumination& HDRI Formats

Greg WardAnyhere Software

Page 59: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 2

Global IlluminationGlobal Illumination

• Accounts for most (if not all) visible light interactions

• Goal may be to maximize realism, but more often “visual reproduction”

• Visible light often outside the range of standard displays and formats–HDRI format is required–HDR display would be nice

GI TechniquesGI Techniques

• Radiosity–Divide surfaces into patches–Compute diffuse light exchange–Final pass can add specular effects

• Ray-tracing–Follow individual light paths each pixel–Monte Carlo sampling for everything–Filter resulting image to reduce noise

Page 60: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 3

Radiosity MethodRadiosity Method1. Subdivide surfaces into patches2. Compute form factor (mutual

visibility) between patch pairs3. Shoot (or gather) radiant flux to

(or from) patches4. Interpolate result and render

image from desired view, adding specular reflections if desired

+ Handles simple, diffuse environments very efficiently

+ Provides a view-independent solution

- Resource problems for complicated environments

- Cannot handle glossy surfaces except via ray-tracing in final pass

Radiosity ExampleRadiosity Example

• Lightscaperendering of SFMOMA from View by View

• Specular effects added in final pass

Page 61: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 4

Ray-tracing MethodRay-tracing Method

1. Trace light paths from a viewpoint2. At each surface, find sources to

compute reflection and transmission3. Compute diffuse interreflection using

Monte Carlo path tracing (unbiased) or irradiance caching (biased)

4. Multiple samples averaged together at each pixel to reduce noise

+ Handles complicated geometry well

+ Supports all surface types

- View-dependent solution

- Can be expensive

Ray-tracing ExampleRay-tracing Example

• Radiancerendering of Mandalay-LuxorRetail Complex from ArupLighting

• Fritted glass on roof partially scatters sunlight

Page 62: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 5

GI and HDRIGI and HDRI

• Traditional CG rendering constrains input to fit within 24-bit RGB gamut

• Global Illumination algorithms attempt to simulate the real world, which has no such constraints–CG rendering parallels TV broadcasting–GI rendering parallels film photography

• What we need is a digital film format

The 24-bit Red Green BluesThe 24-bit Red Green Blues

• Although 24-bit sRGB is reasonably matched to CRT displays, it is a poor match to human vision–People can see twice as many colors–People can see twice the log range

Q: Why did they base a standard on existing display technology?

A: Because signal processing used to be expensive…

Page 63: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 6

24-bit sRGB Space24-bit sRGB Space

Covers roughly half of the visible color gamut

Lost are many of the saturated blue-greens and violets

Dynamic RangeDynamic Range

From Ferwerda et al, SIGGRAPH ‘96

Human simultaneous range

sRGB range

Page 64: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 7

What is HDRI?What is HDRI?

• High Dynamic Range Images have a wider gamut and contrast than 24-bit RGB– Preferably, the gamut and dynamic range

covered exceed those of human vision

Advantage 1: an image standard based on human vision won’t need frequent updates

Advantage 2: floating point pixels open up a vast new world of image processing

Some HDRI FormatsSome HDRI Formats

• Pixar 33-bit log-encoded TIFF• Radiance 32-bit RGBE and XYZE• IEEE 96-bit TIFF & Portable FloatMap• LogLuv TIFF (24-bit and 32-bit)• ILM 48-bit OpenEXR format• Others??

Page 65: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 8

Pixar Log TIFF CodecPixar Log TIFF Codec

Purpose: To store film recorder input• Implemented in Sam Leffler’s TIFF library• 11 bits each of log red, green, and blue• 3.8 orders of magnitude in 0.4% steps• ZIP lossless entropy compression• Does not cover visible gamut• Dynamic range marginal for image

processing

Radiance RGBE & XYZERadiance RGBE & XYZE

Purpose: To store GI renderings• Simple format with free source code• 8 bits each for 3 mantissas + 1 exponent• 76 orders of magnitude in 1% steps• Run-length encoding (20% avg. compr.)• RGBE format does not cover visible gamut• Color quantization not perceptually

uniform• Dynamic range at expense of accuracy

Page 66: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 9

(145, 215, 87, 149) =

(145, 215, 87) * 2^(149-128) =

(1190000, 1760000, 713000)

(145, 215, 87, 149) =

(145, 215, 87) * 2^(149-128) =

(1190000, 1760000, 713000)

Red Green Blue ExponentRed Green Blue Exponent

32 bits / pixel32 bits / pixel

(145, 215, 87, 103) =

(145, 215, 87) * 2^(103-128) =

(0.00000432, 0.00000641, 0.00000259)

(145, 215, 87, 103) =

(145, 215, 87) * 2^(103-128) =

(0.00000432, 0.00000641, 0.00000259)

Ward, Greg. "Real Pixels," in Graphics Gems IV, edited by James Arvo, Academic Press, 1994

Radiance Format(.pic, .hdr)Radiance Format(.pic, .hdr)

IEEE 96-bit TIFF & Portable FloatMapIEEE 96-bit TIFF & Portable FloatMap

Purpose: To minimize translation errors

• Most accurate representation• Files are enormous

–32-bit IEEE floats do not compress well

Page 67: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 10

Portable FloatMap(.pfm)Portable FloatMap(.pfm)• 12 bytes per pixel, 4 for each channel

sign exponent mantissa

PF768 5121<binary image data>

Floating Point TIFF similarFloating Point TIFF similar

Text header similar to Jeff Poskanzer’s .ppmimage format:

24-bit LogLuv TIFF Codec24-bit LogLuv TIFF Codec

Purpose: To match human vision• Implemented in Leffler’s TIFF library• 10-bit LogL + 14-bit CIE (u’,v’)

lookup• 4.8 orders of magnitude in 1.1%

steps• Just covers visible gamut and range• No compression

Page 68: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 11

24 -bit LogLuv Pixel24 -bit LogLuv Pixel

32-bit LogLuv TIFF Codec32-bit LogLuv TIFF CodecPurpose: To surpass human vision• Implemented in Leffler’s TIFF library• 16-bit LogL + 8 bits each for CIE

(u’,v’)• 38 orders of magnitude in 0.3%

steps• Run-length encoding (30% avg.

compr.)• Allows negative luminance values

Page 69: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 12

32-bit LogLuv Pixel32-bit LogLuv Pixel

ILM OpenEXR FormatILM OpenEXR Format

Purpose: HDR lighting and compositing• 16-bit/primary floating point

(sign-e5-m10)• 9.6 orders of magnitude in 0.1% steps• Wavelet compression of about 40%• Negative colors and full gamut RGB• Open Source I/O library released Fall 2002

Page 70: HDRI and Image-Based Lighting

SIGGRAPH 2003 Coure #19, HDRI and Image-Based Lighting

Paul Debevec, Greg Ward, and Dan Lemmon 13

ILM’s OpenEXR(.exr)ILM’s OpenEXR(.exr)• 6 bytes per pixel, 2 for each channel, compressed

sign exponent mantissa

• Several lossless compression options, 2:1 typical• Compatible with the “half” datatype in NVidia's Cg• Supported natively on GeForce FX and Quadro FX

• Available at http://www.openexr.net/

ConclusionsConclusions

• Global Illumination benefits greatly from HDR on input and output

• Good and useful HDRI formats exist• Rendering software and camera

hardware will catch up, eventually• In the meantime, check out

Radiance, Photosphere and HDRshop

Page 71: HDRI and Image-Based Lighting

Reflection Mapping History

The Story of Reflection Mapping(Title inspired by Frank Foster's " The Story of Computer Graphics")

The Quest Begins

Some of the recent graphics research I've been working on builds on the techniques of reflection mapping and environment mapping developed in the late 70's and early 80's. I had a paper about the work at SIGGRAPH 98 ("Rendering Synthetic Objects into Real Scenes") which appears later in

Blinn and Newell 1976

In the paper I referenced reflection mapping using synthetically rendered environment maps as presented by Jim Blinn in 1976:

Blinn, J. F. and Newell, M. E. Texture and reflection in computer generated images. Communications of the ACM Vol. 19, No. 10 (October 1976), 542-547.

I met with Jim Blinn in June 1999 during a visit to Microsoft Research, and by coincidence he was just in the process of resurrecting some old files, including the images from this paper. The first environment-mapped object, quite appropriately, was the Utah Teapot, with a room image made with a paint program (which Blinn wrote) as the environment map:

In the paper, Blinn also included an image of a satellite, environment-mapped with an image of the earth and the sun which he drew, shown below. Note that in both cases the objects are also being illuminated by a traditional light source to create their diffuse appearance.

http://www.debevec.org/ReflectionMapping/

these notes.

Page 72: HDRI and Image-Based Lighting

Reflection Mapping History

More images from Blinn's early environment mapping work may be found here.

What about Photographs?

I was surprised in writing the paper that there didn't seem to be a good reference for using real omnidirectional photographs as reflection maps. The seemed odd, since the technique is in common usage in the computer graphics industry, and was used in creating some of the more memorable movie effects in the 80's and 90's (e.g. the spaceship in Flight of the Navigator (1986), and the metal man in Terminator II (1991)). Furthermore, it can be regarded as one of the earliest forms of image-based rendering. So I've tried to go about figuring out where the technique came from.

The First Renderings

While at SIGGRAPH 98 in Orlando, I talked to Paul Heckbert, Ned Greene, Michael Chou, Lance Williams, and Ken Perlin to try to find out the origin of the technique. The story that took shape was that the technique was developed independently by Gene Miller working with Ken Perlin, and also by Michael Chou working with Lance Williams, around 1982 or 1983. I heard that the first two images in which reflection mapping was used to place objects into scenes were of a synthetic shiny robot standing next to Michael Chou in a garden, and of a reflective blobby dog floating over a parking lot. 

A few months later, with the help of Gene Miller, Lance Williams, and Paul Heckbert, I was able to see both of these images side-by side:

http://www.debevec.org/ReflectionMapping/

Page 73: HDRI and Image-Based Lighting

Reflection Mapping History

A reflection-mapped blobby dog floating in the MAGI parking lot.(Courtesy of Gene Miller)

A reflection-mapped robot standing next to Chou(In hi-res courtesy of Lance Williams)

At NYIT, it was Michael Chou who carried out the very first experiments on using images as reflection maps. For obtaining the reflection image, Chou used a ten-inch "Gazing Ball", which is a shiny glass sphere with a metallic coating on the inside, usually sold as a lawn ornament. Gene Miller used a three-inch Christmas tree ornament, which was held in place by Christine Chang while he took a 35mm photograph of it:

In January 1999, Gene Miller sent over a wealth of information and images about his knowledge of the origin of the technique. Click here to continue on to Gene Miller's stories and images about the development of reflection mapping.

Williams 1983

The Chou and robot image appeared in Lance Williams's 1983 SIGGRAPH paper "Pyramidal

http://www.debevec.org/ReflectionMapping/

Page 74: HDRI and Image-Based Lighting

Reflection Mapping History

Parametrics". The paper introduced MIP-mapping, an elegant pre-filtering scheme for avoiding aliasing in texture-mapping algorithms. MIP-mapping has since been implemented on scores of graphics architectures and is used everywhere from video games to PC graphics to high-end flight simulators. The reflection-mapped robot image was just one example used to demonstrate the technique.

Williams, Lance, "Pyramidal Parametrics," Computer Graphics (SIGGRAPH), vol. 17, No. 3, Jul. 1983 pp. 1-11.

Miller and Hoffman 1984

In talking to Gene Miller, I learned that in December 1982 he and Bob Hoffman submitted a paper on the technique to SIGGRAPH 83 but it was not accepted for publication. However, a revised version of this work appeared in the SIGGRAPH 84 course notes on advanced computer graphics animation:

Gene S. Miller and C. Robert Hoffman. Illumination and Reflection Maps: Simulated Objects in Simulated and Real Environments. Course Notes for Advanced Computer Graphics Animation, SIGGRAPH 84.

Thanks to Gene Miller, these notes can be viewed in HTML and PDF formats.

Noteworthy is that the notes suggest that reflection maps can be used to render diffuse as well as specular objects, and that issues arising from the limited dynamic range of film could be addressed by combining a series of photographs taken with different exposure levels. Both issues were problems I worked to address in my SIGGRAPH 98 paper.

Interface - 1985

In 1985, Lance Williams was part of a team at the New York Institute of Technology that used reflection mapping in a moving scene with an animated CG element. The piece "Interface" featured a young woman kissing a shiny robot. In reality, she was filmed kissing a 10-inch shiny ball, and the reflection map was taken from the reflection of the ball. To make the animation, the reflection map was applied to the robot, and the robot was composited into the scene to replace the ball.

http://www.debevec.org/ReflectionMapping/

Page 75: HDRI and Image-Based Lighting

Reflection Mapping History

QuickTime - "Video" Compressor, 160 by 120, 15fps, 2.4MBQuickTime - "Sorenson" Compressor, 240 by 160, 15fps, 2.6MB

"Interface", courtesy of Lance Williams.

Interface is the first use of photo-based reflection mapping in an animation, and also its first use to help tell a story. The woman quickly kisses the robot and then heads out for the evening. As the silent robot waves goodbye, her reflected image recedes, and you can't help but think that he might have wanted to go along with her.

Interface was also worked on by Carter Burwell and Ned Greene, and the actress was Ginevra Walker. Carter Burwell later composed music for feature films such as Raising Arizona, Miller's Crossing, The Hudsucker Proxy, and Barton Fink.

Lance Williams shortly thereafter added reflection mapping (as well as texture, bump, and transparency mapping) to Pacific Data Images' renderer, which was used to create Jose Dias' "Globo" reflection mapping images.

Flight of the Navigator - 1986

The first feature film to use the technique was Randal Kleiser's Flight of the Navigator in 1986. Bob Hoffman was part of the effects team that rendered a CG shiny spaceship flying over and reflecting airports, fields, and oceans. The technique was recently revisited to render the reflective Naboo spacecraft in Star Wars: Episode I.

http://www.debevec.org/ReflectionMapping/

Page 76: HDRI and Image-Based Lighting

Reflection Mapping History

Greene 1986

Also in 1986, Ned Greene published a paper further developing and formalizing the technique of reflection mapping. In particular, he showed that environment maps could be pre-filtered and indexed with summed-area tables in order to perform a good approximation to correct anti-aliasing. Greene combined a real 180-degree fisheye image of the sky with a computer-generated image of desert terrain to create a full-view environment cube.

Ned Greene. Environment Mapping and Other Applicationsof World Projections. IEEE Computer Graphics and Applications,Vol 6. No. 11. Nov. 1986.

In this paper, Greene constructed an environment map using a photograph of the sky, and a rendering of the ground. In the rendering on the right, the map was re-warped to directly render the environment as well as to environment-map the ship.

http://www.debevec.org/ReflectionMapping/

A still from Randal Kleiser's 1986 film Flight of the Navigator,demonstrating reflection mapping in a feature film.

Image courtesy of Bob Hoffman.

Page 77: HDRI and Image-Based Lighting

Reflection Mapping History

Terminator II - 1991

Reflection Mapping made its most visible splash to date in 1991 in a film by James Cameron. Inspired by the use of reflection mapping (as well as shape morphing) in "Flight of the Navigator", Cameron used the technique to create the amazing look of the T1000 robot in "Terminator II".

Haeberli and Segal 1993

In 1993, Paul Haeberli and Mark Segal published a wonderful review of innovative uses of texture-mapping. Reflection mapping was one such application, and they demonstrated the technique by applying a mirrored ball image taken in a cafe to a torus shape.

http://www.debevec.org/ReflectionMapping/

Page 78: HDRI and Image-Based Lighting

Reflection Mapping History

A reflection mapping still from Haeberli and Segal, 1993.

Paul Haeberli and Mark Segal. Texture Mapping as a Fundamental Drawing Primitive. Fourth Eurographics Workshop on Rendering. June 1993, pp. 259-266.

The full paper is available at Paul Haeberli's delightful Graphica Obscura website.

Paul Debevec / [email protected] http://www.debevec.org/ReflectionMapping/

Page 8

Page 79: HDRI and Image-Based Lighting

Page 1

Illumination and Reflection Maps:Simulated Objects in

Simulated and Real Environments

Gene S. MillerMAGI Synthavision3 Westchester Plaza

Elmsford, New York 10523

C. Robert Hoffman 3Digital Effects

321 West 44th StreetNew York, New York 10036

23 Jul 1984Course Notes for

Advances Computer Graphics AnimationSIGGRAPH 84

Abstract

Blinn and Newell introduced reflection maps for computer simulatedmirror highlights. This paper extends their method to cover awider class of reflectance models. Panoramic images of real,painted and simulated environments are used as illumination mapsthat are convolved (blurred) and transformed to create reflectionmaps. These tables of reflected light values are used toefficiently shade objects in an animation sequence. Shaders basedon point illumination may be improved in a straightforward mannerto use reflection maps. Shading is by table-lookup, and thenumber of calculations per pixel is constant regardless of thecomplexity of the reflected scene. Antialiased mapping furtherimproves image quality. The resulting pictures have many of thereality cues associated with ray-tracing but at greatly reducedcomputational cost. The geometry of highlights is less exact thanin ray-tracing, and multiple surface reflections are notexplicitly handled. The color of diffuse reflections can berendered more accurately than in ray-tracing.

CR Categories and Subject Descriptors:I.3.7 [Computer Graphics]: Three-dimensional Graphics and

Realism - Color, shading, shadowing and texture;I.3.3 [Computer Graphics]: Picture/Image Generation:

digitizing and scanning, display algorithms;I.1 [Data]: Data Structures: tables

General Terms: Algorithms, Design

Additional key words and phrases: computer graphics, computeranimation, shading, reflectance, illumination.

Page 80: HDRI and Image-Based Lighting

Page 2

1. INTRODUCTION

The conventional point source lighting model [7] is used forefficient shading of simulated scenes, but it limits the kinds ofscenes that can be rendered realistically by computer. This isbecause it does not adequately model the effects of area lightsources (e.g. fluorescent lamps) and of objects in theenvironment, (i.e. the sky) that act as secondary light sources[16,19]. This is particularly noticeable on shiny surfaces.

A more realistic lighting model is also necessary whencomputer simulated objects are optically [17] or digitally matted[15] into photographs of real scenes. The lighting on a simulatedobject must be consistent with the real environment to create theillusion that it is actually in the scene.

A complete lighting model must account for all of the lightthat arrives at a surface which is directed towards the viewer.Blinn [2,5] obtained realistic mirror highlights by mapping thedetailed reflection of complex environments. Whitted [25]provided a more accurate but slower solution for mirrorhighlights.

This paper presents an efficient and uniform framework formodeling light for realistic scene simulation. The idea of theillumination map is introduced -- a panoramic image of theenvironment that describes all the light incident at a point.Since the illumination map is an image, it can be created,manipulated and stored by conventional optical and digital imageprocessing methods. Specific photographic and digital techniquesare described.

The concept of reflection map is introduced. The shaderlooks up reflected light values in tables to model the appearanceof specific materials under specific lighting conditions. Thesemaps are obtained by blurring the illumination maps.

The resulting pictures have many of the reality cuesassociated with ray-tracing but at considerably less computationalcost. The geometry of highlights is less exact than in ray-tracing, and multiple surface reflections are not explicitlyhandled. The color of diffuse reflections can be rendered moreaccurately than in ray-tracing.

2. HISTORICAL OVERVIEW

This section discusses three major illumination models. Itconcludes with a description of a real-time shader based on table-lookup.

2.1 Point Sources IlluminationThe intensity calculation in Phong's shader [8] employs a

finite number of point light sources at infinite distance.Intensity at a point on a surface is:

ls ls

I = Ia + kd Σ (N . Lj) + Σ W(N . Lj)(E . Mj)**n j=l j=l

where

Page 81: HDRI and Image-Based Lighting

Page 3

I = reflected intensity for the surfaceIa = reflection due to ambient lightkd = diffuse reflection constantls = the number of point light sourcesN = unit surface normalLj = the vector in the direction of the

jth light sourceW = a function which gives the specular reflectance

as a function of the angle of incidenceE = the direction of the viewerMj = the direction of the mirror reflection from the

jth light source = 2(N . Lj)N - Ljn = an exponent that depends on the

glossiness of the surface.

The number of calculations per point is proportional to the numberof light sources. Phong shading is most realistic when thesimulated environment is mostly one color (e.g. the black of outerspace) or when surfaces are not too glossy. It does not deal withindirect lighting.

2.2 Ray TracingWhitted [25] presents a simple and general method that

realistically simulates mirror highlights as well as shadows,transparency and multiple reflections. The intensity of reflectedlight is:

nj

I = Ia + kd Σ (N . Lj) + ks S j=l

where

ks = the specular reflection coefficientS = the intensity of light incident

from the reflected direction.

The cost of calculating S increase with the complexity ofthe environment, and ray-traced pictures are usually more costlythan Phong shaded ones.

Since this method yields geometrically exact mirrorhighlights, the reflected environment for an object can bearbitrarily close to the object without introducing errorsencountered with the illumination map method. Ray tracing isaccurate for most kinds of scenes, and the results often lookphotographic. It does not deal, however with diffuse reflectionof indirect light sources.

2.3 Mirror Highlights by Table Look-upBlinn [2,5] simulates the mirror highlights on an object by

using polar angles of the reflection direction as indices to apanoramic map of the environment. The intensity of reflectedlight at a point is given by a formula similar to the one used forray tracing.

Page 82: HDRI and Image-Based Lighting

Page 4

This map represents the light intensity for all indirect anddirect area light sources as seen from a single point. For thisreason, the results are approximate; features of the environmentthat are very close to the object are not correctly distorted atall points in the object. In addition, the object can not reflectparts of itself. However, for curved surfaces and restrictedmotion, these errors are not usually noticed, and the effect isrealistic. The method is relatively fast but memory intensive.

Max [18] successfully applied a variation of this methodthat allows for self-reflection.

2.4 Video Lookup of Reflected Light ValuesBlinn [6] and Sloan [23] present a method for real-time

shading by using video lookup tables. Phong model intensity iscomputed for 256 different normal directions and the results arestored in the video lookup table. An image of the object isstored in a frame buffer as encoded normals, and the shadedpicture is displayed on a video monitor. Lighting andreflectivity parameters can be changed quickly by editing thelookup table, however the resulting images are of low colorresolution.

3. SHADING BY REFLECTION MAPS

The following algorithm illustrates shading from reflectiontables. It creates a motion picture sequence of a simulatedobject in a real or simulated environment. For simplicity, theobject is of a single surface type and the object is assumed notto move far through the environment, but may rotate about itself.The camera is free to move.

(1) establish the environment illumination table I.(2) compute diffuse reflection table D.(3) compute specular reflection table S.(4) FOR every frame(5) FOR every pixel that is of the specified object:(6) determine unit vector N normal to surface.(7) determine unit vector E from surface to eye.(8) determine reflected direction R = 2(E.N)N - E(9) output intensity =

Wd(E.N) D[polar N] + Ws(E.N) S[polar R]

In this algorithm, lines 1 to 3 initialize the tables, and lines4 to 9 loop over animation frames.

At line 1, a panoramic image of the environment is created(see section 5). The viewpoint should be chosen so that thelighting at that location is representative of the object, e.g.,the object's center. The image is transformed and stored inillumination table I which is indexed by the polar coordinates ofdirection (see section 4).

In lines 2 and 3 table I is convolved to produce tables Dand S which are indexed by encoded directions. D, the diffusereflection map, is the convolution or blurring of the illuminationtable with a diffuse reflection function. S, the specularreflection map, is the convolution of the illumination table witha specular reflection function (see section 6).

Page 83: HDRI and Image-Based Lighting

Page 5

Lines 6 to 9 are executed for every pixel that representsthe object of interest. Lines 6 to 8 are normally provided byconventional Phong shading.

In statement 9, vectors N and R are converted to polarcoordinates which index tables D and S respectively. (Squarebrackets [] are used here to signify indexing.) Reflected lightvalues are obtained by table lookup, with optional bi-linearinterpolation and antialiasing. Functions Wd and Ws are used toscale the diffuse and specular reflectance as a function ofviewing angle. (See Sections 7 and 8.)

4. DATA REPRESENTATION AND SPHERICAL MAPPINGS

This section considers several ways of representingenvironmental and reflected light.

The environmental light viewed from a point is characterizedas a mapping of all view directions that are points on the unitsphere into color triplets that represent the red, green and bluelight intensity from each direction. The diffuse component ofreflected light is assumed to be a function of surface normals,and is a mapping of the unit sphere (normal directions) into colortriplets that represent reflected intensity. Likewise, for thespecular component of reflected light and the mirror reflectiondirection.

These mappings can then be stored as tables of colortriplets that are indexed by discrete polar coordinates, eachrepresenting a small area on the sphere.

For simplicity and accuracy in interpolation andintegration, it is desirable to have adjacent points on the sphererepresented by adjacent indices: i.e. to have a continuoustransformation. The higher derivatives should also be continuous.It is also desirable, though not possible, to have all indicesrepresent equal areas on the sphere. This is the classiccartographic Problem: mapping a sphere onto a plane [10].

Described below are three kinds of spherical projection.Data can be transformed from one projection to another by imagemapping [2,9,13].

4.1 Perspective Projection onto Cube FacesThis projection is used in the preparation of illumination

maps of simulated environments and is the usual picture output ofmost scene-rendering systems. Place the eye at the center of thesphere and project the sphere onto the six faces of the unit cube.The front face is specified by z>|x|, z>|y|, and is mapped by

u = y/Zv = x/Z

The mapping is similar for the other five faces.For the front face, the area of the sphere represented by

each sample point is proportional to 1/z**2 = 1 + u**2 + v**2.Thus, the resolution at the center of each face is effectivelyone-third the resolution at the corners.

4.2 Orthographic Projection

Page 84: HDRI and Image-Based Lighting

Page 6

Each hemisphere is projected onto the xy plane. In thismapping,

u = xv = y

and there are two map arrays: one for the z >= 0 hemisphere, onefor the z < 0 hemisphere.

This is how the normal component of mirror reflection isprojected onto a photographic image of a mirrored sphere (seesection 5.1).

The area on the sphere represented by each sample point isproportional to sqrt(1 - u**2 - v**2) = 1/z. Thus, the vicinity ofthe equator is severely under-sampled in the radial direction.

4.3 Polar CoordinatesIllumination data obtained in the two previous projections

is transformed into polar coordinates for Illumination maps. Thissimplifies the interpolation and integration of light values. Thenorth pole is identified with the y direction.

u = longitude arctan(x,z)v = latitude arccos y

The area on the sphere represented by each sample point isproportional to sin(v) = sqrt(l - z**2). Thus, the vicinity ofthe poles is over-sampled in the u direction.

5. CREATING THE ILLUMINATION MAP

The first step in our method is the creation of theillumination map. The illumination map may be of real, simulated,or painted environments.

About 24 bits of precision are required for the realisticsimulation of natural scenes. This is because the ratio of theintensity of the sun to that of the darkest observable point isabove 1,000,000:1 on a sunny day. Although this dynamic range isnot re reducible for film and video output, is important that itbe available for accurate blurring and antialiasing.

5.1 Real EnvironmentsWhen a simulated object is to be matted into a real

environment, a representative location is selected and aconventional photograph made from that place. Two schemes arepossible

1. Photograph the environment in six directions using a flatfield lens with a 90-degree field of view to simulateprojection onto a cube. The six pictures must be mosaicedinto one seamless image.

2. Photograph the environment reflected in a mirrored sphere.This is relatively simple way to capture the wholeenvironment. A silvered glass Christmas tree ball is nearlyspherical and a good reflector. A moderately long focal lengthlens should be used to minimize the effects of perspective.

Page 85: HDRI and Image-Based Lighting

Page 7

There may be small perturbations on the globe, and there canbe much distortion near the edges. There is a blind spot,i.e. the areas directly behind the globe, which are notreflected in it. For these reasons, mirrored reflectionsshould be confined to curved surfaces where these distortionswould be less noticeable than for flat mirrored surfaces.

The photograph must then be digitized, registered, andcolor-corrected. If the matting is done optically, the coloroutput of the film recorder should be consistent with the color ofthe film it is matted with. Color correction based on Newtoniteration is described by Pratt [22].

The dynamic range of a real environment can greatly exceedthe dynamic range of film and the film will saturate for highintensity regions (e.g. the sun). It is critical that highintensity regions are accurately recorded for computing thediffuse component; for the specular component, the accuracy of theLow intensity regions is similarly crucial. Bracketing is thesolution: i.e. photograph several exposures for each scene,varying the f-stop of the camera. The different exposures willthen need to be registered and digitally combined into a singleimage.

5.2 Simulated EnvironmentsArea light sources should be modeled as bright self-luminous

patches. E.g. a fluorescent lamp would be a very bright cylinder.All, reflecting objects will serve as indirect light sources.Render the scene 6 times from the point of view of the object thatwill be mapped, placing 6 viewing planes on the faces of a cubecentered on the view point (see section 4.1).

The illumination table can also incorporate point lightsources. For each point source, determine its direction and addthe energy divided by distance squared into the illuminationtable.

5.3 Painted EnvironmentsEnvironments may be created by the digitization of

conventional paintings, or by digital painting.

6. CONVOLUTION - BUILDING THE REFLECTED LIGHT MAPS

For modeling each type of reflectance property, we postulatetwo components of reflection: diffuse and specular. Eachcomponent is represented by a reflection map or table. Thediffuse map is indexed during shading by the direction of thesurface normal, and the specular is indexed by the reflecteddirection. For mirror highlights, the specular reflection map isidentical to the illumination map.

6.1 Diffuse Reflection MapMap D contains the diffuse reflection component for each

sample normal direction N. Map D is the convolution of theillumination map with a reflectance function fd.

D[N] = (ΣI[L] x Area[L] x fd(N . L))/(4 pi) L

Page 86: HDRI and Image-Based Lighting

Page 8

where

L ranges over all sample directionsindexing the illumination map

I is the average light energy in direction LArea is the angular area re-presented by direction LN . L is the cosine between N and LFd is the diffuse convolution function

Some examples of the diffuse convolution function are:

1. Lambert reflection, k is the diffuse reflection constant:fd(x) = kd * x for x > 0 0 for x <= 0

2. Self-luminous material:fd(x) = kd for all x.

Tables of size 36x72 pixels are adequate to store the Lambertreflection map. This is equivalent to a Gouraud shaded spherewith facets at every five degrees.

6.2 Specular Reflection MapMap S contains the specular reflection component for each

sample reflected direction R. Map S is the convolution of theillumination map with a reflectance function fs.

S[R] = (Σ I[L] x Area[L] x fs(R . L))/(4 pi) L

where

fs = the specular convolution function of R . L

Examples of the specular convolution function are:

1. Perfect mirror:

fs(x) = 1 for x = 1 0 for x < 1

2. Conventional Phong specular model,n is the glossines parameter,and ks is the specular reflection constant:

fs(x) = ks * x**n for x > 0 0 for x <= 0

3. Conventional Phong specular with a clear varnish coat:

fs(x) = ks * x**n + .5 for x = 1 ks * x**n for 0 < x < 1 0 for x <= 1

7. INTENSITY CALCULATION

Page 87: HDRI and Image-Based Lighting

Page 9

For every pixel in the scene occupied by the object, therendering algorithm should provide:

1. Material type2. Surface normal N3. Direction E from the point to the eye

The intensity at that point is then given by line 9 of thealgorithm in section 3. This expression has no separate ambientlight term since the environment itself is the ambience. The Wdand Ws weighting functions are used to scale the reflected lightas a function of viewing angle because many surfaces are morespecular at low viewing angles [3,11].

7.1 Interpolation between Tabulated ValuesLine 9 quantizes direction. For surfaces of low curvature

this can be quite noticeable, especially if the table is of lowresolution. This can be alleviated with bilinear interpolation[13] of the table values.

8. ANTIALIASING

If a surface has high curvature, then adjacent pixels in theimages will index non-adjacent pixels in the reflection maps. Forglossy surfaces, small bright light sources (e.g. the sun) willget lost between the pixels, leading to highlights that break upand scintillate.

High curvature occurs with simulated wrinkles [4], at theedges of polyhedra, and when objects move far away from the eye.A pixel of a highly curved glossy surface can reflect a sizeableportion of the environment and in a number of different waysdepending on its curvature [23]. For these reasons, antialiasingfor reflectance maps is more critical than it is for ordinarymapped images.

8.1 Recursive SubdivisionThis method is inspired by Whitted [25] and is effectively

antialiasing with a box filter.

1. Compute the reflected direction at each corner of the pixel.2. If they index into the same or adjacent table entries, then

use the average of the four intensities.3. If not, subdivide horizontally or vertically.4. Linearly interpolate the reflected direction and renormalize.

Repeat until condition 2 is met or until the regions areinconsequentially small.

8.2 Integrate the Area Spanned by Reflected Corners of PixelHere we integrate the area within the quadrilateral defined

by the reflected corners of the pixel. We divide by the area toobtain an average value. This method is faster but less accuratethan recursive subdivision. Errors however, will average out overneighboring pixels: i.e. highlights may be shifted a fraction of apixel.

Page 88: HDRI and Image-Based Lighting

Page 10

This and the previous method can be extremely costly forvery curved shiny surfaces. This is because each pixel maps intomany pixels in the reflection map.

8.3 Pre-Integrating the Reflection MapA significant speedup can be obtained by pre-integrating the

reflection map, whereby the number of computations per pixel isconstant. This was suggested to us by a fast filtering techniquedevised by K. Perlin [21]. The quadrilateral spanned by a pixelis approximated by a rectangle in the integrated reflection table.Values are looked-up at the four corners and the integrated valuewithin the rectangle is obtained by differencing. The pre-integrated table must have enough precision to accurately storethe highest value times the number of pixels in the map.

When the quadrilateral is not well approximated by therectangle, then a blurring of the highlight may occur. Thisblurring is less than the blur produced by pre-filtering thereflection map [12,26].

9. GENERALIZING THE REFLECTION TABLE

The Bidirectional Reflectance-Distribution Fuction [11,14]specifies non-isotropic reflectance as a function of fourdimensions and isotropic reflectance can be described a byfunction of three dimensions. Convolution with the 2-dimensionalillumination map results in a 3-dimensional reflectance map thatcompletely describes isotropically reflected light as a functionof eye point and surface normal. The reflection map algorithmdescribed in section 1.4 is deficient since it gives intensity asa weighted sum of two 2-dimensional reflection maps. Additionalreflection tables may prove valuable in extending the class ofmaterials that can be accurately simulated.

For example, certain materials reflect more light back inthe viewing direction: e.g. lunar dust, reflective signs, cat'seyes. Use the viewing direction to index a specular reflectiontable to simulate these materials.

Another example is that the refraction of light at a singlesurface. This is easily simulated by computing the refractiondirection as a function of surface normal and direction to theeye. Use this direction to index a mirror reflection table.

10. CONCLUSIONS

Vast amounts of computer resources are used to accuratelysimulate light's interaction with matter. Illumination andreflection maps provide an efficient means for realistically,simulating many types of reflections. The illumination map worksbecause it reduces a 3-D data structure (luminance at all pointsin space) to a 2-D one (luminance as seen from a point). Thissimplification reduces the calculation time with a small sacrificein accuracy.

Other interactions -- scattering, translucency, and diffuseshadows -- are now prohibitively expensive. Perhaps theillumination map can be applied to these areas also.

Page 89: HDRI and Image-Based Lighting

Page 11

ACKNOWLEDGEMENTS

We would like to thank the production staffs and managementof MAGI SynthaVision and Digital Effects for providing themotivation and, support for this work. Thanks to Ken Perlin andJoshua Pines for creating the advanced SynthaVision IMAGE programwhich now contains "chrome". Thanks to James Blinn and the 1983reviewers who provided helpful comments.

REFERENCES

1. Bass, Daniel H. Using the Video Lookup Table forReflectivity Calculations: Specific Techniques andGraphics Results. Computer Graphics and ImageProcessing, V.17 (1981), pp. 249-261.

2. Blinn, James F. and Newell, Martin E. Texture andReflection in Computer Generated Images. Communicationsof the ACM, V.19 #10 (1976), pp. 542-547.

3. Blinn, James F. Models of Light Reflection for ComputerSynthesized Pictures. SIGGRAPH 1977 Proceedings,Computer Graphics, V.11 #2 (1977), pp. 192-198.

4. Blinn, James F. Simulation of Wrinkled Surfaces.SIGGRAPH 1978 Proceedings, Computer Graphics, V.12 #3(1978), pp. 286-292.

5. Blinn, James F. Computer Display of Curved Surfaces. PhDdissertation, University of Utah, Salt Lake City (1978).

6. Blinn, James F. Raster Graphics. Tutorial: ComputerGraphics, KellOg Booth, ed., (1979), pp. 150-156. (IEEECat. No. EHO 147-9)

7. Blinn, James F. Light Reflection Functions for Simulationof Clouds and Dusty Surfaces. SIGGRAPH 1982 Proceedings,Computer Graphics, V.16 #3 (1982), pp. 21-29.

8. Bui-Tuong Phong. Illumination for computer generatedpictures. Communications of the ACM, V.18 #6 (June1975), pp. 311-317.

9. Catmull, Edwin A. Computer display of curved surfaces.Proc. Conf. on Computer Graphics, Pattern Recognitionand Data Structures (May 1975), pp. 11-17. (IEEE Cat. No.7SCH 0981-IC)

10. Central Intelligence Agency, Cartographic AutomaticMapping Program Documentation - 5th Edition, GC 77-10126(June 1977).

11. Cook, Robert L. and Torrance, Kenneth E. A reflectancemodel for computer graphics. SIGGRAPH 1981 Proceedings,Computer Graphics, V.15 #3 (1981), pp. 307-316.

Page 90: HDRI and Image-Based Lighting

Page 12

12. Dungan, William. Texture tile considerations for rastergraphics. SIGGRAPH 1978 Proceedings, Computer Graphics,V.12 #3 (1978), pp. 130-134.

13. Feibush, Eliot A., Levoy, Marc and Cook, Robert L.Synthetic texturing using digital filters. SIGGRAPH 1980Proceedings, Computer Graphics, V.14 #3 (July 1980), pp.294-301.

14. Horn, B. K. P. and Sjoberg, R. W. Calculating thereflectance map. Applied Optics, v-18 #11 (June 1979),pp. 1170-1179.

15. Kay, Douglas S. and Greenberg, Donald. Transparency forcomputer synthesized images. SIGGRAPH 1979 Proceedings,Computer Graphics V.13 2 (Aug. 1979), pp. 158-164.

16. Minnaert, M. The Nature of Light and Color in the OpenAir. Dover Publishing Inc., New York, 1954

17. Max, Nelson and Blunden, John. Optical printing incomputer animation. SIGGRAPH 1980 Proceedings, ComputerGraphics, V.14 #3 (July 1980), pp. 171-177.

18. Max, N. L. Vectorized procedural models for naturalterrains: waves and island in the sunset. SIGGRAPH1981 Proceedings, Computer Graphics, V.15 #3 (.1981), pp.317-324.

19. Newell, Martin E. and Blinn, James F. The progression ofrealism in computer generated images. Proceedings of ACMAnnual Conf. (1977), pp. 444-448.

20. Norton, Alan, Rockwood, Alyn and Skolmoski, Philip T.Clamping: a method of antialiasing-textured surfacesby bandwidth limiting in object space. SIGGRAPH 1982Proceedings, Computer Graphics, V.16 #3 (July 1982), pp.1-8.

21. Perlin, Kenneth. Unpublished personal communication.

22. Pratt, William K. Digital image processing. John Wileyand Sons, New York, 1978.

23. Sloan, K. R. and Brown, C. M. Color map techniques.Computer Graphics and Image Processing. V.10 (1979), pp.297-317.

24. Thomas, David E. Mirror images. Scientific American(Dec. 1980), pp. 206-228.

25. Whitted, Turner. An improved illumination model forshaded display. Communications of the ACM, V.23 #6 (June1980), pp. 343-349.

26. Williams, Lance. Pyramidal Parametrics. SIGGRAPH 1983Proceedings, Computer Graphics, V.17 #3 (1983), pp. 1-11.

Page 91: HDRI and Image-Based Lighting

Image-Based Modeling, Rendering,and Lighting in Fiat Lux

SIGGRAPH 99 Animation Sketch

IntroductionThis animation sketch presents how image-based model-ing, rendering, and lighting were used to create the ani-mation Fiat Lux from the SIGGRAPH 99 Electronic Thea-ter. The film features a variety of dynamic objects real-istically rendered into real environments, including St. Pe-ter’s Basilica in Rome. The geometry, appearance, andillumination of the environments were acquired throughdigital photography and augmented with the synthetic ob-jects to create the animation. The film builds on the tech-niques of The Campanile Movie and Rendering with Natu-ral Light from SIGGRAPH 97 and 98.

The Imagery and StoryFiat Lux draws its imagery from the life of Galileo Galilei(1564-1642) and his conflict with the church. When he wastwenty, Galileo discovered the principle of the pendulumby observing a swinging chandelier while attending mass.This useful timing device quickly set into motion a series ofother important scientific discoveries. As the first to ob-serve the sky with a telescope, Galileo made a number ofdiscoveries supporting the Copernican theory of the solarsystem. As this conflicted with church doctrine, an elderlyGalielo was summoned to Rome where he was tried, con-victed, forced to recant, and sentenced to house arrest forlife. Though honorably buried in Florence, Galileo was notformally exonerated by the church until 1992. Fiat Luxpresents an abstract interpretation of this story using arti-facts and environments from science and religion.

The TechnologyThe objects in Fiat Lux are synthetic, but the environmentsand the lighting are real. The renderings are a computedsimulation of what the scenes would actually look like withthe synthetic objects added to the real environments. Thetechniques we used represent an alternative to traditionalcompositing methods, in which the lighting on the objectsis specified manually.

The environments were acquired in Florence and Rome;the images in St. Peter’s were taken within the span of anhour in accordance with our permissions. To record thefull range of illumination, we used high dynamic rangephotography2, in which a series of exposures with varyingshutter speeds is combined into a single linear-response

radiance image. Several scenes exhibited a dynamicrange of over 100,000:1.

The appearance and illumination of each environment wasrecorded with a set of panoramic images and light probemeasurements3. Each light probe measurement wasmade by taking one or two telephoto radiance images of a2-inch mirrored ball placed on a tripod; each provided anomnidirectional illumination measurement at a particularpoint in space. Several radiance images were retouchedusing a special high dynamic range editing procedure andspecially processed to diminish glare.

We constructed a basic 3D model of each environmentusing the Façade photogrammetric modeling system1.The models allowed us to create virtual 3D camera movesusing projective texture-mapping, as well as to fix the ori-gin of the captured illumination. The light probe imageswere used to create light sources of the correct intensityand location, thus replicating the illumination for each envi-ronment. The illumination was used to “un-light” theground in each scene, allowing the synthetic objects tocast shadows and appear in reflections3. The dynamicobjects were animated either procedurally or by using thedynamic simulator in Maya 1.0. Renderings were createdon a cluster of workstations using Greg Larson’s RADI-ANCE global illumination system to simulate the photo-metric interaction of the objects and the environments.The final look of the film was achieved using a combina-tion of blur, flare, and vignetting filters applied to the highdynamic range renderings.

Contributors: Christine Cheng, H.P. Duiker, Tal Garfinkel,Tim Hawkins, Jenny Huang, and Westley Sarokin. Sup-ported by Interval Research Corporation, the Digital MediaInnovation program, and the Berkeley Millennium project.

See also: http://www.cs.berkeley.edu/~debevec/FiatLux

References1 Paul E. Debevec, Camillo J. Taylor, and Jitendra Malik. Modeling and

Rendering Architecture from Photographs. In SIGGRAPH 96, August1996.

2 Paul Debevec and Jitendra Malik. Recovering High Dynamic Range Ra-diance Maps from Photographs. In SIGGRAPH 97, August 1997.

3 Paul Debevec. Rendering Synthetic Objects into Real Scenes: BridgingTraditional and Image-Based Graphics with Global Illumination and Dy-namic Range Photography. In SIGGRAPH 98, July 1998.

Paul DebevecUniversity of California at Berkeley387 Soda Hall #1776Berkeley, CA [email protected]

Page 92: HDRI and Image-Based Lighting

Conference Abstracts and Applications Sketches & Applications

195

ContactChris Tchou

USC Institute for Creative Technologies

[email protected]

Paul DebevecUSC Institute for

Creative Technologies

HDR Shop

HDR Shop is a computer application (currently under develop-ment) designed to view and edit high-dynamic-range (HDR)1

images: pictures that can capture a much greater range of lightintensities than standard photographs or computer images. Thisapproach is very useful for image-based lighting and post-renderprocessing.

Photographs from traditional cameras do not record the amount oflight over a certain level. All the bright points in a photo are white,which makes it impossible to detect any difference in intensity. Thestandard technique to acquire HDR images that capture this miss-ing information is to take several photographs at differentexposures (making each photo progressively darker, without mov-ing the camera), until the bright lights no longer saturate. Thesequence of photographs can then be analyzed to derive the lightintensity of each point in the scene.

Whereas traditional image editors work with 8- or 16-bit images,HDR Shop is built from the ground up to work correctly withHDR images. All operations are done with linear floating-pointnumbers. In many cases, this simplifies the code, as well as provid-ing more correct output.

For the purpose of real-time display, however, it is important toquickly convert linear floating-point images to 8-bit RGB with theappropriate gamma curve. The standard gamma formula involvesan exponentiation, which is slow. In the interest of speed, we havefound it useful to approximate this calculation by constructing alookup table indexed by the most significant bits of the floating-point values. For common gamma values of 1.4 ~ 2.2, it suffices touse 16 bits (eight exponent bits and eight mantissa bits) to reducethe error below rounding error.

In addition to resampling, cropping, and mathematical operations,HDR Shop also supports transformations among most commonpanoramic formats, facilitating the use of HDR panoramas inimage-based lighting2. HDR Shop can also automatically export alow-dynamic-range (LDR) copy of any image to an external imageeditor. Changes to the LDR image are then incorporated into theHDR image, so existing tools can be used to modify HDR images.

See also: www.debevec.org/HDRShop

References1. Debevec, P. & Malik, J. (1997). Recovering high dynamic range radiance maps

from photographs. Proceedings of SIGGRAPH 97.2. Debevec, P. (1998). Rendering synthetic objects into real scenes: Bridging

traditional and image-based graphics with global illumination and high dynamic range photography. Proceedings of SIGGRAPH 98.

Figure 1. In HDR Shop, a sequence of low-dynamic-range images (left) can be compiled into a single high-dynamic-range image (right).

Figure 2. Comparison of HDR Shop’s horizontal motion blur on a low-dynamic-range image (left) vs. a high-dynamic-range image (right).

Figure 3. St. Paul’s Cathedral panorama, originally in cube-map format (left), converted in HDR Shop to latitude-longitude (upper right), mirrored ball, and light probe formats (lower right).

Page 93: HDRI and Image-Based Lighting

Conference Abstracts and Applications Sketches & Applications

217

ContactTim Hawkins

Institute for CreativeTechnologies

University of Southern [email protected]

Jonathan CohenChris TchouPaul Debevec

Institute for CreativeTechnologies

University of Southern California

Light Stage 2.0

At SIGGRAPH 2000, we presented an apparatus for capturing theappearance of a person’s face under all possible directions of illumi-nation. The captured data can be directly used to render the personinto any imaginable lighting environment, and can also be used tobuild photo-real computer graphics models that capture the uniquetexture and reflectance of the face. We have recently been develop-ing the next generation of this lighting apparatus, which we callLight Stage 2.0.

Light Stage 2.0 is a much faster and more precise version of its predecessor1. The original device allowed a single light to be spunaround on a spherical path so that a subject could be illuminatedfrom all directions, and regular video cameras were used to recordthe subject’s appearance as the light moved. This system had twomajor problems. First, since the light was moved around by pullingon various ropes, it was hard to be sure what the precise location ofthe light was at any given time. Second, because the device couldnot be spun very fast, and because of the limit of 30 frames per sec-ond imposed by the video cameras, it took over a minute to do adata capture. Since the subject must remain still during the datacapture, this meant we could only capture people in very passiveexpressions, and even then multiple trials were often needed.

With Light Stage 2.0 (shown in Figure 1), we can capture all of thedifferent lighting directions much more rapidly, with only a singlerotation of a semicircular arm, and with greater accuracy. Thirtystrobe lights arrayed along the length of the arm flash repeatedly inrapid sequence as the arm rotates. High-speed digital cameras cap-ture the subject’s appearance. This allows all directions ofillumination to be provided in about four seconds, a period of timefor which a person can easily remain still. It is also much easier tocapture facial expressions that would be very difficult to maintainfor an extended period of time (smiling, frowning, wincing, etc.).

We are currently working on integrating geometry capture to provide a complete model of the subject. For this, we use digitalLCD projectors to project different structured patterns onto thesubject, quickly recording the appearance of the subject under eachof the patterns with our high-speed cameras. From these struc-tured-light data, the geometry of the subject is easily recovered.These data together with the reflectance data may provide morecomplete and photo-real models of faces than ever before.

In the next few months, we will be researching new ways of analyzing the large amount of reflectance field information captured in a Light Stage 2.0 scan and adapting the datasets for use in facial animation. We would also like to make our captureprocess even faster, with the goal of being able to capture bothgeometry and reflectance information in about five seconds. Ourfuture plans include new prototype lighting devices that will allowsimilar datasets to be captured many times a second. This willallow an actor’s performance to be recorded and then renderedphoto-realistically into virtual environments with arbitrary light-ing, where the performance can be viewed from arbitrary angles.

Another approach is to directly illuminate an actor with lightsources aimed from all directions whose intensity and color iscontrolled by the computer. In this case, if the incident illumina-tion necessary to realistically composite the actor into a particularscene is known in advance, the actor can be filmed directly underthis illumination.

Reference1. Debevec, P., Hawkins, T., Tchou, C., Duiker,H.-P., Sarokin, W., & Sagar, M.

(2000). Acquiring the reflectance field of a human face. In Proceedings of SIGGRAPH 2000.

Light Stage 2.0, with seated subject.

A 10-second-exposure photograph of Light Stage 2.0 acquiring a 4Dreflectance field dataset of the subject’s face.

Page 94: HDRI and Image-Based Lighting

Recovering High Dynamic Range Radiance Maps from Photographs

Paul E. Debevec Jitendra Malik

University of California at Berkeley1

ABSTRACTWe present a method of recovering high dynamic range radiancemaps from photographs taken with conventional imaging equip-ment. In our method, multiple photographs of the scene are takenwith different amounts of exposure. Our algorithm uses these dif-ferently exposed photographs to recover the response function of theimaging process, up to factor of scale, using the assumption of reci-procity. With the known response function, the algorithm can fusethe multiple photographs into a single, high dynamic range radiancemap whose pixel values are proportional to the true radiance valuesin the scene. We demonstrate our method on images acquired withboth photochemical and digital imaging processes. We discuss howthis work is applicable in many areas of computer graphics involv-ing digitized photographs, including image-based modeling, imagecompositing, and image processing. Lastly, we demonstrate a fewapplications of having high dynamic range radiance maps, such assynthesizing realistic motion blur and simulating the response of thehuman visual system.

CR Descriptors: I.2.10 [Artificial Intelligence]: Vision andScene Understanding - Intensity, color, photometry and threshold-ing; I.3.7 [Computer Graphics]: Three-Dimensional Graphics andRealism - Color, shading, shadowing, and texture; I.4.1 [ImageProcessing]: Digitization - Scanning; I.4.8 [Image Processing]:Scene Analysis - Photometry, Sensor Fusion.

1 IntroductionDigitized photographs are becoming increasingly important in com-puter graphics. More than ever, scanned images are used as texturemaps for geometric models, and recent work in image-based mod-eling and rendering uses images as the fundamental modeling prim-itive. Furthermore, many of today’s graphics applications requirecomputer-generated images to mesh seamlessly with real photo-graphic imagery. Properly using photographically acquired imageryin these applications can greatly benefit from an accurate model ofthe photographic process.

When we photograph a scene, either with film or an elec-tronic imaging array, and digitize the photograph to obtain a two-dimensional array of “brightness” values, these values are rarely

1Computer Science Division, University of California at Berkeley,Berkeley, CA 94720-1776. Email: [email protected], [email protected]. More information and additional results may be foundat: http://www.cs.berkeley.edu/˜debevec/Research

true measurements of relative radiance in the scene. For example, ifone pixel has twice the value of another, it is unlikely that it observedtwice the radiance. Instead, there is usually an unknown, nonlinearmapping that determines how radiance in the scene becomes pixelvalues in the image.

This nonlinear mapping is hard to know beforehand because it isactually the composition of several nonlinear mappings that occurin the photographic process. In a conventional camera (see Fig. 1),the film is first exposed to light to form a latent image. The film isthen developed to change this latent image into variations in trans-parency, or density, on the film. The film can then be digitized usinga film scanner, which projects light through the film onto an elec-tronic light-sensitive array, converting the image to electrical volt-ages. These voltages are digitized, and then manipulated before fi-nally being written to the storage medium. If prints of the film arescanned rather than the film itself, then the printing process can alsointroduce nonlinear mappings.

In the first stage of the process, the film response to variationsin exposure X (which is E�t, the product of the irradiance E thefilm receives and the exposure time �t) is a non-linear function,called the “characteristic curve” of the film. Noteworthy in the typ-ical characteristic curve is the presence of a small response with noexposure and saturation at high exposures. The development, scan-ning and digitization processes usually introduce their own nonlin-earities which compose to give the aggregate nonlinear relationshipbetween the image pixel exposures X and their values Z.

Digital cameras, which use charge coupled device (CCD) arraysto image the scene, are prone to the same difficulties. Although thecharge collected by a CCD element is proportional to its irradiance,most digital cameras apply a nonlinear mapping to the CCD outputsbefore they are written to the storage medium. This nonlinear map-ping is used in various ways to mimic the response characteristics offilm, anticipate nonlinear responses in the display device, and oftento convert 12-bit output from the CCD’s analog-to-digital convert-ers to 8-bit values commonly used to store images. As with film,the most significant nonlinearity in the response curve is at its sat-uration point, where any pixel with a radiance above a certain levelis mapped to the same maximum image value.

Why is this any problem at all? The most obvious difficulty,as any amateur or professional photographer knows, is that of lim-ited dynamic range—one has to choose the range of radiance valuesthat are of interest and determine the exposure time suitably. Sunlitscenes, and scenes with shiny materials and artificial light sources,often have extreme differences in radiance values that are impossi-ble to capture without either under-exposing or saturating the film.To cover the full dynamic range in such a scene, one can take a seriesof photographs with different exposures. This then poses a prob-lem: how can we combine these separate images into a compositeradiance map? Here the fact that the mapping from scene radianceto pixel values is unknown and nonlinear begins to haunt us. Thepurpose of this paper is to present a simple technique for recover-ing this response function, up to a scale factor, using nothing morethan a set of photographs taken with varying, known exposure du-rations. With this mapping, we then use the pixel values from allavailable photographs to construct an accurate map of the radiancein the scene, up to a factor of scale. This radiance map will cover

Copyright Notice
Copyright ©1997 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to distribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or [email protected].
Supplemental Materials
Supplemental materials for this paper are available in the papers/debevec directory.
Page 95: HDRI and Image-Based Lighting

sensorirradiance

(E)

sceneradiance

(L)

latentimage

filmdensity

analogvoltages

digitalvalues

finaldigitalvalues

(Z)

Digital Camera

Film Camera

sensorexposure

(X)

Lens Film Development CCD ADC RemappingShutter

Figure 1: Image Acquisition Pipeline shows how scene radiance becomes pixel values for both film and digital cameras. Unknown nonlin-ear mappings can occur during exposure, development, scanning, digitization, and remapping. The algorithm in this paper determines theaggregate mapping from scene radiance L to pixel values Z from a set of differently exposed images.

the entire dynamic range captured by the original photographs.

1.1 Applications

Our technique of deriving imaging response functions and recover-ing high dynamic range radiance maps has many possible applica-tions in computer graphics:

Image-based modeling and rendering

Image-based modeling and rendering systems to date (e.g. [11, 15,2, 3, 12, 6, 17]) make the assumption that all the images are takenwith the same exposure settings and film response functions. How-ever, almost any large-scale environment will have some areas thatare much brighter than others, making it impossible to adequatelyphotograph the scene using a single exposure setting. In indoorscenes with windows, this situation often arises within the field ofview of a single photograph, since the areas visible through the win-dows can be far brighter than the areas inside the building.

By determining the response functions of the imaging device, themethod presented here allows one to correctly fuse pixel data fromphotographs taken at different exposure settings. As a result, onecan properly photograph outdoor areas with short exposures, and in-door areas with longer exposures, without creating inconsistenciesin the data set. Furthermore, knowing the response functions canbe helpful in merging photographs taken with different imaging sys-tems, such as video cameras, digital cameras, and film cameras withvarious film stocks and digitization processes.

The area of image-based modeling and rendering is working to-ward recovering more advanced reflection models (up to completeBRDF’s) of the surfaces in the scene (e.g. [21]). These meth-ods, which involve observing surface radiance in various directionsunder various lighting conditions, require absolute radiance valuesrather than the nonlinearly mapped pixel values found in conven-tional images. Just as important, the recovery of high dynamic rangeimages will allow these methods to obtain accurate radiance val-ues from surface specularities and from incident light sources. Suchhigher radiance values usually become clamped in conventional im-ages.

Image processing

Most image processing operations, such as blurring, edge detection,color correction, and image correspondence, expect pixel values tobe proportional to the scene radiance. Because of nonlinear imageresponse, especially at the point of saturation, these operations canproduce incorrect results for conventional images.

In computer graphics, one common image processing operationis the application of synthetic motion blur to images. In our re-sults (Section 3), we will show that using true radiance maps pro-duces significantly more realistic motion blur effects for high dy-namic range scenes.

Image compositing

Many applications in computer graphics involve compositing im-age data from images obtained by different processes. For exam-ple, a background matte might be shot with a still camera, liveaction might be shot with a different film stock or scanning pro-cess, and CG elements would be produced by rendering algorithms.When there are significant differences in the response curves ofthese imaging processes, the composite image can be visually un-convincing. The technique presented in this paper provides a conve-nient and robust method of determining the overall response curveof any imaging process, allowing images from different processes tobe used consistently as radiance maps. Furthermore, the recoveredresponse curves can be inverted to render the composite radiancemap as if it had been photographed with any of the original imagingprocesses, or a different imaging process entirely.

A research tool

One goal of computer graphics is to simulate the image formationprocess in a way that produces results that are consistent with whathappens in the real world. Recovering radiance maps of real-worldscenes should allow more quantitative evaluations of rendering al-gorithms to be made in addition to the qualitative scrutiny they tra-ditionally receive. In particular, the method should be useful for de-veloping reflectance and illumination models, and comparing globalillumination solutions against ground truth data.

Rendering high dynamic range scenes on conventional displaydevices is the subject of considerable previous work, including [20,16, 5, 23]. The work presented in this paper will allow such meth-ods to be tested on real radiance maps in addition to syntheticallycomputed radiance solutions.

1.2 Background

The photochemical processes involved in silver halide photographyhave been the subject of continued innovation and research eversince the invention of the daguerretype in 1839. [18] and [8] pro-vide a comprehensive treatment of the theory and mechanisms in-volved. For the newer technology of solid-state imaging with chargecoupled devices, [19] is an excellent reference. The technical andartistic problem of representing the dynamic range of a natural sceneon the limited range of film has concerned photographers from theearly days – [1] presents one of the best known systems to chooseshutter speeds, lens apertures, and developing conditions to best co-erce the dynamic range of a scene to fit into what is possible on aprint. In scientific applications of photography, such as in astron-omy, the nonlinear film response has been addressed by suitable cal-ibration procedures. It is our objective instead to develop a simpleself-calibrating procedure not requiring calibration charts or photo-metric measuring devices.

In previous work, [13] used multiple flux integration times of aCCD array to acquire extended dynamic range images. Since directCCD outputs were available, the work did not need to deal with the

Page 96: HDRI and Image-Based Lighting

problem of nonlinear pixel value response. [14] addressed the prob-lem of nonlinear response but provide a rather limited method of re-covering the response curve. Specifically, a parametric form of theresponse curve is arbitrarily assumed, there is no satisfactory treat-ment of image noise, and the recovery process makes only partialuse of the available data.

2 The AlgorithmThis section presents our algorithm for recovering the film responsefunction, and then presents our method of reconstructing the highdynamic range radiance image from the multiple photographs. Wedescribe the algorithm assuming a grayscale imaging device. Wediscuss how to deal with color in Section 2.6.

2.1 Film Response Recovery

Our algorithm is based on exploiting a physical property of imagingsystems, both photochemical and electronic, known as reciprocity.

Let us consider photographic film first. The response of a filmto variations in exposure is summarized by the characteristic curve(or Hurter-Driffield curve). This is a graph of the optical densityD of the processed film against the logarithm of the exposure Xto which it has been subjected. The exposure X is defined as theproduct of the irradiance E at the film and exposure time, �t, sothat its units are Jm�2. Key to the very concept of the characteris-tic curve is the assumption that only the product E�t is important,that halvingE and doubling �twill not change the resulting opticaldensity D. Under extreme conditions (very large or very low �t ),the reciprocity assumption can break down, a situation described asreciprocity failure. In typical print films, reciprocity holds to within1

3stop1 for exposure times of 10 seconds to 1/10,000 of a second.2

In the case of charge coupled arrays, reciprocity holds under the as-sumption that each site measures the total number of photons it ab-sorbs during the integration time.

After the development, scanning and digitization processes, weobtain a digital number Z, which is a nonlinear function of the orig-inal exposureX at the pixel. Let us call this function f , which is thecomposition of the characteristic curve of the film as well as all thenonlinearities introduced by the later processing steps. Our first goalwill be to recover this function f . Once we have that, we can com-pute the exposure X at each pixel, as X = f�1(Z). We make thereasonable assumption that the function f is monotonically increas-ing, so its inverse f�1 is well defined. Knowing the exposureX andthe exposure time �t, the irradiance E is recovered as E = X=�t,which we will take to be proportional to the radianceL in the scene.3

Before proceeding further, we should discuss the consequencesof the spectral response of the sensor. The exposure X should bethought of as a function of wavelengthX(�), and the abscissa on thecharacteristic curve should be the integral

RX(�)R(�)d� where

R(�) is the spectral response of the sensing element at the pixel lo-cation. Strictly speaking, our use of irradiance, a radiometric quan-tity, is not justified. However, the spectral response of the sensor sitemay not be the photopic luminosity function V�, so the photomet-ric term illuminance is not justified either. In what follows, we willuse the term irradiance, while urging the reader to remember that the

11 stop is a photographic term for a factor of two; 13

stop is thus 21

3

2An even larger dynamic range can be covered by using neutral densityfilters to lessen to amount of light reaching the film for a given exposure time.A discussion of the modes of reciprocity failure may be found in [18], ch. 4.

3L is proportional E for any particular pixel, but it is possible for theproportionality factor to be different at different places on the sensor. One

formula for this variance, given in [7], is E = L�4

�df

�2cos

4�, where �

measures the pixel’s angle from the lens’ optical axis. However, most mod-ern camera lenses are designed to compensate for this effect, and provide anearly constant mapping between radiance and irradiance at f/8 and smallerapertures. See also [10].

quantities we will be dealing with are weighted by the spectral re-sponse at the sensor site. For color photography, the color channelsmay be treated separately.

The input to our algorithm is a number of digitized photographstaken from the same vantage point with different known exposuredurations �tj .4 We will assume that the scene is static and that thisprocess is completed quickly enough that lighting changes can besafely ignored. It can then be assumed that the film irradiance valuesEi for each pixel i are constant. We will denote pixel values by Zijwhere i is a spatial index over pixels and j indexes over exposuretimes �tj . We may now write down the film reciprocity equationas:

Zij = f(Ei�tj) (1)

Since we assume f is monotonic, it is invertible, and we can rewrite(1) as:

f�1(Zij) = Ei�tj

Taking the natural logarithm of both sides, we have:

ln f�1(Zij) = lnEi + ln�tj

To simplify notation, let us define function g = ln f�1. We thenhave the set of equations:

g(Zij) = lnEi + ln�tj (2)

where i ranges over pixels and j ranges over exposure durations. Inthis set of equations, the Zij are known, as are the �tj . The un-knowns are the irradiances Ei, as well as the function g, althoughwe assume that g is smooth and monotonic.

We wish to recover the function g and the irradiances Ei that bestsatisfy the set of equations arising from Equation 2 in a least-squarederror sense. We note that recovering g only requires recovering thefinite number of values that g(z) can take since the domain of Z,pixel brightness values, is finite. Letting Zmin and Zmax be theleast and greatest pixel values (integers), N be the number of pixellocations and P be the number of photographs, we formulate theproblem as one of finding the (Zmax � Zmin + 1) values of g(Z)and theN values of lnEi that minimize the following quadratic ob-jective function:

O =

NXi=1

PXj=1

[g(Zij)� lnEi � ln�tj ]2 + �

Zmax�1Xz=Z

min+1

g00(z)2

(3)The first term ensures that the solution satisfies the set of equa-

tions arising from Equation 2 in a least squares sense. The secondterm is a smoothness term on the sum of squared values of the sec-ond derivative of g to ensure that the function g is smooth; in thisdiscrete setting we use g00(z) = g(z�1)�2g(z)+g(z+1). Thissmoothness term is essential to the formulation in that it providescoupling between the values g(z) in the minimization. The scalar� weights the smoothness term relative to the data fitting term, andshould be chosen appropriately for the amount of noise expected inthe Zij measurements.

Because it is quadratic in the Ei’s and g(z)’s, minimizing O isa straightforward linear least squares problem. The overdetermined

4Most modern SLR cameras have electronically controlled shutterswhich give extremely accurate and reproducible exposure times. We testedour Canon EOS Elan camera by using a Macintosh to make digital audiorecordings of the shutter. By analyzing these recordings we were able toverify the accuracy of the exposure times to within a thousandth of a sec-ond. Conveniently, we determined that the actual exposure times varied bypowers of two between stops ( 1

64, 1

32, 1

16, 18

, 14

, 12

, 1, 2, 4, 8, 16, 32), rather

than the rounded numbers displayed on the camera readout ( 160

, 1

30, 1

15, 18

,1

4, 1

2, 1, 2, 4, 8, 15, 30). Because of problems associated with vignetting,

varying the aperture is not recommended.

Page 97: HDRI and Image-Based Lighting

system of linear equations is robustly solved using the singular valuedecomposition (SVD) method. An intuitive explanation of the pro-cedure may be found in Fig. 2.

We need to make three additional points to complete our descrip-tion of the algorithm:

First, the solution for the g(z) and Ei values can only be up toa single scale factor �. If each log irradiance value lnEi were re-placed by lnEi+�, and the function g replaced by g+�, the sys-tem of equations 2 and also the objective function O would remainunchanged. To establish a scale factor, we introduce the additionalconstraint g(Zmid) = 0, where Zmid = 1

2(Zmin+Zmax), simply

by adding this as an equation in the linear system. The meaning ofthis constraint is that a pixel with value midway between Zmin andZmax will be assumed to have unit exposure.

Second, the solution can be made to have a much better fit by an-ticipating the basic shape of the response function. Since g(z) willtypically have a steep slope near Zmin and Zmax, we should ex-pect that g(z) will be less smooth and will fit the data more poorlynear these extremes. To recognize this, we can introduce a weight-ing functionw(z) to emphasize the smoothness and fitting terms to-ward the middle of the curve. A sensible choice of w is a simple hatfunction:

w(z) =

�z � Zmin for z � 1

2(Zmin + Zmax)

Zmax � z for z > 1

2(Zmin + Zmax)

(4)

Equation 3 now becomes:

O =

NXi=1

PXj=1

fw(Zij) [g(Zij)� lnEi � ln�tj ]g2 +

Zmax�1Xz=Z

min+1

[w(z)g00(z)]2

Finally, we need not use every available pixel site in this solu-tion procedure. Given measurements ofN pixels inP photographs,we have to solve for N values of lnEi and (Zmax � Zmin) sam-ples of g. To ensure a sufficiently overdetermined system, we wantN(P � 1) > (Zmax�Zmin). For the pixel value range (Zmax�Zmin) = 255, P = 11 photographs, a choice of N on the or-der of 50 pixels is more than adequate. Since the size of the sys-tem of linear equations arising from Equation 3 is on the order ofN � P + Zmax � Zmin, computational complexity considera-tions make it impractical to use every pixel location in this algo-rithm. Clearly, the pixel locations should be chosen so that they havea reasonably even distribution of pixel values from Zmin to Zmax,and so that they are spatially well distributed in the image. Further-more, the pixels are best sampled from regions of the image withlow intensity variance so that radiance can be assumed to be con-stant across the area of the pixel, and the effect of optical blur of theimaging system is minimized. So far we have performed this taskby hand, though it could easily be automated.

Note that we have not explicitly enforced the constraint that gmust be a monotonic function. If desired, this can be done by trans-forming the problem to a non-negative least squares problem. Wehave not found it necessary because, in our experience, the smooth-ness penalty term is enough to make the estimated g monotonic inaddition to being smooth.

To show its simplicity, the MATLAB routine we used to minimizeEquation 5 is included in the Appendix. Running times are on theorder of a few seconds.

2.2 Constructing the High Dynamic Range Radi-ance Map

Once the response curve g is recovered, it can be used to quicklyconvert pixel values to relative radiance values, assuming the expo-sure �tj is known. Note that the curve can be used to determine ra-diance values in any image(s) acquired by the imaging process asso-ciated with g, not just the images used to recover the response func-tion.

From Equation 2, we obtain:

lnEi = g(Zij)� ln�tj (5)

For robustness, and to recover high dynamic range radiance val-ues, we should use all the available exposures for a particular pixelto compute its radiance. For this, we reuse the weighting function inEquation 4 to give higher weight to exposures in which the pixel’svalue is closer to the middle of the response function:

lnEi =

PP

j=1w(Zij)(g(Zij)� ln�tj)PP

j=1w(Zij)

(6)

Combining the multiple exposures has the effect of reducingnoise in the recovered radiance values. It also reduces the effectsof imaging artifacts such as film grain. Since the weighting func-tion ignores saturated pixel values, “blooming” artifacts5 have littleimpact on the reconstructed radiance values.

2.2.1 Storage

In our implementation the recovered radiance map is computed asan array of single-precision floating point values. For efficiency, themap can be converted to the image format used in the RADIANCE[22] simulation and rendering system, which uses just eight bits foreach of the mantissa and exponent. This format is particularly com-pact for color radiance maps, since it stores just one exponent valuefor all three color values at each pixel. Thus, in this format, a highdynamic range radiance map requires just one third more storagethan a conventional RGB image.

2.3 How many images are necessary?

To decide on the number of images needed for the technique, it isconvenient to consider the two aspects of the process:

1. Recovering the film response curve: This requires a minimumof two photographs. Whether two photographs are enoughcan be understood in terms of the heuristic explanation of theprocess of film response curve recovery shown in Fig. 2.If the scene has sufficiently many different radiance values,the entire curve can, in principle, be assembled by sliding to-gether the sampled curve segments, each with only two sam-ples. Note that the photos must be similar enough in their ex-posure amounts that some pixels fall into the working range6

of the film in both images; otherwise, there is no informationto relate the exposures to each other. Obviously, using morethan two images with differing exposure times improves per-formance with respect to noise sensitivity.

2. Recovering a radiance map given the film response curve: Thenumber of photographs needed here is a function of the dy-namic range of radiance values in the scene. Suppose therange of maximum to minimum radiance values that we are

5Blooming occurs when charge or light at highly saturated sites on theimaging surface spills over and affects values at neighboring sites.

6The working range of the film corresponds to the middle section of theresponse curve. The ends of the curve, in which large changes in exposurecause only small changes in density (or pixel value), are called the toe andthe shoulder.

Page 98: HDRI and Image-Based Lighting

0 50 100 150 200 250 300−6

−4

−2

0

2

4

6

pixel value (Zij)

log

expo

sure

(E

i * (

delta

t)j)

plot of g(Zij) from three pixels observed in five images, assuming unit radiance at each pixel

0 50 100 150 200 250 300−6

−4

−2

0

2

4

6

pixel value (Zij)

log

expo

sure

(E

i * (

delta

t)j)

normalized plot of g(Zij) after determining pixel exposures

Figure 2: In the figure on the left, the � symbols represent samples of the g curve derived from the digital values at one pixel for 5 differentknown exposures using Equation 2. The unknown log irradiance lnEi has been arbitrarily assumed to be 0. Note that the shape of the g curveis correct, though its position on the vertical scale is arbitrary corresponding to the unknown lnEi. The + and � symbols show samples ofg curve segments derived by consideration of two other pixels; again the vertical position of each segment is arbitrary. Essentially, what wewant to achieve in the optimization process is to slide the 3 sampled curve segments up and down (by adjusting their lnEi’s) until they “lineup” into a single smooth, monotonic curve, as shown in the right figure. The vertical position of the composite curve will remain arbitrary.

interested in recovering accurately is R, and the film is capa-ble of representing in its working range a dynamic range of F .Then the minimum number of photographs needed is dR

Fe to

ensure that every part of the scene is imaged in at least onephotograph at an exposure duration that puts it in the work-ing range of the film response curve. As in recovering the re-sponse curve, using more photographs than strictly necessarywill result in better noise sensitivity.

If one wanted to use as few photographs as possible, one mightfirst recover the response curve of the imaging process by pho-tographing a scene containing a diverse range of radiance values atthree or four different exposures, differing by perhaps one or twostops. This response curve could be used to determine the workingrange of the imaging process, which for the processes we have seenwould be as many as five or six stops. For the remainder of the shoot,the photographer could decide for any particular scene the numberof shots necessary to cover its entire dynamic range. For diffuse in-door scenes, only one exposure might be necessary; for scenes withhigh dynamic range, several would be necessary. By recording theexposure amount for each shot, the images could then be convertedto radiance maps using the pre-computed response curve.

2.4 Recovering extended dynamic range from sin-gle exposures

Most commericially available film scanners can detect reasonablyclose to the full range of useful densities present in film. However,many of these scanners (as well as the Kodak PhotoCD process) pro-duce 8-bit-per-channel images designed to be viewed on a screen orprinted on paper. Print film, however, records a significantly greaterdynamic range than can be displayed with either of these media. Asa result, such scanners deliver only a portion of the detected dynamicrange of print film in a single scan, discarding information in eitherhigh or low density regions. The portion of the detected dynamicrange that is delivered can usually be influenced by “brightness” or“density adjustment” controls.

The method presented in this paper enables two methods for re-covering the full dynamic range of print film which we will briefly

outline7. In the first method, the print negative is scanned with thescanner set to scan slide film. Most scanners will then record theentire detectable dynamic range of the film in the resulting image.As before, a series of differently exposed images of the same scenecan be used to recover the response function of the imaging systemwith each of these scanner settings. This response function can thenbe used to convert individual exposures to radiance maps. Unfortu-nately, since the resulting image is still 8-bits-per-channel, this re-sults in increased quantization.

In the second method, the film can be scanned twice with thescanner set to different density adjustment settings. A series of dif-ferently exposed images of the same scene can then be used to re-cover the response function of the imaging system at each of thesedensity adjustment settings. These two response functions can thenbe used to combine two scans of any single negative using a similartechnique as in Section 2.2.

2.5 Obtaining Absolute Radiance

For many applications, such as image processing and image com-positing, the relative radiance values computed by our method areall that are necessary. If needed, an approximation to the scalingterm necessary to convert to absolute radiance can be derived usingthe ASA of the film8 and the shutter speeds and exposure amounts inthe photographs. With these numbers, formulas that give an approx-imate prediction of film response can be found in [9]. Such an ap-proximation can be adequate for simulating visual artifacts such asglare, and predicting areas of scotopic retinal response. If desired,one could recover the scaling factor precisely by photographing acalibration luminaire of known radiance, and scaling the radiancevalues to agree with the known radiance of the luminaire.

2.6 Color

Color images, consisting of red, green, and blue channels, can beprocessed by reconstructing the imaging system response curve for

7This work was done in collaboration with Gregory Ward Larson8Conveniently, most digital cameras also specify their sensitivity in terms

of ASA.

Page 99: HDRI and Image-Based Lighting

each channel independently. Unfortunately, there will be three un-known scaling factors relating relative radiance to absolute radi-ance, one for each channel. As a result, different choices of thesescaling factors will change the color balance of the radiance map.

By default, the algorithm chooses the scaling factor such that apixel with valueZmid will have unit exposure. Thus, any pixel withthe RGB value (Zmid; Zmid; Zmid) will have equal radiance val-ues for R, G, and B, meaning that the pixel is achromatic. If thethree channels of the imaging system actually do respond equally toachromatic light in the neighborhood of Zmid, then our procedurecorrectly reconstructs the relative radiances.

However, films are usually calibrated to respond achromaticallyto a particular color of light C, such as sunlight or fluorescent light.In this case, the radiance values of the three channels should bescaled so that the pixel value (Zmid; Zmid; Zmid) maps to a radi-ance with the same color ratios as C. To properly model the colorresponse of the entire imaging process rather than just the film re-sponse, the scaling terms can be adjusted by photographing a cali-bration luminaire of known color.

2.7 Taking virtual photographs

The recovered response functions can also be used to map radiancevalues back to pixel values for a given exposure �t using Equa-tion 1. This process can be thought of as taking a virtual photographof the radiance map, in that the resulting image will exhibit the re-sponse qualities of the modeled imaging system. Note that the re-sponse functions used need not be the same response functions usedto construct the original radiance map, which allows photographsacquired with one imaging process to be rendered as if they wereacquired with another.9

3 ResultsFigures 3-5 show the results of using our algorithm to determine theresponse curve of a DCS460 digital camera. Eleven grayscale pho-tographs filtered down to 765�509 resolution (Fig. 3) were taken atf/8 with exposure times ranging from 1

30of a second to 30 seconds,

with each image receiving twice the exposure of the previous one.The film curve recovered by our algorithm from 45 pixel locationsobserved across the image sequence is shown in Fig. 4. Note that al-though CCD image arrays naturally produce linear output, from thecurve it is evident that the camera nonlinearly remaps the data, pre-sumably to mimic the response curves found in film. The underlyingregistered (Ei�tj ; Zij) data are shown as light circles underneaththe curve; some outliers are due to sensor artifacts (light horizontalbands across some of the darker images.)

Fig. 5 shows the reconstructed high dynamic range radiance map.To display this map, we have taken the logarithm of the radiancevalues and mapped the range of these values into the range of thedisplay. In this representation, the pixels at the light regions do notsaturate, and detail in the shadow regions can be made out, indicat-ing that all of the information from the original image sequence ispresent in the radiance map. The large range of values present inthe radiance map (over four orders of magnitude of useful dynamicrange) is shown by the values at the marked pixel locations.

Figure 6 shows sixteen photographs taken inside a church with aCanon 35mm SLR camera on Fuji 100 ASA color print film. A fish-eye 15mm lens set at f/8 was used, with exposure times ranging from30 seconds to 1

1000of a second in 1-stop increments. The film was

developed professionally and scanned in using a Kodak PhotoCDfilm scanner. The scanner was set so that it would not individually

9Note that here we are assuming that the spectral response functions foreach channel of the two imaging processes is the same. Also, this techniquedoes not model many significant qualities of an imaging system such as filmgrain, chromatic aberration, blooming, and the modulation transfer function.

Figure 3: (a) Eleven grayscale photographs of an indoor scene ac-quired with a Kodak DCS460 digital camera, with shutter speedsprogressing in 1-stop increments from 1

30of a second to 30 seconds.

−10 −5 0 50

50

100

150

200

250

log exposure X

pixe

l val

ue Z

Figure 4: The response function of the DCS460 recovered by our al-gorithm, with the underlying (Ei�tj ; Zij) data shown as light cir-cles. The logarithm is base e.

Figure 5: The reconstructed high dynamic range radiance map,mapped into a grayscale image by taking the logarithm of the ra-diance values. The relative radiance values of the marked pixel lo-cations, clockwise from lower left: 1.0, 46.2, 1907.1, 15116.0, and18.0.

Page 100: HDRI and Image-Based Lighting

Figure 6: Sixteen photographs of a church taken at 1-stop increments from 30 sec to 1

1000sec. The sun is directly behind the rightmost stained

glass window, making it especially bright. The blue borders seen in some of the image margins are induced by the image registration process.

−10 −5 0 50

50

100

150

200

250

log exposure X

pixe

l val

ue Z

Red

−10 −5 0 50

50

100

150

200

250

log exposure X

pixe

l val

ue ZGreen

(a) (b)

−10 −5 0 50

50

100

150

200

250

log exposure X

pixe

l val

ue Z

Blue

−5 −4 −3 −2 −1 0 1 20

50

100

150

200

250

log exposure X

pixe

l val

ue Z

Red (dashed), Green (solid), and Blue (dash−dotted) curves

(c) (d)

Figure 7: Recovered response curves for the imaging system used in the church photographs in Fig. 8. (a-c) Response functions for the red,green, and blue channels, plotted with the underlying (Ei�tj ; Zij) data shown as light circles. (d) The response functions for red, green,and blue plotted on the same axes. Note that while the red and green curves are very consistent, the blue curve rises significantly above theothers for low exposure values. This indicates that dark regions in the images exhibit a slight blue cast. Since this artifact is recovered by theresponse curves, it does not affect the relative radiance values.

Page 101: HDRI and Image-Based Lighting

(a) (b) (c)

(d) (e) (f)

Figure 8: (a) An actual photograph, taken with conventional print film at two seconds and scanned to PhotoCD. (b) The high dynamic rangeradiance map, displayed by linearly mapping its entire dynamic range into the dynamic range of the display device. (c) The radiance map,displayed by linearly mapping the lower 0:1% of its dynamic range to the display device. (d) A false-color image showing relative radiancevalues for a grayscale version of the radiance map, indicating that the map contains over five orders of magnitude of useful dynamic range.(e) A rendering of the radiance map using adaptive histogram compression. (f) A rendering of the radiance map using histogram compressionand also simulating various properties of the human visual system, such as glare, contrast sensitivity, and scotopic retinal response. Images(e) and (f) were generated by a method described in [23]. Images (d-f) courtesy of Gregory Ward Larson.

Page 102: HDRI and Image-Based Lighting

adjust the brightness and contrast of the images10 to guarantee thateach image would be digitized using the same response function.

An unfortunate aspect of the PhotoCD process is that it does notscan precisely the same area of each negative relative to the extentsof the image.11 To counteract this effect, we geometrically regis-tered the images to each other using a using normalized correlation(see [4]) to determine, with sub-pixel accuracy, corresponding pix-els between pairs of images.

Fig. 7(a-c) shows the response functions for the red, green, andblue channels of the church sequence recovered from 28 pixel loca-tions. Fig. 7(d) shows the recovered red, green, and blue responsecurves plotted on the same set of axes. From this plot, we can seethat while the red and green curves are very consistent, the bluecurve rises significantly above the others for low exposure values.This indicates that dark regions in the images exhibit a slight bluecast. Since this artifact is modeled by the response curves, it willnot affect the relative radiance values.

Fig. 8 interprets the recovered high dynamic range radiance mapin a variety of ways. Fig. 8(a) is one of the actual photographs,which lacks detail in its darker regions at the same time that manyvalues within the two rightmost stained glass windows are saturated.Figs. 8(b,c) show the radiance map, linearly scaled to the display de-vice using two different scaling factors. Although one scaling fac-tor is one thousand times the other, there is useful detail in both im-ages. Fig. 8(d) is a false-color image showing radiance values fora grayscale version of the radiance map; the highest listed radiancevalue is nearly 250,000 times that of the lowest. Figs. 8(e,f) showtwo renderings of the radiance map using a new tone reproductionalgorithm [23]. Although the rightmost stained glass window hasradiance values over a thousand times higher than the darker areasin the rafters, these renderings exhibit detail in both areas.

Figure 9 demonstrates two applications of the techniques pre-sented in this paper: accurate signal processing and virtual photog-raphy. The task is to simulate the effects of motion blur caused bymoving the camera during the exposure. Fig. 9(a) shows the re-sults of convolving an actual, low-dynamic range photograph witha 37 � 1 pixel box filter to simulate horizontal motion blur. Fig.9(b) shows the results of applying this same filter to the high dy-namic range radiance map, and then sending this filtered radiancemap back through the recovered film response functions using thesame exposure time�t as in the actual photograph. Because we areseeing this image through the actual image response curves, the twoleft images are tonally consistent with each other. However, there isa large difference between these two images near the bright spots. Inthe photograph, the bright radiance values have been clamped to themaximum pixel values by the response function. As a result, theseclamped values blur with lower neighboring values and fail to satu-rate the image in the final result, giving a muddy appearance.

In Fig. 9(b), the extremely high pixel values were representedproperly in the radiance map and thus remained at values above thelevel of the response function’s saturation point within most of theblurred region. As a result, the resulting virtual photograph exhibitsseveral crisply-defined saturated regions.

Fig. 9(c) is an actual photograph with real motion blur inducedby spinning the camera on the tripod during the exposure, which isequal in duration to Fig. 9(a) and the exposure simulated in Fig.9(b). Clearly, in the bright regions, the blurring effect is qualita-tively similar to the synthetic blur in 9(b) but not 9(a). The preciseshape of the real motion blur is curved and was not modeled for thisdemonstration.

10This feature of the PhotoCD process is called “Scene Balance Adjust-ment”, or SBA.

11This is far less of a problem for cinematic applications, in which the filmsprocket holes are used to expose and scan precisely the same area of eachframe.

(a) Synthetically blurred digital image

(b) Synthetically blurred radiance map

(c) Actual blurred photographFigure 9: (a) Synthetic motion blur applied to one of the origi-nal digitized photographs. The bright values in the windows areclamped before the processing, producing mostly unsaturated val-ues in the blurred regions. (b) Synthetic motion blur applied toa recovered high-dynamic range radiance map, then virtually re-photographed through the recovered film response curves. The ra-diance values are clamped to the display device after the processing,allowing pixels to remain saturated in the window regions. (c) Realmotion blur created by rotating the camera on the tripod during theexposure, which is much more consistent with (b) than (a).

Page 103: HDRI and Image-Based Lighting

4 ConclusionWe have presented a simple, practical, robust and accurate methodof recovering high dynamic range radiance maps from ordinary pho-tographs. Our method uses the constraint of sensor reciprocity toderive the response function and relative radiance values directlyfrom a set of images taken with different exposures. This work hasa wide variety of applications in the areas of image-based modelingand rendering, image processing, and image compositing, a few ofwhich we have demonstrated. It is our hope that this work will beable to help both researchers and practitioners of computer graphicsmake much more effective use of digitized photographs.

Acknowledgments

The authors wish to thank Tim Hawkins, Carlo Sequin, DavidForsyth, Steve Chenney, Chris Healey, and our reviewers for theirvaluable help in revising this paper. This research was supported bya Multidisciplinary University Research Initiative on three dimen-sional direct visualization from ONR and BMDO, grant FDN00014-96-1-1200.

References[1] ADAMS, A. Basic Photo, 1st ed. Morgan & Morgan,

Hastings-on-Hudson, New York, 1970.

[2] CHEN, E. QuickTime VR - an image-based approach to vir-tual environment navigation. In SIGGRAPH ’95 (1995).

[3] DEBEVEC, P. E., TAYLOR, C. J., AND MALIK, J. Model-ing and rendering architecture from photographs: A hybridgeometry- and image-based approach. In SIGGRAPH ’96(August 1996), pp. 11–20.

[4] FAUGERAS, O. Three-Dimensional Computer Vision. MITPress, 1993.

[5] FERWERDA, J. A., PATTANAIK, S. N., SHIRLEY, P., ANDGREENBERG, D. P. A model of visual adaptation for realisticimage synthesis. In SIGGRAPH ’96 (1996), pp. 249–258.

[6] GORTLER, S. J., GRZESZCZUK, R., SZELISKI, R., AND CO-HEN, M. F. The Lumigraph. In SIGGRAPH ’96 (1996),pp. 43–54.

[7] HORN, B. K. P. Robot Vision. MIT Press, Cambridge, Mass.,1986, ch. 10, pp. 206–208.

[8] JAMES, T., Ed. The Theory of the Photographic Process.Macmillan, New York, 1977.

[9] KAUFMAN, J. E., Ed. IES Lighting Handbook; the standardlighting guide, 7th ed. Illuminating Engineering Society, NewYork, 1987, p. 24.

[10] KOLB, C., MITCHELL, D., AND HANRAHAN, P. A realis-tic camera model for computer graphics. In SIGGRAPH ’95(1995).

[11] LAVEAU, S., AND FAUGERAS, O. 3-D scene representationas a collection of images. In Proceedings of 12th InternationalConference on Pattern Recognition (1994), vol. 1, pp. 689–691.

[12] LEVOY, M., AND HANRAHAN, P. Light field rendering. InSIGGRAPH ’96 (1996), pp. 31–42.

[13] MADDEN, B. C. Extended intensity range imaging. Tech.rep., GRASP Laboratory, University of Pennsylvania, 1993.

[14] MANN, S., AND PICARD, R. W. Being ’undigital’ with dig-ital cameras: Extending dynamic range by combining differ-ently exposed pictures. In Proceedings of IS&T 46th annualconference (May 1995), pp. 422–428.

[15] MCMILLAN, L., AND BISHOP, G. Plenoptic Modeling: Animage-based rendering system. In SIGGRAPH ’95 (1995).

[16] SCHLICK, C. Quantization techniques for visualization ofhigh dynamic range pictures. In Fifth Eurographics Workshopon Rendering (Darmstadt, Germany) (June 1994), pp. 7–18.

[17] SZELISKI, R. Image mosaicing for tele-reality applications.In IEEE Computer Graphics and Applications (1996).

[18] TANI, T. Photographic sensitivity : theory and mechanisms.Oxford University Press, New York, 1995.

[19] THEUWISSEN, A. J. P. Solid-state imaging with charge-coupled devices. Kluwer Academic Publishers, Dordrecht;Boston, 1995.

[20] TUMBLIN, J., AND RUSHMEIER, H. Tone reproduction forrealistic images. IEEE Computer Graphics and Applications13, 6 (1993), 42–48.

[21] WARD, G. J. Measuring and modeling anisotropic reflection.In SIGGRAPH ’92 (July 1992), pp. 265–272.

[22] WARD, G. J. The radiance lighting simulation and renderingsystem. In SIGGRAPH ’94 (July 1994), pp. 459–472.

[23] WARD, G. J., RUSHMEIER, H., AND PIATKO, C. A visi-bility matching tone reproduction operator for high dynamicrange scenes. Tech. Rep. LBNL-39882, Lawrence BerkeleyNational Laboratory, March 1997.

A Matlab CodeHere is the MATLAB code used to solve the linear system that min-imizes the objective function O in Equation 3. Given a set of ob-served pixel values in a set of images with known exposures, thisroutine reconstructs the imaging response curve and the radiancevalues for the given pixels. The weighting function w(z) is foundin Equation 4.

%% gsolve.m − Solve for imaging system response function%% Given a set of pixel values observed for several pixels in several% images with different exposure times, this function returns the% imaging system’s response function g as well as the log film irradiance% values for the observed pixels.%% Assumes:%% Zmin = 0% Zmax = 255%% Arguments:%% Z(i,j) is the pixel values of pixel location number i in image j% B(j) is the log delta t, or log shutter speed, for image j% l is lamdba, the constant that determines the amount of smoothness% w(z) is the weighting function value for pixel value z% % Returns:%% g(z) is the log exposure corresponding to pixel value z% lE(i) is the log film irradiance at pixel location i%

function [g,lE]=gsolve(Z,B,l,w)

n = 256;

A = zeros(size(Z,1)*size(Z,2)+n+1,n+size(Z,1));b = zeros(size(A,1),1);

%% Include the data−fitting equations

k = 1;for i=1:size(Z,1) for j=1:size(Z,2) wij = w(Z(i,j)+1); A(k,Z(i,j)+1) = wij; A(k,n+i) = −wij; b(k,1) = wij * B(i,j); k=k+1; endend

%% Fix the curve by setting its middle value to 0

A(k,129) = 1;k=k+1;

%% Include the smoothness equations

for i=1:n−2 A(k,i)=l*w(i+1); A(k,i+1)=−2*l*w(i+1); A(k,i+2)=l*w(i+1); k=k+1;end

%% Solve the system using SVD

x = A\b;

g = x(1:n);lE = x(n+1:size(x,1));

Page 104: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

Rendering Synthetic Objects into Real Scenes:Bridging Traditional and Image-based Graphics with Global Illumination

and High Dynamic Range Photography

Paul Debevec

University of California at Berkeley1

ABSTRACT

We present a method that uses measured scene radiance and globalillumination in order to add new objects to light-based models withcorrect lighting. The method uses a high dynamic range image-based model of the scene, rather than synthetic light sources, to il-luminate the new objects. To compute the illumination, the scene isconsidered as three components: the distant scene, the local scene,and the synthetic objects. The distant scene is assumed to be pho-tometrically unaffected by the objects, obviating the need for re-flectance model information. The local scene is endowed with es-timated reflectance model information so that it can catch shadowsand receive reflected light from the new objects. Renderings arecreated with a standard global illumination method by simulatingthe interaction of light amongst the three components. A differen-tial rendering technique allows for good results to be obtained whenonly an estimate of the local scene reflectance properties is known.

We apply the general method to the problem of rendering syn-thetic objects into real scenes. The light-based model is constructedfrom an approximate geometric model of the scene and by using alight probe to measure the incident illumination at the location ofthe synthetic objects. The global illumination solution is then com-posited into a photograph of the scene using the differential render-ing technique. We conclude by discussing the relevance of the tech-nique to recovering surface reflectance properties in uncontrolledlighting situations. Applications of the method include visual ef-fects, interior design, and architectural visualization.

CR Descriptors: I.2.10 [Artificial Intelligence]: Vision andScene Understanding - Intensity, color, photometry and threshold-ing; I.3.7 [Computer Graphics]: Three-Dimensional Graphics andRealism - Color, shading, shadowing, and texture; I.3.7 [ComputerGraphics]: Three-Dimensional Graphics and Realism - Radiosity;I.4.1 [Image Processing]: Digitization - Scanning; I.4.8 [ImageProcessing]: Scene Analysis - Photometry, Sensor Fusion.

1Computer Science Division, University of California at Berke-ley, Berkeley, CA 94720−1776. Email: [email protected] information and additional results may be found at:http://www.cs.berkeley.edu/˜debevec/Research

1 IntroductionRendering synthetic objects into real-world scenes is an importantapplication of computer graphics, particularly in architectural andvisual effects domains. Oftentimes, a piece of furniture, a prop, ora digital creature or actor needs to be rendered seamlessly into areal scene. This difficult task requires that the objects be lit con-sistently with the surfaces in their vicinity, and that the interplay oflight between the objects and their surroundings be properly simu-lated. Specifically, the objects should cast shadows, appear in reflec-tions, and refract, focus, and emit light just as real objects would.

LocalScene

estimatedreflectance

model

DistantScene

light−based(no reflectance

model)

SyntheticObjects

knownreflectance

model

light

Figure 1: The General Method In our method for adding syntheticobjects into light-based scenes, the scene is partitioned into threecomponents: the distant scene, the local scene, and the synthetic ob-jects. Global illumination is used to simulate the interplay of lightamongst all three components, except that light reflected back at thedistant scene is ignored. As a result, BRDF information for the dis-tant scene is unnecessary. Estimates of the geometry and materialproperties of the local scene are used to simulate the interaction oflight between it and the synthetic objects.

Currently available techniques for realistically rendering syn-thetic objects into scenes are labor intensive and not always success-ful. A common technique is to manually survey the positions of thelight sources, and to instantiate a virtual light of equal color and in-tensity for each real light to illuminate the synthetic objects. An-other technique is to photograph a reference object (such as a graysphere) in the scene where the new object is to be rendered, anduse its appearance as a qualitative guide in manually configuring thelighting environment. Lastly, the technique of reflection mapping isuseful for mirror-like reflections. These methods typically requireconsiderable hand-refinement and none of them easily simulates theeffects of indirect illumination from the environment.

Page 105: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

Accurately simulating the effects of both direct and indirect light-ing has been the subject of research in global illumination. With aglobal illumination algorithm, if the entire scene were modeled withits full geometric and reflectance (BRDF) characteristics, one couldcorrectly render a synthetic object into the scene simply by adding itto the model and recomputing the global illumination solution. Un-fortunately, obtaining a full geometric and reflectance model of alarge environment is extremeley difficult. Furthermore, global il-lumination solutions for large complex environments are extremelycomputationally intensive.

Moreover, it seems that having a full reflectance model of thelarge-scale scene should be unnecessary: under most circumstances,a new object will have no significant effect on the appearance ofmost of the of the distant scene. Thus, for such distant areas, know-ing just its radiance (under the desired lighting conditions) shouldsuffice.

Recently, [9] introduced a high dynamic range photographictechnique that allows accurate measurements of scene radiance tobe derived from a set of differently exposed photographs. This tech-nique allows both low levels of indirect radiance from surfaces andhigh levels of direct radiance from light sources to be accuratelyrecorded. When combined with image-based modeling techniques(e.g. [22, 24, 4, 10, 23, 17, 29]), and possibly active techniques formeasuring geometry (e.g. [35, 30, 7, 27]) these derived radiancemaps can be used to construct spatial representations of scene ra-diance.

We will use the term light-based model to refer to a repre-sentation of a scene that consists of radiance information, possi-bly with specific reference to light leaving surfaces, but not neces-sarily containing material property (BRDF) information. A light-based model can be used to evaluate the 5D plenoptic function [1]P (�; �; Vx; Vy; Vz) for a given virtual or real subset of space1. Amaterial-based model is converted to a light-based model by com-puting an illumination solution for it. A light-based model is differ-entiated from an image-based model in that its light values are ac-tual measures of radiance2, whereas image-based models may con-tain pixel values already transformed and truncated by the responsefunction of an image acquisition or synthesis process.

In this paper, we present a general method for using accuratemeasurements of scene radiance in conjunction with global illumi-nation to realistically add new objects to light-based models. Thesynthetic objects may have arbitrary material properties and can berendered with appropriate illumination in arbitrary lighting environ-ments. Furthermore, the objects can correctly interact with the en-vironment around them: they cast the appropriate shadows, they areproperly reflected, they can reflect and focus light, and they exhibitappropriate diffuse interreflection. The method can be carried outwith commonly available equipment and software.

In this method (see Fig. 1), the scene is partitioned into threecomponents. The first is the distant scene, which is the visible partof the environment too remote to be perceptibly affected by the syn-thetic object. The second is the local scene, which is the part of theenvironment which will be significantly affected by the presence ofthe objects. The third component is the synthetic objects. Our ap-proach uses global illumination to correctly simulate the interactionof light amongst these three elements, with the exception that lightradiated toward the distant environment will not be considered in thecalculation. As a result, the BRDF of the distant environment neednot be known — the technique uses BRDF information only for thelocal scene and the synthetic objects. We discuss the challenges inestimating the BRDF of the local scene, and methods for obtain-ing usable approximations. We also present a differential rendering

1Time and wavelength dependence can be included to represent the gen-eral 7D plenoptic function as appropriate.

2In practice, the measures of radiance are with respect to a discrete set ofspectral distributions such as the standard tristimulus model.

technique that produces perceptually accurate results even when theestimated BRDF is somewhat inaccurate.

We demonstrate the general method for the specific case of ren-dering synthetic objects into particular views of a scene (such asbackground plates) rather than into a general image-based model. Inthis method, a light probe is used to acquire a high dynamic rangepanoramic radiance map near the location where the object will berendered. A simple example of a light probe is a camera aimed at amirrored sphere, a configuration commonly used for acquiring envi-ronment maps. An approximate geometric model of the scene is cre-ated (via surveying, photogrammetry, or 3D scanning) and mappedwith radiance values measured with the light probe. The distantscene, local scene, and synthetic objects are rendered with globalillumination from the same point of view as the background plate,and the results are composited into the background plate with a dif-ferential rendering technique.

1.1 Overview

The rest of this paper is organized as follows. In the next sectionwe discuss work related to this paper. Section 3 introduces the ba-sic technique of using acquired maps of scene radiance to illuminatesynthetic objects. Section 4 presents the general method we will useto render synthetic objects into real scenes. Section 5 describes apractical technique based on this method using a light probe to mea-sure incident illumination. Section 6 presents a differential render-ing technique for rendering the local environment with only an ap-proximate description of its reflectance. Section 7 presents a sim-ple method to approximately recover the diffuse reflectance char-acteristics of the local environment. Section 8 presents results ob-tained with the technique. Section 9 discusses future directions forthis work, and we conclude in Section 10.

2 Background and Related WorkThe practice of adding new objects to photographs dates to the earlydays of photography in the simple form of pasting a cut-out from onepicture onto another. While the technique conveys the idea of thenew object being in the scene, it usually fails to produce an imagethat as a whole is a believable photograph. Attaining such realismrequires a number of aspects of the two images to match. First, thecamera projections should be consistent, otherwise the object mayseem too foreshortened or skewed relative to the rest of the picture.Second, the patterns of film grain and film response should match.Third, the lighting on the object needs to be consistent with otherobjects in the environment. Lastly, the object needs to cast realisticshadows and reflections on the scene. Skilled artists found that bygiving these considerations due attention, synthetic objects could bepainted into still photographs convincingly.

In optical film compositing, the use of object mattes to preventparticular sections of film from being exposed made the same sort ofcut-and-paste compositing possible for moving images. However,the increased demands of realism imposed by the dynamic nature offilm made matching camera positions and lighting even more criti-cal. As a result, care was taken to light the objects appropriately forthe scene into which they were to be composited. This would stillnot account for the objects casting shadows onto the scene, so oftenthese were painted in by an artist frame by frame [13, 2, 28]. Digi-tal film scanning and compositing [26] helped make this process farmore efficient.

Work in global illumination [16, 19] has recently produced algo-rithms (e.g. [31]) and software (e.g. [33]) to realistically simulatelighting in synthetic scenes, including indirect lighting with bothspecular and diffuse reflections. We leverage this work in order tocreate realistic renderings.

Some work has been done on the specific problem of composit-ing objects into photography. [25] presented a procedure for ren-

2

Page 106: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

dering architecture into background photographs using knowledgeof the sun position and measurements or approximations of the lo-cal ambient light. For diffuse buildings in diffuse scenes, the tech-nique is effective. The technique of reflection mapping (also calledenvironment mapping) [3, 18] produces realistic results for mirror-like objects. In reflection mapping, a panoramic image is renderedor photographed from the location of the object. Then, the surfacenormals of the object are used to index into the panoramic imageby reflecting rays from the desired viewpoint. As a result, the shinyobject appears to properly reflect the desired environment3. How-ever, the technique is limited to mirror-like reflection and does notaccount for objects casting light or shadows on the environment.

A common visual effects technique for having synthetic objectscast shadows on an existing environment is to create an approximategeometric model of the environment local to the object, and thencompute the shadows from the various light sources. The shadowscan then be subtracted from the background image. In the hands ofprofessional artists this technique can produce excellent results, butit requires knowing the position, size, shape, color, and intensity ofeach of the scene’s light sources. Furthermore, it does not accountfor diffuse reflection from the scene, and light reflected by the ob-jects onto the scene must be handled specially.

To properly model the interaction of light between the objects andthe local scene, we pose the compositing problem as a global illumi-nation computation as in [14] and [12]. As in this work, we applythe effect of the synthetic objects in the lighting solution as a dif-ferential update to the original appearance of the scene. In the pre-vious work an approximate model of the entire scene and its origi-nal light sources is constructed; the positions and sizes of the lightsources are measured manually. Rough methods are used to esti-mate diffuse-only reflectance characteristics of the scene, which arethen used to estimate the intensities of the light sources. [12] addi-tionally presents a method for performing fast updates of the illu-mination solution in the case of moving objects. As in the previouswork, we leverage the basic result from incremental radiosity [6, 5]that making a small change to a scene does not require recomputingthe entire solution.

3 Illuminating synthetic objects with reallight

In this section we propose that computer-generated objects be lit byactual recordings of light from the scene, using global illumination.Performing the lighting in this manner provides a unified and phys-ically accurate alternative to manually attempting to replicate inci-dent illumination conditions.

Accurately recording light in a scene is difficult because of thehigh dynamic range that scenes typically exhibit; this wide rangeof brightness is the result of light sources being relatively concen-trated. As a result, the intensity of a source is often two to six ordersof magnitude larger than the intensity of the non-emissive parts ofan environment. However, it is necessary to accurately record boththe large areas of indirect light from the environment and the con-centrated areas of direct light from the sources since both are signif-icant parts of the illumination solution.

Using the technique introduced in [9], we can acquire correctmeasures of scene radiance using conventional imaging equipment.The images, called radiance maps, are derived from a series of im-ages with different sensor integration times and a technique for com-puting and accounting for the imaging system response function f .We can use these measures to illuminate synthetic objects exhibitingarbitrary material properties.

Fig. 2 shows a high-dynamic range lighting environment withelectric, natural, and indirect lighting. This environment was

3Using the surface normal indexing method, the object will not reflectitself. Correct self-reflection can be obtained through ray tracing.

recorded by taking a full dynamic range photograph of a mirroredball on a table (see Section 5). A digital camera was used to acquirea series images in one-stop exposure increments from 1

4to 1

10000

second. The images were fused using the technique in [9].The environment is displayed at three exposure levels (-0, -3.5,

and -7.0 stops) to show its full dynamic range. Recovered RGB ra-diance values for several points in the scene and on the two majorlight sources are indicated; the color difference between the tung-sten lamp and the sky is evident. A single low-dynamic range pho-tograph would be unable to record the correct colors and intensitiesover the entire scene.

Fig. 3(a-e) shows the results of using this panoramic radiancemap to synthetically light a variety of materials using the RADI-ANCE global illumination algorithm [33]. The materials are: (a)perfectly reflective, (b) rough gold, (c) perfectly diffuse gray ma-terial, (d) shiny green plastic, and (e) dull orange plastic. Sincewe are computing a full illumination solution, the objects exhibitself-reflection and shadows from the light sources as appropriate.Note that in (c) the protrusions produce two noticeable shadows ofslightly different colors, one corresponding to the ceiling light anda softer shadow corresponding to the window.

The shiny plastic object in (d) has a 4 percent specular componentwith a Gaussian roughness of 0.04 [32]. Since the object’s surfaceboth blurs and attenuates the light with its rough specular compo-nent, the reflections fall within the dynamic range of our display de-vice and the different colors of the light sources can be seen. In (e)the rough plastic diffuses the incident light over a much larger area.

To illustrate the importance of using high dynamic range radi-ance maps, the same renderings were produced using just one ofthe original photographs as the lighting environment. In this singleimage, similar in appearance to Fig. 2(a), the brightest regions hadbeen truncated to approximately 2 percent of their true values. Therendering of the mirrored surface (f) appears similar to (a) since itis displayed in low-dynamic range printed form. Significant errorsare noticeable in (g-j) since these materials blur the incident light.In (g), the blurring of the rough material darkens the light sources,whereas in (b) they remain saturated. Renderings (h-j) are very darkdue to the missed light; thus we have brightened by a factor of eighton the right in order to make qualitative comparisons to (c-e) pos-sible. In each it can be seen that the low-dynamic range image ofthe lighting environment fails to capture the information necessaryto simulate correct color balance, shadows, and highlights.

Fig. 4 shows a collection of objects with different material prop-erties illuminated by two different environments. A wide varietyof light interaction between the objects and the environment can beseen. The (synthetic) mirrored ball reflects both the synthetic ob-jects as well as the environment. The floating diffuse ball showsa subtle color shift along its right edge as it shadows itself fromthe windows and is lit primarily by the incandescent lamp in Fig.4(a). The reflection of the environment in the black ball (which hasa specular intensity of 0.04) shows the colors of the light sources,which are too bright to be seen in the mirrored ball. A variety ofshadows, reflections, and focused light can be observed on the rest-ing surface.

The next section describes how the technique of using radiancemaps to illuminate synthetic objects can be extended to compute theproper photometric interaction of the objects with the scene. It alsodescribes how high dynamic range photography and image-basedmodeling combine in a natural manner to allow the simulation ofarbitrary (non-infinite) lighting environments.

4 The General MethodThis section explains our method for adding new objects to light-based scene representations. As in Fig. 1, we partition our sceneinto three parts: the distant scene, the local scene, and the synthetic

3

Page 107: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

(11700,7300,2600)

(5700,8400,11800)

(60,40,35) (620,890,1300)

(18,17,19)

Figure 2: An omnidirectional radiance map This full dynamic range lighting environment was acquired by photographing a mirrored ballbalanced on the cap of a pen sitting on a table. The environment contains natural, electric, and indirect light. The three views of this imageadjusted to (a) +0 stops, (b) -3.5 stops, and (c) -7.0 stops show that the full dynamic range of the scene has been captured without saturation.As a result, the image usefully records the direction, color, and intensity of all forms of incident light.

Figure 3: Illuminating synthetic objects with real light (Top row: a,b,c,d,e) With full dynamic range measurements of scene radiance fromFig. 2. (Bottom row: f,g,h,i,j) With low dynamic range information from a single photograph of the ball. The right sides of images (h,i,j)have been brightened by a factor of six to allow qualitative comparison to (c,d,e). The high dynamic range measurements of scene radianceare necessary to produce proper lighting on the objects.

Figure 4: Synthetic objects lit by two different environments (a) A collection of objects is illuminated by the radiance information in 2.The objects exhibit appropriate interreflection. (b) The same objects are illuminated by different radiance information obtained in an outdoorurban environment on an overcast day. The radiance map used for the illumination is shown in the upper left of each image. Candle holdermodel courtesy of Gregory Ward Larson.

4

Page 108: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

objects. We describe the geometric and photometric requirementsfor each of these components.

1. A light-based model of the distant sceneThe distant scene is constructed as a light-based model. Thesynthetic objects will receive light from this model, so it is nec-essary that the model store true measures of radiance ratherthan low dynamic range pixel values from conventional im-ages. The light-based model can take on any form, using verylittle explicit geometry [23, 17], some geometry [24], moder-ate geometry [10], or be a full 3D scan of an environment withview-dependent texture-mapped [11] radiance. What is im-portant is for the model to provide accurate measures of inci-dent illumination in the vicinity of the objects, as well as fromthe desired viewpoint. In the next section we will present aconvenient procedure for constructing a minimal model thatmeets these requirements.In the global illumination computation, the distant scene ra-diates light toward the local scene and the synthetic objects,but ignores light reflected back to it. We assume that no areaof the distant scene will be significantly affected by light re-flecting from the synthetic objects; if that were the case, thearea should instead belong to the local scene, which containsthe BRDF information necessary to interact with light. In theRADIANCE [33] system, this exclusively emissive behaviorcan be specified with the ”glow” material property.

2. An approximate material-based model of the local sceneThe local scene consists of the surfaces that will photomet-rically interact with the synthetic objects. It is this geome-try onto which the objects will cast shadows and reflect light.Since the local scene needs to fully participate in the illumina-tion solution, both its geometry and reflectance characteristicsshould be known, at least approximately. If the geometry ofthe local scene is not readily available with sufficient accuracyfrom the light-based model of the distant scene, there are vari-ous techniques available for determining its geometry throughactive or passive methods. In the common case where the lo-cal scene is a flat surface that supports the synthetic objects, itsgeometry is determined easily from the camera pose. Meth-ods for estimating the BRDF of the local scene are discussedin Section 7.Usually, the local scene will be the part of the scene that is geo-metrically close to the synthetic objects. When the local sceneis mostly diffuse, the rendering equation shows that the visibleeffect of the objects on the local scene decreases as the inversesquare of the distance between the two. Nonetheless, there is avariety of circumstances in which synthetic objects can signif-icantly affect areas of the scene not in the immediate vicinity.Some common circumstances are:

� If there are concentrated light sources illuminating theobject, then the object can cast a significant shadow ona distant surface collinear with it and the light source.

� If there are concentrated light sources and the object isflat and specular, it can focus a significant amount oflight onto a distant part of the scene.

� If a part of the distant scene is flat and specular (e.g. amirror on a wall), its appearance can be significantly af-fected by a synthetic object.

� If the synthetic object emits light (e.g. a synthetic laser),it can affect the appearance of the distant scene signifi-cantly.

These situations should be considered in choosing which partsof the scene should be considered local and which parts dis-tant. Any part of the scene that will be significantly affected in

its appearance from the desired viewpoint should be includedas part of the local scene.Since the local scene is a full BRDF model, it can be addedto the global illumination problem as would any other object.The local scene may consist of any number of surfaces and ob-jects with different material properties. For example, the localscene could consist of a patch of floor beneath the syntheticobject to catch shadows as well as a mirror surface hangingon the opposite wall to catch a reflection. The local scene re-places the corresponding part of the light-based model of thedistant scene.Since it can be difficult to determine the precise BRDF char-acteristics of the local scene, it is often desirable to have onlythe change in the local scene’s appearance be computed withthe BRDF estimate; its appearance due to illumination fromthe distant scene is taken from the original light-based model.This differential rendering method is presented in Section 6.

3. Complete material-based models of the objectsThe synthetic objects themselves may consist of any varietyof shapes and materials supported by the global illuminationsoftware, including plastics, metals, emitters, and dielectricssuch as glass and water. They should be placed in their desiredgeometric correspondence to the local scene.

Once the distant scene, local scene, and synthetic objects areproperly modeled and positioned, the global illumination softwarecan be used in the normal fashion to produce renderings from thedesired viewpoints.

5 Compositing using a light probeThis section presents a particular technique for constructing a light-based model of a real scene suitable for adding synthetic objects at aparticular location. This technique is useful for compositing objectsinto actual photography of a scene.

In Section 4, we mentioned that the light-based model of the dis-tant scene needs to appear correctly in the vicinity of the syntheticobjects as well as from the desired viewpoints. This latter require-ment can be satisfied if it is possible to directly acquire radiancemaps of the scene from the desired viewpoints. The former require-ment, that the appear photometrically correct in all directions inthe vicinity of the synthetic objects, arises because this informationcomprises the incident light which will illuminate the objects.

To obtain this part of the light-based model, we acquire a full dy-namic range omnidirectional radiance map near the location of thesynthetic object or objects. One technique for acquiring this radi-ance map is to photograph a spherical first-surface mirror, such as apolished steel ball, placed at or near the desired location of the syn-thetic object4. This procedure is illustrated in Fig. 7(a). An actualradiance map obtained using this method is shown in Fig. 2.

The radiance measurements observed in the ball are mapped ontothe geometry of the distant scene. In many circumstances this modelcan be very simple. In particular, if the objects are small and restingon a flat surface, one can model the scene as a horizontal plane forthe resting surface and a large dome for the rest of the environment.Fig. 7(c) illustrates the ball image being mapped onto a table surfaceand the walls and ceiling of a finite room; 5 shows the resulting light-based model.

5.1 Mapping from the probe to the scene model

To precisely determine the mapping between coordinates on the balland rays in the world, one needs to record the position of the ball

4Parabolic mirrors combined with telecentric lenses [34] can be used toobtain hemispherical fields of view with a consistent principal point, if sodesired.

5

Page 109: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

relative to the camera, the size of the ball, and the camera param-eters such as its location in the scene and focal length. With thisinformation, it is straightforward to trace rays from the camera cen-ter through the pixels of the image, and reflect rays off the ball intothe environment. Often a good approximation results from assum-ing the ball is small relative to the environment and that the camera’sview is orthographic.

The data acquired from a single ball image will exhibit a num-ber of artifacts. First, the camera (and possibly the photographer)will be visible. The ball, in observing the scene, interacts with it:the ball (and its support) can appear in reflections, cast shadows,and can reflect light back onto surfaces. Lastly, the ball will not re-flect the scene directly behind it, and will poorly sample the areanearby. If care is taken in positioning the ball and camera, these ef-fects can be minimized and will have a negligible effect on the finalrenderings. If the artifacts are significant, the images can be fixedmanually in image editing program or by selectively combining im-ages of the ball taken from different directions; Fig. 6 shows a rela-tively artifact-free enviroment constructed using the latter method.We have found that combining two images of the ball taken ninetydegrees apart from each other allows us to eliminate the camera’sappearance and to avoid poor sampling.

(a)

(b)Figure 6: Rendering with a Combined Probe Image The full dy-namic range environment map shown at the top was assembled fromtwo light probe images taken ninety degrees apart from each other.As a result, the only visible artifact is small amount of the probe sup-port visible on the floor. The map is shown at -4.5, 0, and +4.5 stops.The bottom rendering was produced using this lighting information,and exhibits diffuse and specular reflections, shadows from differentsources of light, reflections, and caustics.

5.2 Creating renderings

To render the objects into the scene, a synthetic local scene model iscreated as described in Section 4. Images of the scene from the de-sired viewpoint(s) are taken (Fig. 7(a)), and their position relative tothe scene is recorded through pose-instrumented cameras or (as inour work) photogrammetry. The location of the ball in the scene isalso recorded at this time. The global illumination software is thenrun to render the objects, local scene, and distant scene from the de-sired viewpoint (Fig. 7(d)).

The objects and local scene are then composited onto the back-ground image. To perform this compositing, a mask is created byrendering the objects and local scene in white and the distant scenein black. If objects in the distant scene (which may appear in frontof the objects or local scene from certain viewpoints) are geomet-rically modeled, they will properly obscure the local scene and theobjects as necessary. This compositing can be considered as a subsetof the general method (Section 4) wherein the light-based model ofthe distant scene acts as follows: if (Vx; Vy; Vz) corresponds to anactual view of the scene, return the radiance value looking in direc-tion (�; �). Otherwise, return the radiance value obtained by castingthe ray (�; �; Vx; Vy; Vz) onto the radiance-mapped distant scenemodel.

In the next section we describe a more robust method of com-positing the local scene into the background image.

6 Improving quality with differential ren-dering

The method we have presented so far requires that the local scenebe modeled accurately in both its geometry and its spatially varyingmaterial properties. If the model is inaccurate, the appearance of thelocal scene will not be consistent with the appearance of adjacentdistant scene. Such a border is readily apparent in Fig. 8(c), sincethe local scene was modeled with a homogeneous BRDF when inreality it exhibits a patterned albedo (see [21]). In this section wedescribe a method for greatly reducing such effects.

Suppose that we compute a global illumination solution for thelocal and distant scene models without including the synthetic ob-jects. If the BRDF and geometry of the local scene model were per-fectly accurate, then one would expect the appearance of the ren-dered local scene to be consistent with its appearance in the light-based model of the entire scene. Let us call the appearance of the lo-cal scene from the desired viewpoint in the light-based model LSb.In the context of the method described in Section 5, LSb is simplythe background image. We will let LSnoobj denote the appearanceof the local scene, without the synthetic objects, as calculated by theglobal illumination solution. The error in the rendered local scene(without the objects) is thus: Errls = LSnoobj � LSb. This errorresults from the difference between the BRDF characteristics of theactual local scene as compared to the modeled local scene.

LetLSobj denote the appearance of the local environment as cal-culated by the global illumination solution with the synthetic objectsin place. We can compensate for the error if we compute our finalrendering LSfinal as:

LSfinal = LSobj �Errls

Equivalently, we can write:

LSfinal = LSb + (LSobj � LSnoobj)

In this form, we see that whenever LSobj and LSnoobj are thesame (i.e. the addition of the objects to the scene had no effect onthe local scene) the final rendering of the local scene is equivalentto LSb (e.g. the background plate). When LSobj is darker thanLSnoobj , light is subtracted from the background to form shadows,

6

Page 110: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

Up

North

East

Down

West

South

Up

North

East

Down

West

South

Figure 5: A Light-Based Model A simple light-based model of a room is constructed by mapping the image from a light probe onto a box. Thebox corresponds to the upper half of the room, with the bottom face of the box being coincident with the top of the table. The model containsthe full dynamic range of the original scene, which is not reproduced in its entirety in this figure.

and when LSobj is lighter than LSnoobj light is added to the back-ground to produce reflections and caustics.

Stated more generally, the appearance of the local scene withoutthe objects is computed with the correct reflectance characteristicslit by the correct environment, and the change in appearance due tothe presence of the synthetic objects is computed with the modeledreflectance characteristics as lit by the modeled environment. Whilethe realism of LSfinal still benefits from having a good model ofthe reflectance characteristics of the local scene, the perceptual ef-fect of small errors in albedo or specular properties is considerablyreduced. Fig. 8(g) shows a final rendering in which the local en-vironment is computed using this differential rendering technique.The objects are composited into the image directly from the LSobjsolution shown in Fig. 8(c).

It is important to stress that this technique can still produce abi-trarily wrong results depending on the amount of error in the es-timated local scene BRDF and the inaccuracies in the light-basedmodel of the distance scene. In fact, Errls may be larger thanLSobj , causing LSfinal to be negative. An alternate approach isto compensate for the relative error in the appearance of the localscene: LSfinal = LSb(LSobj=LSnoobj). Inaccuracies in the localscene BDRF will also be reflected in the objects.

In the next section we discuss techniques for estimating theBRDF of the local scene.

7 Estimating the local scene BRDFSimulating the interaction of light between the local scene and thesynthetic objects requires a model of the reflectance characteristicsof the local scene. Considerable recent work [32, 20, 8, 27] has pre-sented methods for measuring the reflectance properties of mate-rials through observation under controlled lighting configurations.Furthermore, reflectance characteristics can also be measured withcommercial radiometric devices.

It would be more convenient if the local scene reflectance couldbe estimated directly from observation. Since the light-based modelcontains information about the radiance of the local scene as well asits irradiance, it actually contains information about the local scenereflectance. If we hypothesize reflectance characteristics for the lo-cal scene, we can illuminate the local scene with its known irradi-ance from the light-based model. If our hypothesis is correct, thenthe appearance should be consistent with the measured appearance.This suggests the following iterative method for recovering the re-flectance properties of the local scene:

1. Assume a reflectance model for the local scene (e.g. diffuseonly, diffuse + specular, metallic, or arbitrary BRDF, including

spatial variation)2. Choose approximate initial values for the parameters of the re-

flectance model3. Compute a global illumination solution for the local scene

with the current parameters using the observed lighting con-figuration or configurations.

4. Compare the appearance of the rendered local scene to its ac-tual appearance in one or more views.

5. If the renderings are not consistent, adjust the parameters ofthe reflectance model and return to step 3.

Efficient methods of performing the adjustment in step 5 that ex-ploit the properties of particular reflectance models are left as futurework. However, assuming a diffuse-only model of the local scenein step 1 makes the adjustment in step 5 straightforward. We have:

Lr1(�r; �r) =

Z2�

0

Z �=2

0

�dLi(�i; �i) cos �i sin �i d�i d�i =

�d

Z2�

0

Z �=2

0

Li(�i; �i) cos �i sin �i d�i d�i

If we initialize the local scene to be perfectly diffuse (�d = 1)everywhere, we have:

Lr2(�r; �r) =

Z2�

0

Z �=2

0

Li(�i; �i) cos �i sin �i d�i d�i

The updated diffuse reflectance coefficient for each part of the lo-cal scene can be computed as:

�0

d =Lr1(�r; �r)

Lr2(�r; �r)

In this manner, we use the global illumination calculation to ren-der each patch as a perfectly diffuse reflector, and compare the re-sulting radiance to the observed value. Dividing the two quantitiesyields the next estimate of the diffuse reflection coefficient �0

d. Ifthere is no interreflection within the local scene, then the �0

d esti-mates will make the renderings consistent. If there is interreflection,then the algorithm should be iterated until there is convergence.

For a trichromatic image, the red, green, and blue diffuse re-flectance values are computed independently. The diffuse charac-teristics of the background material used to produce Fig. 8(c) were

7

Page 111: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

(a) Acquiring the background photograph

light probe

(b) Using the light probe

distantscene

(c) Constructing the light-based model

local scene

syntheticobjects

distantscene

(d) Computing the global illumination solution

Figure 7: Using a light probe (a) The background plate of the scene(some objects on a table) is taken. (b) A light probe (in this case, thecamera photographing a steel ball) records the incident radiancenear the location of where the synthetic objects are to be placed.(c) A simplified light-based model of the distant scene is created asa planar surface for the table and a finite box to represent the restof the room. The scene is texture-mapped in high dynamic rangewith the radiance map from the light probe. The objects on the ta-ble, which were not explicitly modeled, become projected onto thetable. (d) Synthetic objects and a BRDF model of the local scene areadded to the light-based model of the distant scene. A global illumi-nation solution of this configuration is computed with light comingfrom the distant scene and interacting with the local scene and syn-thetic objects. Light reflected back to the distant scene is ignored.The results of this rendering are composited (possibly with differ-ential rendering) into the background plate from (a) to achieve thefinal result.

computed using this method, although it was assumed that the entirelocal scene had the same diffuse reflectance.

In the standard “plastic” illumination model, just two more co-efficients – those for specular intensity and roughness – need to bespecified. In Fig. 8, the specular coefficients for the local scene wereestimated manually based on the specular reflection of the windowin the table in Fig. 2.

8 Compositing ResultsFig. 5 shows a simple light-based model of a room constructed us-ing the panoramic radiance map from Fig. 2. The room model be-gins at the height of the table and continues to the ceiling; its mea-surements and the position of the ball within it were measured man-ually. The table surface is visible on the bottom face. Since the roommodel is finite in size, the light sources are effectively local ratherthan infinite. The stretching on the south wall is due to the poor sam-pling toward the silhouette edge of the ball.

Figs. 4 and 6 show complex arrangements of synthetic objects litentirely by a variety of light-based models. The selection and com-position of the objects in the scene was chosen to exhibit a wide vari-ety of light interactions, including diffuse and specular reflectance,multiple soft shadows, and reflected and focused light. Each ren-dering was produced using the RADIANCE system with two dif-fuse light bounces and a relatively high density of ambient samplepoints.

Fig. 8(a) is a background plate image into which the synthetic ob-jects will be rendered. In 8(b) a calibration grid was placed on thetable in order to determine the camera pose relative to the scene andto the mirrored ball, which can also be seen. The poses were deter-mined using the photogrammetric method in [10]. In 8(c), a modelof the local scene as well as the synthetic objects is geometricallymatched and composited onto the background image. Note that thelocal scene, while the same average color as the table, is readily dis-tinguishable at its edges and because it lacks the correct variationsin albedo.

Fig. 8(d) shows the results of lighting the local scene model withthe light-based model of the room, without the objects. This imagewill be compared to 8(c) in order to determine the effect the syn-thetic objects have on the local scene. Fig. 8(e) is a mask image inwhich the white areas indicate the location of the synthetic objects.If the distant or local scene were to occlude the objects, such regionswould be dark in this image.

Fig. 8(f) shows the difference between the appearance of the lo-cal scene rendered with (8(c)) and without (8(d)) the objects. For il-lustration purposes, the difference in radiance values have been off-set so that zero difference is shown in gray. The objects have beenmasked out using image 8(e). This difference image encodes boththe shadowing (dark areas) and reflected and focussed light (lightareas) imposed on the local scene by the addition of the syntheticobjects.

Fig. 8(g) shows the final result using the differential renderingmethod described in Section 6. The synthetic objects are copieddirectly from the global illumination solution 8(c) using the objectmask 8(e). The effects the objects have on the local scene are in-cluded by adding the difference image 8(f) (without offset) to thebackground image. The remainder of the scene is copied directlyfrom the background image 8(a). Note that in the mirror ball’s re-flection, the modeled local scene can be observed without the effectsof differential rendering — a limitation of the compositing tech-nique.

In this final rendering, the synthetic objects exhibit a consistentappearance with the real objects present in the background image8(a) in both their diffuse and specular shading, as well as the di-rection and coloration of their shadows. The somewhat specklednature of the object reflections seen in the table surface is due to

8

Page 112: HDRI and Image-Based Lighting

(a) Background photograph (b) Camera calibration grid and light probe

(c) Objects and local scene matched to background (d) Local scene, without objects, lit by the model

(e) Object matte (f) Difference in local scene between c and d

(g) Final result with differential rendering

Figure 8: Compositing synthetic objects into a real scene using a light probe and differential rendering

Page 113: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 98 conference proceedings

the stochastic nature of the particular global illumination algorithmused.

The differential rendering technique successfully eliminates theborder between the local scene and the background image seen in8(c). Note that the albedo texture of the table in the local scene areais preserved, and that a specular reflection of a background objecton the table (appearing just to the left of the floating sphere) is cor-rectly preserved in the final rendering. The local scene also exhibitsreflections from the synthetic objects. A caustic from the glass ballfocusing the light of the ceiling lamp onto the table is evident.

9 Future workThe method proposed here suggests a number of areas for futurework. One area is to investigate methods of automatically recov-ering more general reflectance models for the local scene geome-try, as proposed in Section 7. With such information available, theprogram might also also be able to suggest which areas of the sceneshould be considered as part of the local scene and which can safelybe considered distant, given the position and reflectance character-istics of the desired synthetic objects.

Some additional work could be done to allow the global illumina-tion algorithm to compute the ilumination solution more efficiently.One technique would be to have an algorithm automatically locateand identify concentrated light sources in the light-based model ofthe scene. With such knowledge, the algorithm could compute mostof the direct illumination in a forward manner, which could dra-matically increase the efficiency with which an accurate solutioncould be calculated. To the same end, use of the method presentedin [15] to expedite the solution could be investigated. For the caseof compositing moving objects into scenes, greatly increased effi-ciency could be obtained by adapting incremental radiosity methodsto the current framework.

10 ConclusionWe have presented a general framework for adding new objects tolight-based models with correct illumination. The method lever-ages a technique of using high dynamic range images of real sceneradiance to synthetically illuminate new objects with arbitrary re-flectance characteristics. We leverage this technique in a generalmethod to simulate interplay of light between synthetic objects andthe light-based environment, including shadows, reflections, andcaustics. The method can be implemented with standard global il-lumination techniques.

For the particular case of rendering synthetic objects into realscenes (rather than general light-based models), we have presented apractical instance of the method that uses a light probe to record inci-dent illumination in the vicinity of the synthetic objects. In addition,we have described a differential rendering technique that can con-vincingly render the interplay of light between objects and the localscene when only approximate reflectance information for the localscene is available. Lastly, we presented an iterative approach fordetermining reflectance characteristics of the local scene based onmeasured geometry and observed radiance in uncontrolled lightingconditions. It is our hope that the techniques presented here will beuseful in practice as well as comprise a useful framework for com-bining material-based and light-based graphics.

AcknowledgmentsThe author wishes to thank Chris Bregler, David Forsyth, Jianbo Shi, Charles Ying,Steve Chenney, and Andrean Kalemis for the various forms of help and advice theyprovided. Special gratitude is also due to Jitendra Malik for helping make this workpossible. Discussions with Michael Naimark and Steve Saunders helped motivate thiswork. Tim Hawkins provided extensive assistance on improving and revising this pa-per and provided invaluable assistance with image acquisition. Gregory Ward Larsondeserves great thanks for the RADIANCE lighting simulation system and his invalu-able assistance and advice in using RADIANCE in this research, for assisting with re-flectance measurements, and for very helpful comments and suggestions on the paper.This research was supported by a Multidisciplinary University Research Initiative on

three dimensional direct visualization from ONR and BMDO, grant FDN00014-96-1-1200.

References[1] ADELSON, E. H., AND BERGEN, J. R. Computational Models of Visual Pro-

cessing. MIT Press, Cambridge, Mass., 1991, ch. 1. The Plenoptic Function andthe Elements of Early Vision.

[2] AZARMI, M. Optical Effects Cinematography: Its Development, Methods, andTechniques. University Microfilms International, Ann Arbor, Michigan, 1973.

[3] BLINN, J. F. Texture and reflection in computer generated images. Communica-tions of the ACM 19, 10 (October 1976), 542–547.

[4] CHEN, E. QuickTime VR - an image-based approach to virtual environment nav-igation. In SIGGRAPH ’95 (1995).

[5] CHEN, S. E. Incremental radiosity: An extension of progressive radiosity to aninteractive synthesis system. In SIGGRAPH ’90 (1990), pp. 135–144.

[6] COHEN, M. F., CHEN, S. E., WALLACE, J. R., AND GREENBERG, D. P. A pro-gressive refinement approach to fast radiosity image generation. In SIGGRAPH’88 (1988), pp. 75–84.

[7] CURLESS, B., AND LEVOY, M. A volumetric method for building complex mod-els from range images. In SIGGRAPH ’96 (1996), pp. 303–312.

[8] DANA, K. J., GINNEKEN, B., NAYAR, S. K., AND KOENDERINK, J. J. Re-flectance and texture of real-world surfaces. In Proc. IEEE Conf. on Comp. Visionand Patt. Recog. (1997), pp. 151–157.

[9] DEBEVEC, P. E., AND MALIK, J. Recovering high dynamic range radiance mapsfrom photographs. In SIGGRAPH ’97 (August 1997), pp. 369–378.

[10] DEBEVEC, P. E., TAYLOR, C. J., AND MALIK, J. Modeling and rendering ar-chitecture from photographs: A hybrid geometry- and image-based approach. InSIGGRAPH ’96 (August 1996), pp. 11–20.

[11] DEBEVEC, P. E., YU, Y., AND BORSHUKOV, G. D. Efficient view-dependentimage-based rendering with projective texture-mapping. Tech. Rep. UCB//CSD-98-1003, University of California at Berkeley, 1998.

[12] DRETTAKIS, G., ROBERT, L., AND BOUGNOUX, S. Interactive common illu-mination for computer augmented reality. In 8th Eurographics workshop on Ren-dering, St. Etienne, France (May 1997), J. Dorsey and P. Slusallek, Eds., pp. 45–57.

[13] FIELDING, R. The Technique of Special Effects Cinematography. HastingsHouse, New York, 1968.

[14] FOURNIER, A., GUNAWAN, A., AND ROMANZIN, C. Common illuminationbetween real and computer generated scenes. In Graphics Interface (May 1993),pp. 254–262.

[15] GERSHBEIN, R., SCHRODER, P., AND HANRAHAN, P. Textures and radiosity:Controlling emission and reflection with texture maps. In SIGGRAPH ’94 (1994).

[16] GORAL, C. M., TORRANCE, K. E., GREENBERG, D. P., AND BATTAILE, B.Modeling the interaction of light between diffuse surfaces. In SIGGRAPH ’84(1984), pp. 213–222.

[17] GORTLER, S. J., GRZESZCZUK, R., SZELISKI, R., AND COHEN, M. F. TheLumigraph. In SIGGRAPH ’96 (1996), pp. 43–54.

[18] HECKBERT, P. S. Survey of texture mapping. IEEE Computer Graphics andApplications 6, 11 (November 1986), 56–67.

[19] KAJIYA, J. The rendering equation. In SIGGRAPH ’86 (1986), pp. 143–150.[20] KARNER, K. F., MAYER, H., AND GERVAUTZ, M. An image based measure-

ment system for anisotropic reflection. In EUROGRAPHICS Annual ConferenceProceedings (1996).

[21] KOENDERINK, J. J., AND VAN DOORN, A. J. Illuminance texture due to surfacemesostructure. J. Opt. Soc. Am. 13, 3 (1996).

[22] LAVEAU, S., AND FAUGERAS, O. 3-D scene representation as a collection ofimages. In Proceedings of 12th International Conference on Pattern Recognition(1994), vol. 1, pp. 689–691.

[23] LEVOY, M., AND HANRAHAN, P. Light field rendering. In SIGGRAPH ’96(1996), pp. 31–42.

[24] MCMILLAN, L., AND BISHOP, G. Plenoptic Modeling: An image-based ren-dering system. In SIGGRAPH ’95 (1995).

[25] NAKAMAE, E., HARADA, K., AND ISHIZAKI, T. A montage method: The over-laying of the computer generated images onto a background photograph. In SIG-GRAPH ’86 (1986), pp. 207–214.

[26] PORTER, T., AND DUFF, T. Compositing digital images. In SIGGRAPH 84 (July1984), pp. 253–259.

[27] SATO, Y., WHEELER, M. D., AND IKEUCHI, K. Object shape and reflectancemodeling from observation. In SIGGRAPH ’97 (1997), pp. 379–387.

[28] SMITH, T. G. Industrial Light and Magic: The Art of Special Effects. BallantineBooks, New York, 1986.

[29] SZELISKI, R. Image mosaicing for tele-reality applications. In IEEE ComputerGraphics and Applications (1996).

[30] TURK, G., AND LEVOY, M. Zippered polygon meshes from range images. InSIGGRAPH ’94 (1994), pp. 311–318.

[31] VEACH, E., AND GUIBAS, L. J. Metropolis light transport. In SIGGRAPH ’97(August 1997), pp. 65–76.

[32] WARD, G. J. Measuring and modeling anisotropic reflection. In SIGGRAPH ’92(July 1992), pp. 265–272.

[33] WARD, G. J. The radiance lighting simulation and rendering system. In SIG-GRAPH ’94 (July 1994), pp. 459–472.

[34] WATANABE, M., AND NAYAR, S. K. Telecentric optics for computational vi-sion. In Proceedings of Image Understanding Workshop (IUW 96) (February1996).

[35] Y.CHEN, AND MEDIONI, G. Object modeling from multiple range images. Im-age and Vision Computing 10, 3 (April 1992), 145–155.

10

Page 114: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

Acquiring the Reflectance Field of a Human Face

Paul Debevecy Tim Hawkinsy Chris Tchouy Haarm-Pieter Duikery Westley Sarokiny

and Mark Sagarz

yUniversity of California at Berkeley1 zLifeF/X, Inc.

ABSTRACTWe present a method to acquire the reflectance field of a humanface and use these measurements to render the face under arbitrarychanges in lighting and viewpoint. We first acquire images of theface from a small set of viewpoints under a dense sampling of in-cident illumination directions using a light stage. We then con-struct a reflectance function image for each observed image pixelfrom its values over the space of illumination directions. From thereflectance functions, we can directly generate images of the facefrom the original viewpoints in any form of sampled or computedillumination. To change the viewpoint, we use a model of skin re-flectance to estimate the appearance of the reflectance functions fornovel viewpoints. We demonstrate the technique with synthetic ren-derings of a person’s face under novel illumination and viewpoints.

Categories and subject descriptors: I.2.10 [Artificial Intel-ligence]: Vision and Scene Understanding - intensity, color, pho-tometry and thresholding; I.3.7 [Computer Graphics]: Three-Dimensional Graphics and Realism - color, shading, shadow-ing, and texture; I.3.7 [Computer Graphics]: Three-DimensionalGraphics and Realism - radiosity; I.4.1 [Image Processing andComputer Vision]: Digitization and Image Capture - radiometry,reflectance, scanning; I.4.8 [Image Processing]: Scene Analysis- photometry, range data, sensor fusion. Additional Key Wordsand Phrases: facial animation; image-based modeling, rendering,and lighting.

1 IntroductionCreating realistic renderings of human faces has been an endeavorin computer graphics for nearly three decades [28] and remains asubject of current interest. It is a challenging problem due to thecomplex and individual shape of the face, the subtle and spatiallyvarying reflectance properties of skin, and the complex deforma-tions of the face during movement. Compounding the problem,viewers are extremely sensitive to the appearance of other people’sfaces.

Recent work has provided solutions to the problems of geomet-rically modeling and animating faces. 3D photography techniques,such as the Cyberware scanner, can acquire accurate geometric

1Computer Science Division, University of California at Berke-ley. Email: fdebevec,tsh,ctchou,duiker,[email protected],[email protected]. For more information see http://www.debevec.org/

models of individual faces. Work to animate facial expressionsthrough morphing [2, 4, 29], performance-driven animation [38],motion capture [14], and physics-based simulation [34, 20, 30] hasproduced examples of realistic facial motion.

An outstanding problem is the lack of a method for capturing thespatially varying reflectance characteristics of the human face. Thetraditional approach of texture-mapping a photograph of a face ontoa geometric model usually fails to appear realistic under changesin lighting, viewpoint, and expression. The problem is that thereflectance properties of the face are complex: skin reflects lightboth diffusely and specularly, and both of these reflection com-ponents are spatially varying. Recently, skin reflectance has beenmodeled using Monte Carlo simulation [16], and several aggregatereflectance descriptions have been recorded from real people [22],but there has not yet been a method of accurately rendering thecomplexities of an individual’s facial reflectance under arbitrarychanges of lighting and viewpoint.

In this paper we develop a method to render faces under arbi-trary changes in lighting and viewing direction based on recordedimagery. The central device in our technique is a light stage (Fig. 2)which illuminates the subject from a dense sampling of directionsof incident illumination. During this time the subject’s appearanceis recorded from different angles by stationary video cameras.

From this illumination data, we can immediately render the sub-ject’s face from the original viewpoints under any incident field ofillumination by computing linear combinations of the original im-ages. Because of the additive nature of light [5], this correctly re-produces all of the effects of diffuse and specular reflection as wellas interreflections between parts of the face. We demonstrate thistechnique by rendering faces in various forms of natural illumina-tion captured in real-world environments, and discuss how this pro-cess can be performed directly from compressed images.

In the second part of this paper we present a technique to ex-trapolate a complete reflectance field from the acquired data whichallows us to render the face from novel viewpoints. For this acquirea geometric model of the face through structured lighting, whichallows us to project the appearance from the original viewpointsonto the geometry to render from novel viewpoints. However, re-rendering directly from such projected images does not reproduceview-dependent reflection from the face; most notably, the specularcomponents need to shift position according to the rendered view-point.

To reproduce these view-dependent effects, we use a skin re-flectance model to extrapolate the reflectance observed by the cam-eras to that which would be observed from novel viewpoints. Themodel is motivated by a set of in-plane reflectance measurementsof a patch of skin using polarizers on the light and the camera toseparate the reflection components. This model allows us to sepa-rate the specular and sub-surface reflection components of the lightstage data using chromaticity analysis, and then to transform eachreflectance component into how it would appear from a novel view-point. Using this technique, we can realistically render the facefrom arbitrary viewpoints and in arbitrary lighting.

The rest of this paper is organized as follows. In the next sectionwe review related work and discuss the reflectance field. In Sec-

Page 115: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

tion 3 we describe the light stage and how we synthesize physicallycorrect images of the subject under arbitrary illumination. In Sec-tion 4 we develop a model of skin reflectance and use it to renderthe face from novel viewpoints under arbitrary illumination. Wediscuss future work in Section 5 and conclude in Section 6.

2 Background and Related WorkIn this section we give an overview of related work in the areasof facial modeling and animation, reflectometry, and image-basedmodeling and rendering. We conclude with a description of thereflectance field.

Facial Modeling and Animation Since the earliest work infacial modeling and animation [28], generating realistic faces hasbeen a central goal. 3D photography techniques for acquiring fa-cial geometry, such as the laser-triangulation based scanners madeby Cyberware, have been a helpful development. Such techniquesoften also photograph a texture map for the face at the time ofthe scan, which can be projected onto the face to produce ren-derings. However, using such texture maps usually falls short ofproducing photorealistic renderings since the map is illumination-dependent and does not capture directionally varying reflectanceproperties. Other work estimates facial models directly from im-ages: [11, 29, 3] recover geometry by fitting morphable facial mod-els; [11, 3] use the models to estimate albedo maps but do not con-sider specular properties. [29] produces view-dependent reflectanceunder the original illumination conditions through view-dependenttexture mapping [10].

Several techniques have been used to animate facial models; [2,4, 29] blend between images in different expressions to produceintermediate expressions. [38, 14] use the captured facial motionof a real actor to drive the performance of a synthetic one. Physics-based simulation techniques [34, 30, 40, 20] have helped animatethe complex deformations of a face in its different expressions.

Reflectometry Reflectometry is the measurement of how mate-rials reflect light, or, more specifically, how they transform incidentillumination into radiant illumination. This transformation can bedescribed by the four-dimensional bi-directional reflectance distri-bution function, or BRDF, of the material measured [25]. Severalefforts have been made to represent common BRDFs as parameter-ized functions called reflectance models [35, 6, 37, 27, 19].

Hanrahan and Krueger [16] developed a parameterized model forreflection from layered surfaces due to subsurface scattering, withhuman skin as a specific case of their model. Their model of skinreflectance was motivated by the optical properties of its surface,epidermal, and dermal layers [36]. Each layer was given severalparameters according to its scattering properties and pigmentation,and a Monte Carlo simulation of the paths light might take throughthe skin surfaces produced renderings exhibiting a variety of qual-itatively skin-like reflectance properties. The authors selected thereflectance properties manually, rather than acquiring them from aparticular individual. The authors also simulated a uniform layerof oil over the face to produce specular reflection; in our work weacquire a reflectance model that reproduces the varying diffuse andspecular properties over the skin.

Much work has been done to estimate reflectance properties ofsurfaces based on images taken under known lighting. [37] and [17]presented techniques and apparatus for measuring anisotropic re-flectance of material samples; [7] applied reflectometry techniquesto the domain of textured objects. In our work, we leverage beingable to separate reflection into diffuse and specular components.This separation can be done through colorspace analysis [31] aswell as a combined analysis of the color and polarization of thereflected light [24]; in our work we make use of both color and po-larization. [32] used object geometry and varying light directionsto derive diffuse and specular parameters for a coffee mug; [41]

used an inverse radiosity method to account for mutual illumina-tion in estimating spatially varying diffuse and piecewise constantspecular properties within a room.

Marschner, Westin, Lafortune, Torrance, and Greenberg [22] re-cently acquired the first experimental measurements of living hu-man facial reflectance in the visible spectrum. The authors pho-tographed the forehead of their subjects under constant point-sourceillumination and twenty viewing directions, and used the curvatureof the forehead to obtain a dense set of BRDF samples. From thesemeasurements, they derived a non-parametric isotropic BRDF rep-resenting the average reflectance properties of the surface of theforehead. In our work, we have chosen the goal of reproducingthe spatially varying reflectance properties across the surface of theface; as a result, we sacrifice the generality of measuring a fullBRDF at each surface point and use models of specular and dif-fuse reflectance to extrapolate the appearance to novel viewpoints.

Image-Based Modeling and Rendering In our work weleverage several principles explored in recent work in image-basedmodeling and rendering. [26, 15] showed how correct views of ascene under different lighting conditions can be created by sum-ming images of the scene under a set of basis lighting conditions;[39] applied such a technique to create light fields [21, 13] withcontrollable illumination. [42] showed that by illuminating a shinyor refractive object with a set of coded lighting patterns, it could becorrectly composited over an arbitrary background by determiningthe direction and spread of the reflected and refracted rays. [8] pre-sented a technique for capturing images of real-world illuminationand using this lighting to illuminate synthetic objects; in this paperwe use such image-based lighting to illuminate real faces.

2.1 Definition of the Reflectance Field

The light field [12, 21], plenoptic function [1], and lumigraph [13]all describe the presence of light within space. Ignoring wavelengthand fixing time, this is a five dimensional function of the form P =P (x; y; z; �; �). The function represents the radiance leaving point(x; y; z) in the direction (�; �).

[21, 13] observed that when the viewer is moving within unoc-cluded space, the light field can be described by a four-dimensionalfunction. We can characterize this function as P 0 = P 0(u; v; �; �),where (u; v) is a point on a closed surface A and (�; �) is a direc-tion as before. A light field parameterized in this form induces afive-dimensional light field in the space outside of A: if we followthe ray beginning at (x; y; z) in the direction of (�; �) until it in-tersects A at (u; v), we have P (x; y; z; �; �) = P 0(u; v; �; �). Inan example from [21] A was chosen to be a cube surrounding theobject; in an example from [13] A was chosen to be the visual hullof the object. We can also consider the viewer to be inside of Aobserving illumination arriving from outside of A as shown in [21].

Images generated from a light field can have any viewing posi-tion and direction, but they always show the scene under the samelighting. In general, each field of incident illumination on A willinduce a different field of radiant illumination from A. We can rep-resent the radiant light field from A under every possible incidentfield of illumination as an eight-dimensional reflectance field:

R = R(Ri;Rr) = R(ui; vi; �i; �i;ur; vr; �r; �r) (1)

Here, Ri(ui; vi; �i; �i) represents the incident light field arriv-ing at A and Rr(ur; vr; �r; �r) represents the radiant light fieldleaving A (see Figure 1(a)). Except that we do not presume A tobe coindicent with a physical surface, the reflectance field is equiv-alent to the bidirectional scattering-surface reflectance distributionfunction S, or BSSRDF, described in Nicodemus et al. [25]. Para-phrasing [25], this function “provides a way of quantitatively ex-pressing the connection between reflected flux leaving (ur; vr) in

2

Page 116: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

a given direction and the flux incident at (ui; vi) in another givendirection.”

In this work we are interested in acquiring reflectance fields ofreal objects, in particular human faces. A direct method to acquirethe reflectance field of a real object would be to acquire a set of lightfields of an object Rr(ur; vr; �r; �r) for a dense sampling of inci-dent beams of illumination from direction (�i; �i) arriving at thesurface A at (ui; vi). However, recording a four dimensional lightfield for every possible incident ray of light would require a ponder-ous amount of acquisition time and storage. Instead, in this work weacquire only non-local reflectance fields where the incident illumi-nation field originates far away from A so that Ri(ui; vi; �i; �i) =Ri(u

0

i; v0

i; �i; �i) for all ui; vi; u0i; v0

i. Thus a non-local reflectancefield can be represented as R0 = R0(�i; �i;ur; vr; �r; �r). This re-duces the representation to six dimensions, and is useful for repre-senting objects which are some distance from the rest of the scene.In Section 3.4 we discuss using a non-local reflectance field to pro-duce local illumination effects.

In this work we extrapolate the complete field of radiant illu-mination from data acquired from a sparse set of camera positions(Section 3) and choose the surface A to be a scanned model of theface (Figure 1(b)), yielding a surface reflectance field analogous toa surface light field [23]. A model of skin reflectance properties isused to synthesize views from arbitrary viewpoints (Section 4).

(u ,v )i i (u ,v )r r

A

(θ ,φ )i i

(θ ,φ )r r

(u ,v )r r

A

(θ ,φ )i i

(θ ,φ )r r

(a) (b)

Figure 1: The Reflectance Field (a) describes how a volumeof space enclosed by a surface A transforms an incident fieldof illumination Ri(ui; vi; �i; �i) into a radiant field of illumina-tion Rr(ur; vr; �r; �r). In this paper, we acquire a non-localreflectance field (b) in which the incident illumination consistssolely of directional illumination (�i; �i). We choose A to becoincident with the surface of the face, yielding a surface re-flectance field which allows us to extrapolate the radiant light fieldRr(ur; vr; �r; �r) from a sparse set of viewpoints.

3 Re-illuminating FacesThe goal of our work is to capture models of faces that can berendered realistically under any illumination, from any angle, and,eventually, with any sort of animated expression. The data that weuse to derive our models is a sparse set of viewpoints taken under adense set of lighting directions. In this section, we describe the ac-quisition process, how we transform each facial pixel location intoa reflectance function, and how we use this representation to renderthe face from the original viewpoints under any novel form of illu-mination. In the following section we will describe how to renderthe face from new viewpoints.

3.1 The Light Stage

The light stage used to acquire the set of images is shown in Fig.2. The subject sits in a chair which has a headrest to help keep hisor her head still during the capture process. Two digital video cam-eras view the head from a distance of approximately three meters;each captures a view of the left or the right side of the face. A spot-light, calibrated to produce an even field of illumination across the

Figure 2: The Light Stage consists of a two-axis rotation systemand a directional light source. The outer black bar � is rotatedabout the central vertical axis and the inner bar � is lowered onestep for each � rotation. Video cameras placed outside the stagerecord the face’s appearance from the left and right under this com-plete set of illumination directions, taking slightly over a minute torecord. The axes are operated manually by cords and an electronicaudio signal triggered by the � axis registers the video to the illu-mination directions. The inset shows a long-exposure photographof the light stage in operation.

subject’s head, is affixed at a radius of 1.5 meters on a two-axis ro-tation mechanism that positions the light at any azimuth � and anyinclination �. In operation, the light is spun about the � axis con-tinuously at approximately 25 rpm and lowered along the � axis by180

32degrees per revolution of � (the cord controlling the � axis is

marked at these increments). The cameras, which are calibrated fortheir flat-field response and intensity response curve, capture framescontinuously at 30 frames per second which yields 64 divisions of� and 32 divisions of � in approximately one minute, during whichour subjects are usually capable of remaining still. A future versioncould employ high-speed cameras running at 250 to 1000 framesper second to lower the capture time to a few seconds. Some sourceimages acquired with the apparatus are shown in Fig. 5.

3.2 Constructing Reflectance Functions

For each pixel location (x; y) in each camera, we observe that lo-cation on the face illuminated from 64 � 32 directions of � and�. From each pixel we form a slice of the reflectance field called

3

Page 117: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

Figure 3: Reflectance Functions for a Face This mosaic is formed from the reflectance functions of a 15 � 44 sampling of pixels fromthe original 480 � 720 image data. Each 64 � 32 reflectance function consists of the corresponding pixel location’s appearance undertwo thousand lighting directions distributed throughout the sphere. The inset shows the same view of the face under a combination of threelighting directions. The functions have been brightened by a factor of four from the original data.

4

Page 118: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

a reflectance function Rxy(�; �) corresponding to the ray throughthat pixel. Note that we are using the term “reflectance” looselyas true reflectance divides out the effect of the foreshortening ofincident light. However, since the surface normal is unknown, wedo not make this correction. If we let the pixel value at location(x; y) in the image with illumination direction (�,�) be representedas L�;�(x; y), then we have simply:

Rxy(�; �) = L�;�(x; y) (2)

Fig. 3 shows a mosaic of reflectance functions for a particularviewpoint of the face. Four of these mosaics are examined in detailin Fig. 4. The reflectance functions exhibit and encode the effects ofdiffuse reflection, specular reflection, self-shadowing, translucency,mutual illumination, and subsurface scattering.

3.3 Re-illuminating the Face

(a) (b)

(c) (d)Figure 4: A Sampling of Facial Reflectance Functions The abovereflectance functions appear in the mosaic of Fig. 3. The middle ofeach function corresponds to the pixel being illuminated from thedirection of the camera; as one moves within the reflectance func-tion the light direction moves in the same manner. Reflectance func-tion (a) is taken from the forehead toward the right of the image, andexhibits a noticeable specular lobe as well as an unoccluded diffuselobe. (b) from the right of the underside of the jaw exhibits a weakerspecular component and some self-shadowing at lower lighting an-gles caused by the shoulder blocking the light source. (c) from thesubject’s cheek to the right and below the nose exhibits a mild spec-ular reflection and shadowing due to the nose in the upper left. (d)sampled from a pixel inside the pinna of the ear exhibits illumi-nation from diffuse reflection and from light scattering through thetissue when illuminated from behind. Each function exhibits a thinblack curve in its lower half where the phi axis bar occasionally ob-scurs the view of the face, and a bright spot due to lens flare wherethe light points into the camera. These regions appear in the sameplaces across images and are ignored in the lighting analysis.

Suppose that we wish to generate an image of the face in a novelform of illumination. Since each Rxy(�; �) represents how muchlight is reflected toward the camera by pixel (x; y) as a result ofillumination from direction (�; �), and since light is additive, wecan compute an image of the face L(x; y) under any combinationof the original light sources Li(�; �) as follows:

L(x; y) =X�;�

Rxy(�; �)Li(�; �) (3)

Each color channel is computed separately using the above equa-tion. Since the light sources densely sample the viewing sphere, wecan represent any form of sampled incident illumination using thisbasis. In this case, it is necessary to consider the solid angle ÆAcovered by each of the original illumination directions:

L(x; y) =X�;�

Rxy(�; �)Li(�; �)ÆA(�; �) (4)

For our data, ÆA(�; �) = sin�; the light stage records moresamples per solid angle near the poles than at the equator. Equation5 shows the computation of Equation 4 graphically. First, the mapof incident illumination (filtered down to the 64� 32 (�; �) space)is normalized by the map of ÆA(�; �). Then, the resulting mapis multiplied by the pixel’s reflectance function. Finally, the pixelvalues of this product are summed to compute the re-illuminatedpixel value. These equations assume the light stage’s light sourceis white and has unit radiance; in practice we normalize the re-flectance functions based on the light source color. Figure 6 showsa face synthetically illuminated with several forms of sampled andsynthetic illumination using this technique.

δΑ normalized light map

light map

normalized light map

reflectance function

lighting product

rendered pixel

lighting product

1

(5)

Writing the re-illumination equation of Equation 4 as the sumof the product of two64 � 32 images allows us to gain efficiencyin both storage and computation using the techniques presented bySmith and Rowe [33] by computing the product directly on JPEG-compressed versions of the images. This can reduce both storageand computation by a factor of twenty while maintaining good im-age quality.

3.4 Discussion

Since each rendered image can also be represented as a linear com-bination of the original images, all of the proper effects of non-diffuse reflectance, mutual illumination, translucence, and subsur-face scattering are preserved, as noted in [26]. The64 � 32 setof illumination directions used is somewhat coarse; however, thereflectance functions are generally not aliased at this resolution,which implies that when the light maps are also properlyfiltereddown to64 � 32 there will be no aliasing in the resulting render-ings. The place where the reflectance functions do become aliasedis where there is self-shadowing; the expected result of this is thatone would see somewhat stairstepped shadows in harsh lighting sit-uations. Such effects could be smoothed by using an area lightsource to illuminate the subject.

Since this technique captures slices of a non-local reflectancefield, it does not tell us how to render a person under dappled lightor in partial shadow. A technique that will in many cases producereasonable results is to illuminate different pixels of the face us-ing different models of incident illumination; however, this will nolonger produce physically valid images because changes to the in-direct illumination are not considered. As an example, considerrendering a face with a shaft of light hitting just below the eye. Inreality, the light below the eye would throw indirect illumination onthe underside of the brow and the side of the nose; this techniquewould not capture this effect.

5

Page 119: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

Figure 5:Light Stage Images Above are five of the 2048 images taken by one camera during a run of the light stage. The pixel values ofeach location on the face under the 2048 illumination directions are combined to produce the mosaic images in Fig. 3. Below each image isthe impulse light map that would generate it.

Figure 6: Face Rendered under Sampled Illumination Each of the above images shows the face synthetically illuminated with novellighting, with the corresponding light map shown below. Each image is created by taking the dot product of each pixel’s reflectance functionwith the light map. The first four illumination environments are light probe measurements acquired from real-world illumination (see [8])recorded as omnidirectional high dynamic range images; the rightmost lighting environment is a synthetic test case.

A person’s clothing reflects indirect light back onto the face, andour capture technique reproduces the person’s appearance in what-ever clothing they were wearing during the capture session. If weneed to change the color of the person’s clothing (for example, toplace a costume on a virtual actor), we can record the subject twice,once wearing white clothing and once with black clothing. Sub-tracting the second image from thefirst yields an image of the indi-rect illumination from the clothing, which can then be tinted to anydesired color and added back in to the image taken with the blackclothing; this process is illustrated in Figure 7.

By recording the light stage images in high dynamic range [9]and using the process of environment matting [42], we can applythis technique to translucent and refractive objects and reproducethe appearance of the environment in the background; this processis described in the Appendix.

4 Changing the ViewpointIn this section we describe our technique to extrapolate completereflectancefields from the reflectancefield slices acquired in Sec-tion 3, allowing us to render the face from arbitrary viewpoints aswell as under arbitrary illumination. In our capture technique, we

observe the face under a dense set of illumination conditions butfrom only a small set of viewpoints. To render the face from anovel viewpoint, we must resynthesize the reflectance functions toappear as they would from the new viewpoint.

To accomplish this, we make use of a skin reflectance modelwhich we introduce in Section 4.1. This model is used to guidethe shifting and scaling of measured reflectance function values asthe viewpoint changes. As such, our technique guarantees that theresynthesized reflectance function will agree exactly with the mea-sured data if the novel viewpoint is the same as the viewpoint fordata capture.

The resynthesis technique requires that our reflectance functionsbe decomposed into specular and diffuse (subsurface) components.Section 4.2 describes this separation process. Section 4.3 describesthe re-synthesis of a reflectance function for a new viewpoint. Sec-tion 4.4 discusses the technique in the context of shadowing andmutual illumination effects. Section 4.5 explains the method usedto produce renderings of the entire face using resynthesized re-flectance functions.

6

Page 120: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

(a) (b) (c)

Figure 7: Modeling indirect light from clothing Indirect re-flectance from the subject’s clothing can be modeled by recordingthe subject wearing both white (a) and black (b) clothing (we drapethe white clothing on the subject and pull it away to reveal the blackclothing.) (a) exhibits indirect lighting on the neck and beneath thechin and nose. Correct renderings of the person wearing any colorclothing can be created by adding a tinted version of (a) minus (b)to (b). Using this method, (c) shows the subject with the indirectlight she would receive from green clothing.

4.1 Investigating Skin Reflectance

In this section we consider the reflectance properties of skin, anddescribe our data-driven skin reflectance model. The model is in-tended to capture the behavior of skin, but could be useful for awider class of surfaces.

Following [16], we note that the light reflected from the skin canbe decomposed into two components: a specular component con-sisting of light immediately reflected at the index of refraction tran-sition at the air-oil interface (see Figure 8), and a non-Lambertiandiffuse component consisting of light transmitted through the air-oilinterface that, after some number of subsurface scattering interac-tions, is transmitted from the oil layer to air.

We first investigated the general behavior of these two compo-nents. As shown in Figure 8, light which reflects specularly off theskin will maintain the polarization of the incident light; however,light which emerges from below the surface will have been depo-larized by scattering interactions. Taking advantage of this fact, wecan separate the reflection components by placing linear polarizerson both the light source and the camera1. Figure 9 shows separatedspecular and diffuse reflection components of a face using this tech-nique.

oil layer

epidermal and dermal layers

(b) (c) (d)(a)

Figure 8:Skin Reflectance Light reflecting from skin must have re-flected specularly off the surface (a) or at some point entered oneor more of the scattering layers (b, c, d). If the incident light ispolarized, the specularly reflected light will maintain this polar-ization; however, light which scatters within the surface becomesdepolarized. This allows reflection components to be separated asin Figures 9 and 10.

Using this effect, we carried out an in-plane experiment to mea-sure the specular and diffuse reflectance properties of a small patch

1In these tests we polarize the light source vertically with respect to theplane of incidence so that the specular reflection does not become attenuatednear the Brewster angle.

(a) (b) (c) (d)

Figure 9: Separating diffuse and specular components can beperformed by placing a linear polarizer on both the light sourceand the camera. (a) Normal image under point-source illumina-tion. (b) Image of diffuse reflectance obtained by placing a verticalpolarizer on the light source and a horizontal polarizer on the cam-era, blocking specularly reflected light. (c) Image of accentuatedspecular reflectance obtained by placing both polarizers vertically(half the diffusely reflected light is blocked relative to the specularlyreflected light). (d) Difference of (c) and (b) yielding the specularcomponent. The images have been scaled to appear consistent inbrightness.

of skin on a person’s forehead. Figure 10 shows how we adaptedthe light stage of Figure 2 for this purpose by placing the� axis inthe horizontal position and placing a vertical polarizer on the lightsource. We rotated the horizontal� axis continuously while weplaced a video camera aimed at our subject’s vertically aligned fore-head at a sampling of reflected illumination angles. The camera an-gles we used were�(0; 22:5; 45; 60; 75; 82:5; 86:25; 89) degreesrelative to the forehead’s surface normal in order to more denselysample the illumination at grazing angles. At 89 degrees the skinarea was very foreshortened so we were not able to say with cer-tainty that the measurement we took originated only from the targetarea. We performed the experiment twice: once with the camerapolarizer placed horizontally to block specular reflection, and oncewith the camera polarizer placed vertically to accentuate it. The av-erage intensity and color of the reflected light from a2 � 5 pixelarea on the forehead was recorded in this set of configurations.

subject

movinglight

camera

vertical polarizer

horizontalpolarizer

othercamerapositions

Figure 10:Reflectometry Experiment In this experiment, the dif-fuse and specular reflectance of an area of skin on the subject’sforehead was recorded from sixty-four illumination directions foreach of fifteen camera positions. Polarizers on the light and cam-era were used to separate the reflection components.

We noted two trends in the acquired reflectance data (Figure 11).First, the specular component becomes much stronger for large val-ues of�i or �r and exhibits off-specular reflection. To accommo-date this behavior in our model, we use the microfacet-based frame-work introduced by Torrance and Sparrow [35]. This framework as-sumes geometric optics and models specular lobes as surface (Fres-nel) reflection from microfacets having a Gaussian distribution ofsurface normals. Shadowing and masking effects between the mi-crofacets are computed under the assumption that the microfacetsform V-shaped grooves. Our model differs only in that we do not

7

Page 121: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

θi

90

−90−180 180

90

−90−180 180

θr

θi

θr

Figure 11:Reflectometry Results The left image shows the mea-sured diffuse (sub-surface) component of the skin patch obtainedfrom the experiment in Fig. 10 for incident illumination angle �iand viewing direction �r . �r is nonuniformly spaced at angles of�(0; 22:5; 45; 60; 75; 82:5; 86:25; 89) degrees. Invalid measure-ments from the light source blocking the camera’s view are set toblack. The right image shows the corresponding data for accentu-ated specular reflectance.

assume that the microfacet normal distribution is Gaussian; sincewe have measurements of the specular component for dense inci-dent directions, we simply take the microfacet normal distributiondirectly from the observed data. This allows the measured specularlobe to be reproduced exactly if the viewpoint is unchanged.

The second trend in the data is a desaturation of the diffuse com-ponent for large values of�i and�r. To accommodate this, we makea minor deviation from pure Lambertian behavior, allowing the sat-uration of the diffuse chromaticity to ramp between two values as�i and�r vary.

Representing chromaticities as unit RGB vectors, we model thediffuse chromaticity as:

normalize( ~d0 + f(�i; �r)( ~d0 � ~s)) (6)

where ~d0 is a representative diffuse chromaticity,~s is the lightsource chromaticity, andf(�i; �r) is given by:

f(�i; �r) = �0(cos �i cos �r) + �1(1� cos �i cos �r) (7)

We recover the parameters�0 and�1 directly from our data foreach reflectance function. This correction to the diffuse chromatic-ity is used for the color space separation of diffuse and specularcomponents described in Section 4.2, and also in our reflectancefunction resynthesis technique described in Section 4.3.

In addition to this experiment, we also performed Monte Carlosimulations of subsurface scattering similar to those in [16]. Weused two scattering layers, both with strong forward scattering, andwith the lower layer having significant absorption of shorterwave-lengths to simulate the presence of blood in the dermis. These sim-ulations yielded a variation in the chromaticity of the diffuse com-ponent similar to that observed in our data.

4.2 Separating Specular and Subsurface Compo-nents

We begin by separating the specular and subsurface (diffuse) com-ponents for each pixel’s reflectance function. While we could per-form this step using the polarization approach of Section 4.1, thiswould require two passes of the lighting rig (one for diffuse onlyand one that includes specular) or additional cameras. Furthermore,one of the polarizers would have to rotate in a non-trivial pattern tomaintain the proper relative orientations of the polarizers when�is non-horizontal. Instead, we use a color space analysis techniquerelated to [31].

For a reflectance function RGB valueRxy(�; �), we can writeRas a linear combination of its diffuse color~d and its specular color~s. In reality, due to noise, interreflections, and translucency, therewill also be an error component~e:

R = �d ~d+ �s~s+ �e~e

(a) (e)

(b) (f)

(c) (g)

(d) (h)Figure 12:Analyzing and Resynthesizing Reflectance FunctionsReflectance functions (a) can be decomposed into specular (b) anddiffuse (c) components using colorspace analysis based on a modelof the variation in diffuse chromaticity (d). We compute a surfacenormal ~n based on the diffuse component (magenta dot in (c)), anda normal ~ns (coincident with ~n in this case) based on the maximum(green dot) of the specular component and the known viewing di-rection (yellow dot). We demonstrate the resynthesis of reflectancefunctions for new viewpoints by resynthesizing (a), which was cap-tured by the left camera, from the viewpoint of the right camera.We first transform the specular component to a representation in-dependent of the original viewpoint (essentially a microfacet nor-mal distribution) as shown in (e), then transform (e) in accordancewith the new viewpoint to produce (f). The diffuse component ischrominance-shifted for the new viewpoint and added to the trans-formed specular component to produce the new reflectance function(g). For comparison, (h) shows the actual reflectance function (withlens flare spot and �-bar shadow) from the second camera.

We choose~e = ~d � ~s and determine values for�d, �s, and�eby inverting the resulting3�3 matrix. To form the final separation,we computeS = max(�s; 0)~s andD = R� S so that the sum ofD andS yields the original reflectance functionR.

This analysis assumes that the specular and diffuse colors areknown. While we can assume that the specular component is thesame color as the incident light, the diffuse color presents a moredifficult problem, because it changes not only from pixel to pixel,but also within each reflectance function, as described in Section4.1. To achieve an accurate separation, we must first estimate thediffuse chromaticity ramp.

Since we assume the diffuse chromaticity is a functionf of �iand�r, we must first estimate the surface normal. For this we per-form an initial rough color space separation based on a uniformdiffuse chromaticityd0. We derive this diffuse chromaticity bycomputing the median of the red-green and green-blue ratios overreflectance function values falling in a certain brightness range. Wethen perform a diffuse-specular separation and fit a Lambertian lobeto the diffuse component, using a coarse-to-fine direct search. Thisfitting yields an estimate of the surface normal.

8

Page 122: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

We then find the parameters�0 and�1 which give the best fit tothe observed chromaticities in the original unseparated reflectancefunction, again using a coarse-to-fine direct search. Knowing theviewpoint and the surface normal, we downweight values near themirror angle to prevent the color ramp from being biased by strongspecularities. The final separation into diffuse and specular compo-nents is computed using the fitted model of diffuse chromaticity asshown in Fig. 12.

We use the final separated diffuse component to recompute thesurface normal~n, as seen in Fig. 14(b). For visualization purposes,we can also compute an estimate of the diffuse albedo~�d and totalspecular energy�s, which are shown in Fig. 14(c) and (d).

4.3 Transforming Reflectance Functions to NovelViewpoints

The process of resynthesizing a reflectance function for a novelviewpoint is illustrated in Fig. 12. The resynthesis algorithm takesthe following input:

1. The diffuse reflectance functionD(�; �)

2. The specular reflectance functionS(�; �)3. The surface normal~n4. The index of refraction for surface (specular) reflection5. The diffuse chromaticity ramp parameters�0 and�16. The original and novel view direction vectors~v0 and~vn

The diffuse and specular reflectance functions may optionally betransformed to a representation that does not depend on the originalviewing direction, for example by transforming the functions to theform they would have if~v = ~n. In this case, the resynthesis nolonger requires the original view direction. An example of this forthe specular component is shown in Fig. 12(e).

To synthesize a reflectance function from a novel viewpoint, weseparately synthesize the diffuse and specular components. A sam-ple in a specular reflectance function represents a specular responseto a light source in the corresponding direction. If the view directionis known, we may consider this specular response to be a measureof the proportion of microfacets with normals oriented within somesolid angle of the halfway vector between the view direction andthe sample’s light source direction sample. To compute a specularreflectance function from a new view direction~vn, we compute foreach light source direction~lp the halfway vector:

~H = normalize(~vn +~lp)

We then find the light source direction~lq that would have re-sponded to microfacets near~H from the original view direction~v0:

~lq = 2( ~H � ~v0) ~H � ~v0

Letting !i specify a direction of incoming radiance, theTorrance-Sparrow model relates the observed radianceL to the mi-crofacet normal distribution P as follows:

L~v =

ZPL!iGF

4 cos �rd!i (8)

whereG is a geometric attenuation factor andF is the Fresnel re-flectivity. G depends on~v,~l, and~n. The expression forG is some-what complicated, and we refer the interested reader to [35].F isgiven by the Fresnel equation for unpolarized light, which can becomputed from~v and~l.

Considering all quantities in (8) to be constant over the smallsolid angle subtended by our light source, we have:

L~v =PL

�~lGF

4(~v � ~n)

Assuming the light source presents a constantL�~l

as it moves,

and recalling that the light direction~lq is chosen to sample the samepoint in the microfacet normal distribution as~lp, we can computethe new sample radianceL~vn due to a light at~lp as a function ofthe original radiance sampleL~v0 due to a light at~lq:

L~vn = L~v0

G(~vn;~lp; ~n)F (~vn;~lp) (~v0 � ~n)

G(~v0;~lq; ~n)F (~v0;~lq) (~vn � ~n)(9)

Fig. 12(f) shows a specular reflectance function synthesized us-ing (9) for a view direction 80 degrees from the original view.

For the diffuse component we apply our diffuse chrominanceramp correction to each value in the diffuse reflectance function,first inverting the chrominance shift due to the original view di-rection and then applying the chrominance shift for the new viewdirection. The chrominance shift is computed with the recoveredparameters�0 and�1 as in (6), using the actual sample chromatic-ity in place of~d0.

A final resynthesized reflectance function consisting of theresynthesized diffuse and specular components is shown in Fig.12(g), and is consistent with an actual reflectance function acquiredfrom the novel viewpoint in Fig. 12(h).

4.4 Considering Shadowing and Interreflection

Since our geometry is presumed to be non-convex, we expect re-flectance functions in areas not on the convex hull to exhibit globalillumination effects such as shadows and interreflections. To dealwith such areas, we compute a shadow map for each reflectancefunction. This could be done using our geometric model, but sincethe geometry is incomplete we instead compute the shadow mapusing brightness thresholding on the original reflectance function.This is demonstrated in Figure 13. We then do the analysis of Sec-tion 4.2 on the reflectance function modulated by the shadow map.This will give good results when the direct light dominates the indi-rect light over the non-shadowed portion of the reflectance function,a good assumption for most areas of the face.

When synthesizing a new specular reflectance function, theshadow map is used to prevent a specular lobe from appearing inshadowed directions. The converse of this effect is that when aspecularity is shadowed in our original data, we are unable to re-cover the specular lobe. This problem could be reduced by usingmore cameras.

An advantage of our synthesis technique is that diffuse inter-reflections, and in fact all light paths terminating with a diffuse re-flection, are left intact in the diffuse reflectance function and arethus reproduced without the necessity of performing the difficultsteps of inverse and forward global illumination.

4.5 Creating Renderings

With the ability to resynthesize reflectance functions for new viewdirections, it is straightforward to render the face in arbitrary illu-mination from arbitrary viewpoints. We first use the technique ofSection 3 to render a view of the face in the novel lighting using themodified reflectance functions. Although geometrically from theoriginal point of view, the face is shaded as if it were viewed fromthe novel point of view. We then project this image onto a geomet-ric model of the face (see Fig. 14(e)) and view the model from thenovel viewpoint, yielding a rendering in which the illumination andviewpoint are consistent. In our work we use two original view-points, one for the left and one for the right of the face, and blendthe results over the narrow region of overlap (with more cameras,view-dependent texture mapping could be used to blend betweenviewpoints as in [10, 29]). Renderings made with this techniqueare shown in Figs. 14(f),(g) and (h), and comparisons with actualphotographs are shown in Fig. 15.

9

Page 123: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

(a) (b) (c) (d)

(e) (f) (g) (h)

Figure 14:Analyzing Reflectance and Changing the Viewpoint (a) An original light stage image taken by the left camera.(b) Recoveredsurface normalsnd derived from the fitted diffuse reflectance lobe for each pixel; the RGB value for each pixel encodes the X, Y, and Zdirection of each normal.(c) Estimated diffuse albedo�d. Although not used by our rendering algorithm, such data could be used in atraditional rendering system.(d) Estimated specular energy�s, also of potential use in a traditional rendering system.(e) Face geometryrecovered using structured lighting.(f) Face rendered from a novel viewpoint under synthetic directional illumination.(g,h) Face renderedfrom a novel viewpoint under the two sampled lighting environments used in the second two renderings of Fig. 6.

(a) (c) (e) (g)

(b) (d) (f) (h)

Figure 15:Matching to Real-World Illumination (a,b) Actual photographs of the subject in two different environments.(c,d) Imagesof a light probe placed in the position of the subject’s head in the same environments.(e,f) Synthetic renderings of the face matched to thephotographed viewpoints and illuminated by the captured lighting.(g,h) Renderings of the synthetic faces (e,f) composited over the originalfaces (a,b); the hair and shoulders come from the orginal photographs and are not produced using our techniques. The first environment isoutdoors in sunlight; the second is indoors with mixed lighting coming from windows, incandescent lamps, and fluorescent ceiling fixtures.

10

Page 124: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

(a) (b)

(c) (d)Figure 13: Reflectance Function Shadow Maps The reflectancefunction of a point near the nose (a) and the corresponding shadowmap (b) computed using brightness thresholding. (c) shows a pointin the ear which receives strong indirect illumination, causing thenon-shadowed region in (d) to be overestimated. This causes someerror in the diffuse-specular separation and the diffuse albedo to beunderestimated in the ear as seen in Fig. 14(c).

5 Discussion and Future work

The work we have done suggests a number of avenues for improve-ments and extensions. First, we currently extrapolate reflectancefunctions using data from single viewpoints. Employing additionalcameras to record reflectance functions for each location on the facewould improve the results since less extrapolation of the data wouldbe required. Using the polarization technique of Fig. 9 to directlyrecord specular and subsurface reflectance functions could also im-prove the renderings, especially for subjects with pale skin.

A second avenue of future work is to animate our recovered fa-cial models. For this, there already exist effective methods for ani-mating geometrically detailed facial models such as [29], [14], and[34]. For these purposes, it will also be necessary to model andanimate the eyes, hair, and inner mouth; reflectometry methods forobtaining models of such structures would need to be substantiallydifferent from our current techniques.

We would also like to investigate real-time rendering methodsfor our facial models. While the fixed-viewpoint re-illuminationpresented in Section 3 can be done interactively, synthesizing newviewpoints takes several minutes on current workstations. Somerecent work has presented methods of using graphics hardware torender complex reflectance properties [18]; we would like to in-vestigate employing such methods to create renderings at interac-tive rates. We also note that the storage required for a reflectancefield could be substantially reduced by compressing the source databoth in (u; v) space as well as(�; �) space to exploit similaritiesamongst neighboring reflectance functions.

Real skin has temporally varying reflectance properties depend-ing on temperature, humidity, mood, health, and age. The surfaceblood content can change significantly as the face contorts and con-tracts, which alters its coloration. Future work could characterizethese effects and integrate them into a facial animation system; partthe acquisition process could be to capture the reflectance field of aperson in a variety different expressions.

Lastly, the data capture techniques could be improved in a num-ber of ways. High-definition television cameras would acquirenearly eight times as many pixels of the face, allowing the pixelsize to be small enough to detect illumination variations from in-dividual skin pores, which would increase the skin-like quality ofthe renderings. One could also pursue faster capture by using high-speed video cameras running at 250 or 1000 frames per second,allowing full reflectance capture in just a few seconds and perhaps,with more advanced techniques, in real time.

6 ConclusionIn this paper we have presented a practical technique for acquiringthe reflectance field of a human face using standard video equip-ment and a relatively simple lighting apparatus. The method al-lows the the face to be rendered under arbitrary illumination con-ditions including image-based illumination. The general techniqueof modeling facial reflectance from dense illumination directions,sparse viewpoints, and recovered geometry suggests several areasfor future work, such as fitting to more general reflectance mod-els and combining this work with facial animation techniques. Itis our hope that the work we have presented in this paper will helpencourage continued investigations into realistic facial rendering.

Acknowledgements

We would like to thank Shawn Brixey and UC Berkeley’s Digi-tal Media/New Genre program for use of their laboratory space,as well as Bill Buxton and Alias Wavefront for use of the Mayamodeling software, and Larry Rowe, Jessica Vallot (seen in Fig.14), Patrick Wilson, Melanie Levine, Eric Paulos, Christine Wag-goner, Holly Cim, Eliza Ra, Bryan Musson, David Altenau, MarcLevoy, Maryann Simmons, Henrik Wann Jensen, Don Greenberg,Pat Hanrahan, Chris Bregler, Michael Naimark, Steve Marschner,Kevin Binkert, and the Berkeley Millennium Project for helpingmake this work possible. We would also like to acknowledge theCornell’s 1999 Workshop on Rendering, Perception, and Measure-ment for helping encourage this line of research. Thanks also to theanonymous reviewers for their insightful suggestions for this work.This work was sponsored by grants from Interactive Pictures Cor-poration, the Digital Media Innovation Program, and ONR/BMDO3DDI MURI grant FDN00014-96-1-1200.

References[1] A DELSON, E. H., AND BERGEN, J. R. Computational Models of

Visual Processing. MIT Press, Cambridge, Mass., 1991, ch. 1. ThePlenoptic Function and the Elements of Early Vision.

[2] BEIER, T., AND NEELY, S. Feature-based image metamorpho-sis. Computer Graphics (Proceedings of SIGGRAPH 92) 26, 2 (July1992), 35–42.

[3] BLANZ , V., AND VETTER, T. A morphable model for the synthesisof 3d faces.Proceedings of SIGGRAPH 99 (August 1999), 187–194.

[4] BREGLER, C., COVELL, M., AND SLANEY, M. Video rewrite: Driv-ing visual speech with audio.Proceedings of SIGGRAPH 97 (August1997), 353–360.

[5] BUSBRIDGE, I. W. The Mathematics of Radiative Transfer. Cam-bridge University Press, Bristol, UK, 1960.

[6] COOK, R. L., AND TORRANCE, K. E. A reflectance model for com-puter graphics.Computer Graphics (Proceedings of SIGGRAPH 81)15, 3 (August 1981), 307–316.

[7] DANA , K. J., GINNEKEN, B., NAYAR , S. K., AND KOENDERINK,J. J. Reflectance and texture of real-world surfaces. InProc. IEEEConf. on Comp. Vision and Patt. Recog. (1997), pp. 151–157.

[8] DEBEVEC, P. Rendering synthetic objects into real scenes: Bridg-ing traditional and image-based graphics with global illumination andhigh dynamic range photography. InSIGGRAPH 98 (July 1998).

[9] DEBEVEC, P. E.,AND MALIK , J. Recovering high dynamic rangeradiance maps from photographs. InSIGGRAPH 97 (August 1997),pp. 369–378.

[10] DEBEVEC, P. E., YU, Y., AND BORSHUKOV, G. D. Efficient view-dependent image-based rendering with projective texture-mapping. In9th Eurographics workshop on Rendering (June 1998), pp. 105–116.

[11] FUA, P.,AND MICCIO, C. From regular images to animated heads:A least squares approach. InECCV98 (1998).

[12] GERSHUN, A. Svetovoe Pole (the Light Field, in English).Journalof Mathematics and Physics XVIII (1939), 51—151.

[13] GORTLER, S. J., GRZESZCZUK, R., SZELISKI , R., AND COHEN,M. F. The Lumigraph. InSIGGRAPH 96 (1996), pp. 43–54.

[14] GUENTER, B., GRIMM , C., WOOD, D., MALVAR , H., AND PIGHIN,F. Making faces.Proceedings of SIGGRAPH 98 (July 1998), 55–66.

[15] HAEBERLI, P. Synthetic lighting for photography. Available athttp://www.sgi.com/grafica/synth/index.html, January 1992.

11

Page 125: HDRI and Image-Based Lighting

To appear in the SIGGRAPH 2000 Conference Proceedings

[16] HANRAHAN , P., AND KRUEGER, W. Reflection from layered sur-faces due to subsurface scattering.Proceedings of SIGGRAPH 93(August 1993), 165–174.

[17] KARNER, K. F., MAYER, H., AND GERVAUTZ, M. An image basedmeasurement system for anisotropic reflection. InEUROGRAPHICSAnnual Conference Proceedings (1996).

[18] KAUTZ, J., AND MCCOOL, M. D. Interactive rendering with arbi-trary BRDFs using separable approximations.Eurographics Render-ing Workshop 1999 (June 1999).

[19] LAFORTUNE, E. P. F., FOO, S.-C., TORRANCE, K. E., ANDGREENBERG, D. P. Non-linear approximation of reflectance func-tions. Proceedings of SIGGRAPH 97 (August 1997), 117–126.

[20] LEE, Y., TERZOPOULOS, D., AND WATERS, K. Realistic modelingfor facial animation. Proceedings of SIGGRAPH 95 (August 1995),55–62.

[21] LEVOY, M., AND HANRAHAN , P. Light field rendering. InSIG-GRAPH 96 (1996), pp. 31–42.

[22] MARSCHNER, S. R., WESTIN, S. H., LAFORTUNE, E. P. F., TOR-RANCE, K. E., AND GREENBERG, D. P. Image-based BRDF mea-surement including human skin.Eurographics Rendering Workshop1999 (June 1999).

[23] MILLER, G. S. P., RUBIN, S.,AND PONCELEON, D. Lazy decom-pression of surface light fields for precomputed global illumination.Eurographics Rendering Workshop 1998 (June 1998), 281–292.

[24] NAYAR , S., FANG, X., AND BOULT, T. Separation of reflection com-ponents using color and polarization.IJCV 21, 3 (February 1997),163–186.

[25] NICODEMUS, F. E., RICHMOND, J. C., HSIA, J. J., GINSBERG,I. W., AND LIMPERIS, T. Geometric considerations and nomencla-ture for reflectance.

[26] NIMEROFF, J. S., SIMONCELLI , E., AND DORSEY, J. Efficient re-rendering of naturally illuminated environments.Fifth EurographicsWorkshop on Rendering (June 1994), 359–373.

[27] OREN, M., AND NAYAR , S. K. Generalization of Lambert’s re-flectance model.Proceedings of SIGGRAPH 94 (July 1994), 239–246.

[28] PARKE, F. I. Computer generated animation of faces.Proc. ACMannual conf. (August 1972).

[29] PIGHIN, F., HECKER, J., LISCHINSKI, D., SZELISKI , R., ANDSALESIN, D. H. Synthesizing realistic facial expressions from pho-tographs.Proceedings of SIGGRAPH 98 (July 1998), 75–84.

[30] SAGAR, M. A., BULLIVANT , D., MALLINSON, G. D., HUNTER,P. J., AND HUNTER, I. W. A virtual environment and model ofthe eye for surgical simulation.Proceedings of SIGGRAPH 94 (July1994), 205–213.

[31] SATO, Y., AND IKEUCHI, K. Temporal-color space analysis of re-flection. JOSA-A 11, 11 (November 1994), 2990–3002.

[32] SATO, Y., WHEELER, M. D., AND IKEUCHI, K. Object shape andreflectance modeling from observation. InSIGGRAPH 97 (1997),pp. 379–387.

[33] SMITH , B., AND ROWE, L. Compressed domain processing of JPEG-encoded images.Real-Time Imaging 2, 2 (1996), 3–17.

[34] TERZOPOULOS, D., AND WATERS, K. Physically-based facial mod-elling, analysis, and animation.Journal of Visualization and Com-puter Animation 1, 2 (August 1990), 73–80.

[35] TORRANCE, K. E., AND SPARROW, E. M. Theory for off-specularreflection from roughened surfaces.Journal of Optical Society ofAmerica 57, 9 (1967).

[36] VAN GEMERT, M. F. C., JACQUES, S. L., STERENBERG, H. J.C. M., AND STAR, W. M. Skin optics. IEEE Transactions onBiomedical Engineering 36, 12 (December 1989), 1146–1154.

[37] WARD, G. J. Measuring and modeling anisotropic reflection. InSIG-GRAPH 92 (July 1992), pp. 265–272.

[38] WILLIAMS , L. Performance-driven facial animation.ComputerGraphics (Proceedings of SIGGRAPH 90) 24, 4 (August 1990), 235–242.

[39] WONG, T.-T., HENG, P.-A., OR, S.-H.,AND NG, W.-Y. Image-based rendering with controllable illumination.Eurographics Ren-dering Workshop 1997 (June 1997), 13–22.

[40] WU, Y., THALMANN , N. M., AND THALMANN , D. A dynamicwrinkle model in facial animation and skin aging.Journal of Visual-ization and Computer Animation 6, 4 (October 1995), 195–206.

[41] YU, Y., DEBEVEC, P., MALIK , J.,AND HAWKINS, T. Inverse globalillumination: Recovering reflectance models of real scenes from pho-tographs.Proceedings of SIGGRAPH 99 (August 1999), 215–224.

[42] ZONGKER, D. E., WERNER, D. M., CURLESS, B., AND SALESIN,D. H. Environment matting and compositing.Proceedings of SIG-GRAPH 99 (August 1999), 205–214.

(a) (b)

(c) (d)

(e) (f)

(g) (h)

(i) (j)

Appendix: Combining with Environment Matting

The light stage can be used to relight objects as well as faces. In thisexperiment we created a scene with diffuse, shiny, refractive, andtransmissive objects seen in (a). Because of the sharp specularities,we recorded the scene with a finer angular resolution of128�64 di-rections of� and� and in high dynamic range [9] using five passesof the light stage at different exposure settings. Renderings of thescene in two environments are shown in (c,d). Because high dy-namic range imagery was used, the direct appearance of the lightsource was captured properly, which allows the renderings to re-produce a low-resolution version of the lighting environment in thebackground. To replace this with a high resolution version of theenvironment, we captured an environment matte [42] of the scene(b) and computed the contribution of the reflected, refracted, andtransmitted light from the background (e,f). We then summed allbut the contribution from the background lighting directions to pro-duce (g,h) and added in the light from the environment matte (e,f)to produce a complete rendering of the scene and background (i,j).

12

Page 126: HDRI and Image-Based Lighting

Overcoming Gamut and Dynamic Range

Limitations in Digital Images

Gregory Ward LarsonSilicon Graphics, Inc.

Mountain View, California

Abstract

The human eye can accommodate luminance in a singleview over a range of about 10,000:1 and is capable ofdistinguishing about 10,000 colors at a given brightness.By comparison, typical CRT displays have a luminancerange less than 100:1 and cover about half of the visiblecolor gamut. Despite this difference, most digital imageformats are geared to the capabilities of conventionaldisplays, rather than the characteristics of human vision.In this paper, we propose two compact encodings suitablefor the transfer, manipulation, and storage of full rangecolor images. The first format is a replacement forconventional RGB images, and encodes color pixels aslog luminance values and CIE (u',v') chromaticitycoordinates. We have implemented and distributed thisencoding as part of the standard TIFF I/O library on thenet. The second format is proposed as an adjunct toconventional RGB data, and encodes out-of-gamut (andout-of-range) pixels in a supplemental image, suitable asa layer extension to the Flashpix standard. This data canthen be recombined with the original RGB layer to obtaina high dynamic range image covering the full gamut ofperceivable colors. Finally, we demonstrate the powerand utility of full gamut imagery with example imagesand applications.

Introduction

What is the ultimate use of a digital image? How will itbe presented? Will it be modified or adjusted? Whatkind of monitor will it be displayed on? What type ofprinter will it be sent to? How accurate do the colorsneed to be? More often than not, we don’t know theanswers to these questions a priori. More important, wedon’t know how these questions will be answered 10 or100 years from now, when everything we know aboutdigital imaging will have changed, but someone may stillwant to use our image. We should therefore endeavor to

record image data that will be valuable under a broadrange of foreseeable and postulated circumstances.Although this seems problematic, there is a simplesolution. We may not be able to predict the technology,but we can predict that people will still be the primaryconsumers.

Most commonly used image standards based oncurrent display technology, i.e., CRT monitors, ratherthan something less apt to change, i.e., human vision.All RGB standards are limited to a fraction of the visiblegamut, since this gamut cannot be contained between anythree real colors. Even Kodak’s PhotoYCC encoding isultimately geared for CRT display, and doesn’tencompass the full gamut of colors or cover more thantwo orders of magnitude in brightness. The human eye iscapable of perceiving at least four orders of magnitude ina daylit scene, and adapting more gradually over sevenadditional orders of magnitude, which means that mostdigital images encode only a small fraction of what ahuman observer can see.

In this sense, negative photography is superior todigital imaging in its ability to capture the dynamic rangeof a scene. A typical, consumer-grade color negativefilm has about 5-8 f-stops of exposure latitude, meaningthat it can capture regions of a scene that are 25 to 28

times brighter than the camera’s exposure setting (ordimmer if the image is overexposed), and still haveenough range left over to reproduce each region*. Ofcourse, most prints do not make use of the full range,unless a photographer picks up a wand or a cutout in thedarkroom, but its presence permits re-exposure duringthe printing process to optimize the appearance of salientfeatures, such as a person’s face. * To compute the latitude of a film or recording medium,take the log to the base 2 of the total usable dynamicrange, from darkest unique value to brightest, andsubtract 5 f-stops, which is the approximate rangerequired for a usable image. There are about 3.3 f-stopsper order of magnitude.

Page 127: HDRI and Image-Based Lighting

Overcoming Gamut and Dynamic Range Limitations in Digital Images

The question to ask is this: in 10 years or 100 years,what medium will be preferred for old photographs, adigital image, or a negative? Unless we change the waydigital images are encoded, the answer in most cases willbe a negative. Even considering aging and degradation(processes that can be partially compensated), a negativehas both superior resolution and greater dynamic rangethan an RGB or YCC image. This needn’t be the case.

In this paper, we present a compact pixel encodingusing a log representation of luminance and a CIE (u’,v’)representation of color. We call this a LogLuv encoding.A log luminance representation means that at anyexposure level, there will be equal brightness stepsbetween values. This corresponds well with humanvisual response, whose contrast threshold is constant overa wide range of adaptation luminances (Weber’s law).For color, the use of an approximately uniformperceptual space enables us to record the full gamut ofvisible colors using step sizes that are imperceptible tothe eye. The combination of these two techniquespermits us to make nearly optimal use of the bitsavailable to record a given pixel, so that it may bereproduced over a broad range of viewing conditions.Also, since we are recording the full visible gamut anddynamic range, the output or display device can beanything and we won’t be able to detect any errors orartifacts from our representation, simply because theywill be reproduced below the visible threshold.

In this paper, we describe our LogLuv pixelencoding method, followed by a description of ourextension to Sam Leffler’s free TIFF library. We thenput forth a proposal for extending the Flashpix format,and follow this with an example image to demonstratethe value of this encoding, ending with a briefconclusion.

Encoding Method

We have implemented two LogLuv pixel encodings, a24-bit encoding and a 32-bit encoding. The 24-bitencoding breaks down into a 10-bit log luminanceportion and a 14-bit, indexed uv coordinate mapping.Color indexing minimizes waste, allowing us to cover theirregular shape of the visible gamut in imperceptiblesteps. The 32-bit encoding uses 16 bits for luminanceand 8 bits each for u’ and v’. Compared to the 24-bitencoding, the 32-bit version provides greater dynamicrange and precision at the cost of an extra byte per pixel.The exact interpretations of these two encodings aredescribed below.

24-bit EncodingIn 24 bits, we can pack much more visible

information than is commonly stored in three gamma-compressed 8-bit color primary values. By separatingluminance and using a log encoding, we can use 10 bitsto record nearly 5 orders of magnitude in 1.1% relativesteps that will be imperceivable under most conditions.The remaining 14 bits will be used to store a color index

corresponding to the smallest distinguishable patch sizeon a uv color chart. The bit allocation is showngraphically in Fig. 1.

Le Ce

Figure 1. 24-bit encoding. Le is the encoded log luminance,and Ce is the encoded uv color index.

To compute the integer encoding Le from realluminance, L, the we use the formula given in Eq. 1a. Tocompute real luminance from Le, we use the inverseformula given in Eq. 1b.

( ) L Le = +64 122log (1a)

( )[ ]L Le= + −exp . /2 0 5 64 12 (1b)

In addition, an Le value of 0 is taken to equal 0.0 exactly.An Le value of 1 corresponds to a real luminance value of0.000248 on an arbitrary scale, and the maximum Le

value of 1023 corresponds to a real value of 15.9 for adynamic range of 65,000:1, or 4.8 orders of magnitude.It is difficult to compare this range to an 8-bit gamma-compressed encoding, because 1.1% accuracy is possibleonly near the very top of the 8-bit range. Allowing theluminance error to go as high as 5%, the dynamic rangeof an 8-bit encoding with a nominal gamma of 2.2 is47:1, or 1.7 orders of magnitude. This leaves less thanone f-stop of exposure latitude, compared to 11 f-stops forour 10-bit log encoding.

To capture full-gamut chrominance using only 14bits, we cannot afford to waste codes on imaginarycolors. We therefore divide our “perceptually uniform”(u’,v’) color space [8] into equal area regions using ascanline traversal over the visible gamut. This encodingconcept is shown graphically in Fig. 2. The actualencoding has many more scanlines of course (163 to beexact), but the figure shows roughly how they are laidout. The minimum code value (0) is at the lower left,and codes are assigned left to right along each scanlineuntil the maximum value (just less than 214) is assignedto the rightmost value on the top scanline.

ux

x y' =

− + +4

2 12 3(2a)

vy

x y' =

− + +9

2 12 3(2b)

To encode a given color, we start with the standardconversion from CIE (x,y) chromaticity to (u’,v’) shownin Eq. 2. We then look up the appropriate scanline forour v’ value based on a uniform scanline height, andcompute the position within the scanline using ouruniform cell width. The index Ce is equal to the total ofthe scanlines below us plus the cells to the left in this

Page 128: HDRI and Image-Based Lighting

scanline. Cell width and height are both set to 0.0035 inour implementation, which corresponds to slightly lessthan the minimum perceptible step in this color spaceand uses up nearly all of the codes available in 14 bits.

0

max.

u

v

Figure 2. Scanline traversal of (u,v) coordinate space for 14-bit chromaticity encoding.

To get back the (x,y) chromaticity corresponding to aspecific color index, we may either use a 16 Kentry look-up table, or apply a binary search to find the scanlinecontaining corresponding to our Ce index. Once we haveour original (u’,v’) coordinates back, we can apply theinverse conversion given in Eq. 3 to get the CIEchromaticity coordinates. (Note that this finalcomputation may also be avoided using the same look-uptable.)

xu

u v=

− +9

6 16 12

'

' '(3a)

yv

u v=

− +4

6 16 12

'

' '(3b)

32-bit EncodingThe 32-bit encoding is actually simpler, since we

have 16 bits for (u’,v’), which is more than enough thatwe can dispense with the complex color indexingscheme. The encoding of luminance is similar, with theaddition of a sign bit so that negative luminances mayalso be encoded. In the remaining 15 bits, we can recordover 38 orders of magnitude in 0.27% relative steps,covering the full range of perceivable world luminancesin imperceptible steps. The bit breakdown is shown inFig. 3.

Le ue ve±

Figure 3. Bit allocation for 32-bit pixel encoding. MSB is asign bit, and the next 15 bits are used for a log luminance

encoding. The uv coordinates are separate 8-bit quantities.

The conversion to and from our log luminanceencoding is given in Eq. 4. The maximum luminanceusing this encoding is 1.84×1019, and the smallestmagnitude is 5.44×10-20. As in the 10-bit encoding, anLe value of 0 is taken to be exactly 0.0. The sign bit isextracted before encoding and reapplied after theconversion back to real luminance.

L Le = +256 642(log ) (4a)

( )[ ]L Le= + −exp . /2 0 5 256 64 (4b)

As we mentioned, the encoding of chrominance issimplified because we have enough bits to record ue andve separately. Since the gamut of u and v values isbetween 0 and 0.62, we chose a scale factor of 410 to gobetween our [0,255] integer range and real coordinates,as given in Eq. 5.

u ue = 410 ' (5a)

v ve = 410 ' (5b)

( )u ue' . /= + 0 5 410 (5c)

( )v ve' . /= + 05 410 (5d)

This encoding captures the full color gamut in 8 bits eachfor ue and ve. There will be some unused codes outsidethe visible gamut, but the tolerance this gives us of0.0017 units in uv space is already well below the visiblethreshold. Conversions to and from CIE (x,y)chromaticities are the same as given earlier in Eqs. 2 and3.

TIFF Input/Output Library

The LogLuv encodings described have been embedded asa new SGILOG compression type in Sam Leffler’spopular TIFF I/O library. This library is freelydistributed by anonymous ftp on ftp.sgi.com in the“/graphics/tiff/” directory.

When writing a high dynamic range (HDR) TIFFimage, the LogLuv codec (compression/decompressonmodule) takes floating point CIE XYZ scanlines andwrites out 24-bit or 32-bit compressed LogLuv-encodedvalues. When reading an HDR TIFF, the reverseconversion is performed to get back floating point XYZvalues. (We also provide a simple conversion to 24-bitgamma-compressed RGB for the convenience of readersthat do not know how to handle HDR pixels.)

Page 129: HDRI and Image-Based Lighting

Overcoming Gamut and Dynamic Range Limitations in Digital Images

An additional tag is provided for absolute luminancecalibration, named TIFFTAG_STONITS. This is asingle floating point value that may be used to convert Yvalues returned by the reader to absolute luminance incandelas per square meter. This tag may also be set bythe application that writes out a HDR TIFF to permitcalibrated scaling of values to a reasonable brightnessrange, where values of 1.0 will be displayed at themaximum output of the destination device. This scalefactor may also necessary for calibration of the 24-bitformat due to its more limited dynamic range.

Run-length CompressionAlthough at first it may appear that the 24-bit code is

a more compact representation, the 32-bit encoding offerssome advantages when it comes to applyingnondestructive techniques to reduce storagerequirements. By separating the bytes into four streamson each scanline, the 32-bit encoding can be efficientlycompressed using an adaptive run-length encoding [3].Since the top byte containing the sign bit and upper 7 logluminance bits changes very slowly, this byte-streamsubmits very well to run-length encoding. Likewise, theencoded ue and ve byte-streams compress well over areasof constant color. In contrast, the 24-bit encoding doesnot have a nice byte-stream breakup, so we do notattempt to run-length encode it, and the resulting files arequite often larger than the same data stored in the 32-bitformat.

Grayscale ImagesFor maximum flexibility, a pure luminance mode is

also provided by the codec, which stores and retrievesrun-length encoded 16-bit log luminance values using thesame scheme as applied in the 32-bit LogLuv encoding.There is no real space savings over a straight 32-bitencoding, since the ue and ve byte-streams compress topractically nothing for grayscale data, but this optionprovides an explicit way to specify floating pointluminance images for TIFF readers that care.

Raw I/OIt is also possible to decode the raw 24-bit and 32-bit

LogLuv data retrieved from an HDR TIFF directly, andthis has some advantages for implementing fast tonemapping and display algorithms. In the case of the 24-bit format, one can simply multiply the output of a1 Kentry Le table and a 16 Kentry Ce table to get a tone-mapped and gamma-compressed RGB result. The 32-bitencoding requires a little more work, since itsprecomputed tables are 32 and 64 Kentries, but the samelogic applies.

We have implemented this type of integer-mathtone-mapping algorithm in an HDR image viewer, and ittakes about a second to load and display a 512 by 512picture on a 180 MHz processor.

Example TIFF Code and ImagesUse of this encoding is demonstrated and sample

images are provided on the following web site:

http://www.sgi.com/Technology/pixformat/

A converter has been written to and from the Radiancefloating point picture format [6][7], and serves as anexample of LogLuv codec usage. The web site itself alsooffers programming tips and example code segments.

Example TIFF images using the 32-bit LogLuv and16-bit LogL encoding are provided on the web site.These images are either scanned from photographicnegatives or rendered using Radiance and converted tothe new TIFF format. Some images are rendered as 360°QuickTime VR panoramas suitable for experiments inHDR virtual reality.

Proposed Extension to Flashpix

The Flashpix format was originally developed by Kodakin collaboration with Hewlett-Packard, Live Picture andMicrosoft. Its definition and maintenance has since beentaken over by the Digital Imaging Group, a consortium ofthese and other companies. Flashpix is basically amultiresolution JPEG encoding, optimized for quickloading and editing at arbitrary pixel densities. Itsupports standard RGB as well as YCC color spaces with8 bits/primary maximum resolution. For furtherinformation, see the DIG web site:

http://www.digitalimaging.org

Because Flashpix starts with 8-bit gamma-compressedcolor primaries, the dynamic range is limited to the same1.7 orders of magnitude provided by other 24-bit RGBencodings. Furthermore, since JPEG encoding isapplied, there will be additional losses and artifactsdepending on the source image and the compressionquality setting.

We cannot directly replace the JPEG-encodedFlashpix image with our own, alternate format, since thiswould violate standard compatibility as put forth byKodak and enforced by the DIG. We must thereforeprovide any enhancement to the format as an optionalextension, which results in a certain amount ofredundancy in our case since the same pixels may berepresented by two encodings. This is unavoidable.

For our extension, we need a second layer of“deeper” image data be provided for Flashpix users andapplications that demand it. There are two ways wemight go about this. The simplest method is tocompletely duplicate the source image in a 24 or 32-bit/pixel LogLuv encoding. On average, this will takeroughly four to sixteen times as much space as theoriginal JPEG encoding. A more sophisticated method isto replace only those pixels that are out of gamut orotherwise inadequate in the original encoding. Wediscuss this method below.

Page 130: HDRI and Image-Based Lighting

High Dynamic Range Extension LayerOur proposed extension consists of a layer added to

the standard Flashpix format. This layer contains twological elements, a presence map of which pixels areincluded in the layer, and the list of corresponding 24-bitLogLuv pixels. The presence map may be represented byan entropy-encoded bitmap, which will typically take up5% to 15% as much space as the JPEG layer. Theextended pixels themselves will take between one halfand four times as much space as the original JPEG layer,depending on the proportion of out-of-gamut pixels in theoriginal image.

For an image that is entirely within gamut in theJPEG encoding, the presence map will compress toalmost nothing, and there will be no LogLuv pixels, sothe total overhead will be less than 1% of the originalimage. If the image is mostly out of the JPEG gamut,then the presence map might take half a bit per pixel,and the additional data will be the same size as a 24-bitRGB image. A typical high dynamic range image with15% out-of-gamut pixels will take roughly the samespace for the extension layer as the multiresolution JPEGlayer, so the total image size will be about twice what itwas originally. If the information is being accessed overthe internet, the HDR layer may be loaded as an option,so it does not cost extra unless and until it is needed.

Example Results

Fig. 4a shows a scanned photograph as it might appearon a PhotoCD using a YCC encoding. Since YCC cancapture up to “200% reflectance,” we can apply a tonemapping operator to bring this extra dynamic range intoour print, as shown in Fig. 5a. However, since manyparts of the image were brighter than this 200% value,we still lose much of the sky and circumsolar region, andeven the lighter asphalt in the foreground. In Fig. 4b, wesee where 35% of the original pixels are outside thegamut of a YCC encoding.

Figure 4. The left image (a) shows a PhotoYCC encoding of acolor photograph tone-mapped with a linear operator. The

right image (b) shows the out-of-gamut regions. Red areas aretoo bright or too dim, and green areas have inaccurate color.

Fig. 5b shows the same color negative scanned intoour 32-bit/pixel high dynamic range TIFF format andtone mapped using a histogram compression technique[4]. Fig. 6c shows the same HDR TIFF remapped usingthe perceptual model of Pattanaik et al [5]. Figs. 6a and6b show details of light and dark areas of the HDR imagewhose exposure has been adjusted to show the detailcaptured in the original negative. Without an HDRencoding, this information is either lost or unusable.

.

Figure 5. The left image(a) shows the YCC encoding afterremapping with a high dynamic range tone operator [4].

Unfortunately, since YCC has so little dynamic range, most ofthe bright areas are lost. The right image (b) shows the sameoperator applied to a 32-bit HDR TIFF encoding, showing the

full dynamic range of the negative.

Figure 6. The upper-left image (a) shows the circumsolarregion reduced by 4 f-stops to show the image detail recordedon the negative. The lower-left image (b) shows house details

boosted by 3 f-stops. The right image (c) shows our HDR TIFFmapped with the Pattanaik-Ferwerda tone operator [5].

DiscussionIt is clear from looking at these images that current

methods for tone-mapping HDR imagery, although betterthan a simple S-curve, are less than perfect. It wouldtherefore be a mistake to store an image that has beenirreversibly tone mapped in this fashion, as some scanner

Page 131: HDRI and Image-Based Lighting

Overcoming Gamut and Dynamic Range Limitations in Digital Images

software attempts to do. Storing an HDR image allowsus to take full advantage of future improvements in tonemapping and display algorithms, at a nominal cost.

Besides professional photography, there are anumber of application areas where HDR images are key.One is lighting simulation, where designers need to seean interior or exterior space as it would really appear,plus they need to evaluate things in terms absoluteluminance and illuminance levels. Since an HDR imagecan store the real luminance in its full-gamut coverage,this information is readily accessible to the designer.Another application is image-based rendering, where auser is allowed to move about in a scene by warpingcaptured or rendered images [1]. If these images havelimited dynamic range, it is next to impossible to adaptthe exposure based on the current view, and quality iscompromised. Using HDR pixels, a natural view can beprovided for any portion of the scene, no matter howbright or how dim. A fourth application area is digitalarchiving, where we are making a high-quality facsimileof a work of art for posterity. In this case, the pixels werecord are precious, so we want to make sure they containas much information as possible. At the same time, wehave concerns about storage space and transmissioncosts, so keeping this data as compact as possible isimportant. Since our HDR format requires little morespace than a standard 24-bit encoding to capture the fullvisible gamut, it is a clear winner for archivingapplications.

Our essential argument is that we can make betteruse of the bits in each pixel by adopting a perceptualencoding of color and brightness. Although we don’tknow how a given image might be used or displayed inthe future, we do know something about what a humancan observe in a given scene. By faithfully recording thisinformation, we ensure that our image will take fulladvantage of any future improvements in imagingtechnology, and our basic format will continue to findnew uses.

Conclusion

We have presented a new method for encoding highdynamic range digital images using log luminance anduv chromaticity to capture the entire visible range ofcolor and brightness. The proposed format requires littleadditional storage per pixel, while providing significantbenefits to suppliers, caretakers and consumers of digitalimagery.

Through the use of re-exposure and dynamic rangecompression, we have been able to show some of thebenefits of HDR imagery. However, it is more difficult toillustrate the benefits of a larger color gamut withoutcarefully comparing hard copy output of various multi-ink printers. Also, since we currently lack the ability to

capture highly saturated scenes, our examples wouldhave to be contrived from individual spectralmeasurements and hypothetical scenes. We thereforeleave this as a future exercise.

Future work on the format itself should focus on theapplication of lossy compression methods (such as JPEGand fractal image encoding) for HDR images. Withoutsuch methods, the storage cost for a given resolution mayhinder broad acceptance of this representation. Anotherextension we should look at is multispectral data, whichis needed for remote imaging and some types of lightingsimulation.

References

1. Paul Debevec, “Rendering Synthetic Objects into RealScenes: Bridging Traditional and Image-Based Graphics withGlobal Illumination and High Dynamic Range Photography,”Computer Graphics (Proceedings of ACM Siggraph 98).

2. Paul Debevec, Jitendra Malik, “Recovering High DynamicRange Radiance Maps from Photographs,” ComputerGraphics (Proceedings of ACM Siggraph 97).

3. Andrew Glassner, “Adaptive Run-Length Encoding,” inGraphics Gems II, edited by James Arvo, Academic Press,(1991).

4. Greg Larson, Holly Rushmeier, Christine Piatko, “AVisibility Matching Tone Reproduction Operator for HighDynamic Range Scenes,” IEEE Transactions onVisualization and Computer Graphics, 3, 4, (1997).

5. Sumant Pattanaik, James Ferwerda, Mark Fairchild, DonGreenberg, “A Multiscale Model of Adaptation and SpatialVision for Realistic Image Display,” Computer Graphics(Proceedings of Siggraph 98).

6. Greg Ward, “The RADIANCE Lighting Simulation andRendering System,” Computer Graphics (Proceedings ofSiggraph 94).

7. Greg Ward, “Real Pixels,” in Graphics Gems II, edited byJames Arvo, Academic Press, (1991).

8. Gunter Wyszecki, W.S. Stiles, Color Science: Concepts andMethods, Quantitative Data and Formulae, Second Edition,Wiley, (1982).

Biography

Gregory Ward Larson is a member of the technicalstaff in the engineering division of SGI. He graduatedwith an AB in Physics in 1983 from the UC Berkeley,and earned his Master's in CS from San Francisco Statein 1985. Greg has done work in physically-basedrendering, surface reflectance measurements, andelectronic data standards. He is the developer of thewidely-used Radiance synthetic imaging system and theMGF exchange standard for scene data.

Greg may be reached by e-mail at [email protected].

Page 132: HDRI and Image-Based Lighting

A Visibility Matching Tone Reproduction Operatorfor High Dynamic Range Scenes

Gregory Ward Larson†

Building Technologies ProgramEnvironmental Energy Technologies Division

Ernest Orlando Lawrence Berkeley National LaboratoryUniversity of California

1 Cyclotron RoadBerkeley, California 94720

Holly RushmeierIBM T.J. Watson Research Center

Christine Piatko††

National Institute for Standards and Technology

January 15, 1997

This paper is available electronically at:http://radsite.lbl.gov/radiance/papers

Copyright 1997 Regents of the University of Californiasubject to the approval of the Department of Energy

† Author's current address: Silicon Graphics, Inc., Mountain View, CA.†† Author's current address: JHU/APL, Laurel, MD.

Gregory Ward
This paper appeared in IEEE Transactions on Visualization and Computer Graphics, Vol. 3, No. 4, December 1997.
Page 133: HDRI and Image-Based Lighting

LBNL 39882UC 400

A Visibility Matching Tone Reproduction Operatorfor High Dynamic Range Scenes

Gregory Ward LarsonLawrence Berkeley National Laboratory

Holly RushmeierIBM T.J. Watson Research Center

Christine PiatkoNational Institute for Standards and Technology

ABSTRACTWe present a tone reproduction operator that preservesvisibility in high dynamic range scenes. Our methodintroduces a new histogram adjustment technique, based onthe population of local adaptation luminances in a scene.To match subjective viewing experience, the methodincorporates models for human contrast sensitivity, glare,spatial acuity and color sensitivity. We compare our resultsto previous work and present examples of our techniquesapplied to lighting simulation and electronic photography.

Keywords: Shading, Image Manipulation.

1 Introduction

The real world exhibits a wide range of luminance values. The human visual system iscapable of perceiving scenes spanning 5 orders of magnitude, and adapting moregradually to over 9 orders of magnitude. Advanced techniques for producing syntheticimages, such as radiosity and Monte Carlo ray tracing, compute the map of luminancesthat would reach an observer of a real scene. The media used to display these results --either a video display or a print on paper -- cannot reproduce the computed luminances,or span more than a few orders of magnitude. However, the success of realistic imagesynthesis has shown that it is possible to produce images that convey the appearance ofthe simulated scene by mapping to a set of luminances that can be produced by thedisplay medium. This is fundamentally possible because the human eye is sensitive torelative rather than absolute luminance values. However, a robust algorithm forconverting real world luminances to display luminances has yet to be developed.

The conversion from real world to display luminances is known as tone mapping. Tonemapping ideas were originally developed for photography. In photography or video,chemistry or electronics, together with a human actively controlling the scene lightingand the camera, are used to map real world luminances into an acceptable image on a

January 15, 1997 page 1

Page 134: HDRI and Image-Based Lighting

display medium. In synthetic image generation, our goal is to avoid active control oflighting and camera settings. Furthermore, we hope to improve tone mapping techniquesby having direct numerical control over display values, rather than depending on thephysical limitations of chemistry or electronics.

Consider a typical scene that poses a problem for tone reproduction in both photographyand computer graphics image synthesis systems. The scene is a room illuminated by awindow that looks out on a sunlit landscape. A human observer inside the room caneasily see individual objects in the room, as well as features in the outdoor landscape.This is because the eye adapts locally as we scan the different regions of the scene. If weattempt to photograph our view, the result is disappointing. Either the window is over-exposed and we can't see outside, or the interior of the room is under-exposed and looksblack. Current computer graphics tone operators either produce the same disappointingresult, or introduce artifacts that do not match our perception of the actual scene.

In this paper, we present a new tone reproduction operator that reliably maps real worldluminances to display luminances, even in the problematic case just described. Weconsider the following two criteria most important for reliable tone mapping:

1. Visibility is reproduced. You can see an object in the real scene if and only ifyou can see it in the display. Objects are not obscured in under- orover-exposed regions, and features are not lost in the middle.

2. Viewing the image produces a subjective experience that corresponds withviewing the real scene. That is, the display should correlate wellwith memory of the actual scene. The overall impression ofbrightness, contrast, and color should be reproduced.

Previous tone mapping operators have generally met one of these criteria at the expenseof the other. For example, some preserve the visibility of objects while changing theimpression of contrast, while others preserve the overall impression of brightness at theexpense of visibility.

Figure 1. A false color image showing the world luminance values for awindow office in candelas per meter squared (cd/m2 or Nits).

January 15, 1997 page 2

Page 135: HDRI and Image-Based Lighting

The new tone mapping operator we present addresses our two criteria. We develop amethod of modifying a luminance histogram, discovering clusters of adaptation levelsand efficiently mapping them to display values to preserve local contrast visibility. Wethen use models for glare, color sensitivity and visual acuity to reproduce imperfectionsin human vision that further affect visibility and appearance.

Figure 2. A linear mapping of the luminances in Figure 1 that over-exposes the view through the window.

Figure 3. A linear mapping of the luminances in Figure 1 that under-exposes the view of the interior.

January 15, 1997 page 3

Page 136: HDRI and Image-Based Lighting

Figure 4. The luminances in Figure 1 mapped to preserve the visibility ofboth indoor and outdoor features using the new tone mapping techniques

described in this paper.

2 Previous Work

The high dynamic range problem was first encountered in computer graphics whenphysically accurate illumination methods were developed for image synthesis in the1980's. (See Glassner [Glassner95] for a comprehensive review.) Previous methods forgenerating images were designed to automatically produce dimensionless values more orless evenly distributed in the range 0 to 1 or 0 to 255, which could be readily mapped to adisplay device. With the advent of radiosity and Monte Carlo path tracing techniques, webegan to compute images in terms of real units with the real dynamic range of physicalillumination. Figure 1 is a false color image showing the magnitude and distribution ofluminance values in a typical indoor scene containing a window to a sunlit exterior. Thegoal of image synthesis is to produce results such as Figure 4, which match ourimpression of what such a scene looks like. Initially though, researchers found that awide range of displayable images could be obtained from the same input luminances --such as the unsatisfactory over- and under-exposed linear reproductions of the image inFigures 2 and 3.

Initial attempts to find a consistent mapping from computed to displayable luminanceswere ad hoc and developed for computational convenience. One approach is to use afunction that collapses the high dynamic range of luminance into a small numericalrange. By taking the cube root of luminance, for example, the range of values is reducedto something that is easily mapped to the display range. This approach generallypreserves visibility of objects, our first criterion for a tone mapping operator. However,condensing the range of values in this way reduces fine detail visibility, and distortsimpressions of brightness and contrast, so it does not fully match visibility or reproducethe subjective appearance required by our second criterion.

January 15, 1997 page 4

Page 137: HDRI and Image-Based Lighting

A more popular approach is to use an arbitrary linear scaling, either mapping the averageof luminance in the real world to the average of the display, or the maximum non-lightsource luminance to the display maximum. For scenes with a dynamic range similar tothe display device, this is successful. However, linear scaling methods do not maintainvisibility in scenes with high dynamic range, since very bright and very dim values areclipped to fall within the display's limited dynamic range. Furthermore, scenes aremapped the same way regardless of the absolute values of luminance. A sceneilluminated by a search light could be mapped to the same image as a scene illuminatedby a flashlight, losing the overall impression of brightness and so losing the subjectivecorrespondence between viewing the real and display-mapped scenes.

A tone mapping operator proposed by Tumblin and Rushmeier [Tumblin93] concentratedon the problem of preserving the viewer's overall impression of brightness. As the lightlevel that the eye adapts to in a scene changes, the relationship between brightness (thesubjective impression of the viewer) and luminance (the quantity of light in the visiblerange) also changes. Using a brightness function proposed by Stevens and Stevens[Stevens60], they developed an operator that would preserve the overall impression ofbrightness in the image, using one adaptation value for real scene, and another adaptationvalue for the displayed image. Because a single adaptation level is used for the scene,though, preservation of brightness in this case is at the expense of visibility. Areas thatare very bright or dim are clipped, and objects in these areas are obscured.

Ward [Ward91] developed a simpler tone mapping method, designed to preserve featurevisibility. In this method, a non-arbitrary linear scaling factor is found that preserves theimpression of contrast (i.e., the visible changes in luminance) between the real anddisplayed image at a particular fixation point. While visibility is maintained at thisadaptation point, the linear scaling factor still results in the clipping of very high and verylow values, and correct visibility is not maintained throughout the image.

Chiu et al. [Chiu93] addressed this problem of global visibility loss by scaling luminancevalues based on a spatial average of luminances in pixel neighborhoods. Values in brightor dark areas would not be clipped, but scaled according to different values based on theirspatial location. Since the human eye is less sensitive to variations at low spatialfrequencies than high ones, a variable scaling that changes slowly relative to imagefeatures is not immediately visible. However, in a room with a bright source and darkcorners, the method inevitably produces display luminance gradients that are the oppositeof real world gradients. To make a dark region around a bright source, the transition froma dark area in the room to a bright area shows a decrease in brightness rather than anincrease. This is illustrated in Figure 5 which shows a bright source with a dark haloaround it. The dark halo that facilitates rendering the visibility of the bulb disrupts whatshould be a symmetric pattern of light cast by the bulb on the wall behind it. The reversegradient fails to preserve the subjective correspondence between the real room and thedisplayed image.

Inspired by the work of Chiu et al., Schlick [Schlick95] developed an alternative methodthat could compute a spatially varying tone mapping. Schlick's work concentrated onimproving computational efficiency and simplifying parameters, rather than improvingthe subjective correspondence of previous methods.

January 15, 1997 page 5

Page 138: HDRI and Image-Based Lighting

Figure 5. Dynamic range compression based on a spatially varying scalefactor (from [Chiu93]).

Contrast, brightness and visibility are not the only perceptions that should be maintainedby a tone mapping operator. Nakamae et al. [Nakamae90] and Spencer et al. [Spencer95]have proposed methods to simulate the effects of glare. These methods simulate thescattering in the eye by spreading the effects of a bright source in an image. Ferwerda etal. [Ferwerda96] proposed a method that accounts for changes in spatial acuity and colorsensitivity as a function of light level. Our work is largely inspired by these papers, andwe borrow heavily from Ferwerda et al. in particular. Besides maintaining visibility andthe overall impression of brightness, the effects of glare, spatial acuity and colorsensitivity must be included to fully meet our second criterion for producing a subjectivecorrespondence between the viewer in the real scene and the viewer of the syntheticimage.

A related set of methods for adjusting image contrast and visibility have been developedin the field of image processing for image enhancement (e.g., see Chapter 3 in[Green83]). Perhaps the best known image enhancement technique is histogramequalization. In histogram equalization, the grey levels in an image are redistributedmore evenly to make better use of the range of the display device. Numerousimprovements have been made to simple equalization by incorporating models ofperception. Frei [Frei77] introduced histogram hyperbolization that attempts toredistribute perceived brightness, rather than screen grey levels. Frei approximatedbrightness using the logarithm of luminance. Subsequent researchers such as Mokrane[Mokrane92] have introduced methods that use more sophisticated models of perceivedbrightness and contrast.

The general idea of altering histogram distributions and using perceptual models to guidethese alterations can be applied to tone mapping. However, there are two important

January 15, 1997 page 6

Page 139: HDRI and Image-Based Lighting

differences between techniques used in image enhancement and techniques for imagesynthesis and real-world tone mapping:

1. In image enhancement, the problem is to correct an image that has alreadybeen distorted by photography or video recording and collapsed intoa limited dynamic range. In our problem, we begin with anundistorted array of real world luminances with a potentially highdynamic range.

2. In image enhancement, the goal is to take an imperfect image and maximizevisibility or contrast. Maintaining subjective correspondence withthe original view of the scene is irrelevant. In our problem, we wantto maintain subjective correspondence. We want to simulatevisibility and contrast, not maximize it. We want to produce visuallyaccurate, not enhanced, images.

3 Overview of the New Method

In constructing a new method for tone mapping, we wish to keep the elements ofprevious methods that have been successful, and overcome the problems.

Consider again the room with a window looking out on a sunlit landscape. Like any highdynamic range scene, luminance levels occur in clusters, as shown in the histogram inFigure 6, rather than being uniformly distributed throughout the dynamic range. Thefailure of any method that uses a single adaptation level is that it maps a large range ofsparsely populated real world luminance levels to a large range of display values. If theeye were sensitive to absolute values of luminance difference, this would be necessary.However, the eye is only sensitive to the fact that there are bright areas and dim areas. Aslong as the bright areas are displayed by higher luminances than the dim areas in the finalimage, the absolute value of the difference in luminance is not important. Exploiting thisaspect of vision, we can close the gap between the display values for high and lowluminance regions, and we have more display luminances to work with to render featurevisibility.

Another failure of using a uniform adaptation level is that the eye rapidly adapts to thelevel of a relatively small angle in the visual field (i.e., about 1°) around the currentfixation point [Moon&Spencer45]. When we look out the window, the eye adapts to thehigh exterior level, and when we look inside, it adapts to the low interior level. Chiu etal. [Chiu93] attempted to account for this using spatially varying scaling factors, but thismethod produces noticeable gradient reversals, as shown in Figure 5.

Rather than adjusting the adaptation level based on spatial location in the image, we willbase our mapping on the population of the luminance adaptation levels in the image. Toidentify clusters of luminance levels and initially map them to display values, we will usethe cumulative distribution of the luminance histogram. More specifically, we will startwith a cumulative distribution based on a logarithmic approximation of brightness fromluminance values.

January 15, 1997 page 7

Page 140: HDRI and Image-Based Lighting

Figure 6. A histogram of adaptation values from Figure 1 (1° spotluminance averages).

First, we calculate the population of levels from a luminance image of the scene in whicheach pixel represents 1° in the visual field. We make a crude approximation of thebrightness values (i.e., the subjective response) associated with these luminances bytaking the logarithm of luminance. (Note that we will not display logarithmic values, wewill merely use them to obtain a distribution.) We then build a histogram and cumulativedistribution function from these values. Since the brightness values are integrated over asmall solid angle, they are in some sense based on a spatial average, and the resultingmapping will be local to a particular adaptation level. Unlike Chiu's method however, themapping for a particular luminance level will be consistent throughout the image, andwill be order preserving. Specifically, an increase in real scene luminance level willalways be represented by an increase in display luminance. The histogram andcumulative distribution function will allow us to close the gaps of sparsely populatedluminance values and avoid the clipping problems of single adaptation level methods. Byderiving a single, global tone mapping operator from locally averaged adaptation levels,we avoid the reverse gradient artifacts associated with a spatially varying multiplier.

January 15, 1997 page 8

Page 141: HDRI and Image-Based Lighting

We will use this histogram only as a starting point, and impose restrictions to preserve(rather than maximize) contrast based on models of human perception using ourknowledge of the true luminance values in the scene. Simulations of glare and variationsin spatial acuity and color sensitivity will be added into the model to maintain subjectivecorrespondence and visibility. In the end, we obtain a mapping of real world to displayluminance similar to the one shown in Figure 7.

For our target display, all mapped brightness values below 1 cd/m2 (0 on the vertical axis)or above 100 (2 on the vertical axis) are lost because they are outside the displayablerange. Here we see that the dynamic range between 1.75 and 2.5 has been compressed,yet we don't notice it in the displayed result (Figure 4). Compared to the two linearoperators, our new tone mapping is the only one that can represent the entire scenewithout losing object or detail visibility.

Figure 7. A plot comparing the global brightness mapping functions forFigures 1, 2, and 3, respectively.

In the following section, we illustrate this technique for histogram adjustment based oncontrast sensitivity. After this, we describe models of glare, color sensitivity and visual

January 15, 1997 page 9

Page 142: HDRI and Image-Based Lighting

acuity that complete our simulation of the measurable and subjective responses of humanvision. Finally, we complete the methods presentation with a summary describing howall the pieces fit together.

4 Histogram Adjustment

In this section, we present a detailed description of our basic tone mapping operator. Webegin with the introduction of symbols and definitions, and a description of the histogramcalculation. We then describe a naive equalization step that partially accomplishes ourgoals, but results in undesirable artifacts. This method is then refined with a linearcontrast ceiling, which is further refined using human contrast sensitivity data.

4.1 Symbols and Definitions

Lw = world luminance (in candelas/meter2)Bw = world brightness, log(Lw)Lwmin = minimum world luminance for sceneLwmax = maximum world luminance for sceneLd = display luminance (in candelas/meter2)Ldmin = minimum display luminance (black level)Ldmax = maximum display luminance (white level)Bde = computed display brightness, log(Ld) [Equation (4)]N = the number of histogram binsT = the total number of adaptation samplesƒ(bi) = frequency count for the histogram bin at bi∆b = the bin step size in log(cd/m2)P(b) = the cumulative distribution function [Equation (2)]log(x) = natural logarithm of xlog10(x) = decimal logarithm of x

4.2 Histogram Calculation

Since we are interested in optimizing the mapping between world adaptation and displayadaptation, we start with a histogram of world adaptation luminances. The eye adapts forthe best view in the fovea, so we compute each luminance over a 1° diameter solid anglecorresponding to a potential foveal fixation point in the scene. We use a logarithmicscale for the histogram to best capture luminance population and subjective response overa wide dynamic range. This requires setting a minimum value as well as a maximum,since the logarithm of zero is -∞. For the minimum value, we use either the minimum 1°spot average, or 10-4 cd/m2 (the lower threshold of human vision), whichever is larger.The maximum value is just the maximum spot average.

We start by filtering our original floating-point image down to a resolution that roughlycorresponds to 1° square pixels. If we are using a linear perspective projection, the pixelson the perimeter will have slightly smaller diameter than the center pixels, but they willstill be within the correct range. The following formula yields the correct resolution for

January 15, 1997 page 10

Page 143: HDRI and Image-Based Lighting

1° diameter pixels near the center of a linear perspective image:

S = 2 tan(θ/2) / 0.01745 (1)

where:S = width or height in pixelsθ = horizontal or vertical full view angle0.01745 = number of radians in 1°

For example, the view width and height for Figure 4 are 63° and 45° respectively, whichyield a sample image resolution of 70 by 47 pixels. Near the center, the pixels will be 1°square exactly, but near the corners, they will be closer to 0.85° for this wide-angle view.The filter kernel used for averaging will have little influence on our result, so long asevery pixel in the original image is weighted similarly. We employ a simple box filter.

From our reduced image, we compute the logarithms of the floating-point luminancevalues. Here, we assume there is some method for obtaining the absolute luminances ateach spot sample. If the image is uncalibrated, then the corrections for human vision willnot work, although the method may still be used to optimize the visible dynamic range.(We will return to this in the summary.)

The histogram is taken between the minimum and maximum values mentioned earlier inequal-sized bins on a log(luminance) scale. The algorithm is not sensitive to the numberof bins, so long as there are enough to obtain adequate resolution. We use 100 bins in allof our examples. The resulting histogram for Figure 1 is shown in Figure 6.

4.2.1 Cumulative Distribution

The cumulative frequency distribution is defined as:

P(b) =f (bi)

b i < b∑

T (2)

where:T = f (bi)

bi

∑ (i.e., the total number of samples)

Later on, we will also need the derivative of this function. Since the cumulativedistribution is a numerical integration of the histogram, the derivative is simply thehistogram with an appropriate normalization factor. In our method, we approximate acontinuous distribution and derivative by interpolating adjacent values linearly. Thederivative of our function is:

dP(b)

db=

f (b)

T ∆b (3)

where:

∆b =log(Lwmax ) − log( Lwmin)[ ]

N (i.e., the size of each bin)

January 15, 1997 page 11

Page 144: HDRI and Image-Based Lighting

Figure 8. Rendering of a bathroom model mapped with a linear operator.

4.3 Naive Histogram Equalization

If we wanted all the brightness values to have equal probability in our final displayedimage, we could now perform a straightforward histogram equalization. Although this isnot our goal, it is a good starting point for us. Based on the cumulative frequencydistribution just described, the equalization formula can be stated in terms of brightnessas follows:

Bde = log(Ldmin) + log(Ldmax) − log(Ldmin)[ ]⋅ P(Bw ) (4)

The problem with naive histogram equalization is that it not only compresses dynamicrange (contrast) in regions where there are few samples, it also expands contrast in highlypopulated regions of the histogram. The net effect is to exaggerate contrast in large areasof the displayed image. Take as an example the scene shown in Figure 8. Although wecannot see the region surrounding the lamps due to the clamped linear tone mappingoperator, the image appears to us as more or less normal. Applying the naive histogramequalization, Figure 9 is produced. The tiles in the shower now have a mottledappearance. Because this region of world luminance values is so well represented, naive

January 15, 1997 page 12

Page 145: HDRI and Image-Based Lighting

histogram equalization spreads it out over a relatively larger portion of the display'sdynamic range, generating superlinear contrast in this region.

Figure 9. Naive histogram equalization allows us to see the area aroundthe light sources but contrast is exaggerated in other areas such as the

shower tiles.

4.4 Histogram Adjustment with a Linear Ceiling

If the contrast being produced is too high, then what is an appropriate contrast forrepresenting image features? The crude answer is that the contrast in any given regionshould not exceed that produced by a linear tone mapping operator, since linear operatorsproduce satisfactory results for scenes with limited dynamic range. We will take thissimple approach first, and later refine our answer based on human contrast sensitivity.

A linear ceiling on the contrast produced by our tone mapping operator can be writtenthus:

dLd

dLw

≤Ld

Lw (5a)

January 15, 1997 page 13

Page 146: HDRI and Image-Based Lighting

That is, the derivative of the display luminance with respect to the world luminance mustnot exceed the display luminance divided by the world luminance. Since we have anexpression for the display luminance as a function of world luminance for our naivehistogram equalization, we can differentiate the exponentiation of Equation (4) using thechain rule and the derivative from Equation (3) to get the following inequality:

exp( Bde ) ⋅f (Bw )

T∆b⋅log(Ldmax ) − log(Ldmin)

Lw

≤Ld

Lw

(5b)

Since Ld is equal to exp( Bde ) , this reduces to a constant ceiling on ƒ(b):

f (b) ≤T∆b

log( Ldmax ) − log( Ldmin)(5c)

In other words, so long as we make sure no frequency count exceeds this ceiling, ourresulting histogram will not exaggerate contrast. How can we create this modifiedhistogram? We considered both truncating larger counts to this ceiling and redistributingcounts that exceeded the ceiling to other histogram bins. After trying both methods, wefound truncation to be the simplest and most reliable approach. The only complicationintroduced by this technique is that once frequency counts are truncated, T changes,which changes the ceiling. We therefore apply iteration until a tolerance criterion is met,which says that fewer than 2.5% of the original samples exceed the ceiling.1 Ourpseudocode for histogram_ceiling is given below:

boolean function histogram_ceiling()tolerance := 2.5% of histogram totalrepeat {

trimmings := 0compute the new histogram total Tif T < tolerance then

return FALSEforeach histogram bin i do

compute the ceilingif ƒ(bi) > ceiling then {

trimmings += ƒ(bi) - ceilingƒ(bi) := ceiling

}} until trimmings <= tolerancereturn TRUE

This iteration will fail to converge (and the function will return FALSE) if and only if thedynamic range of the output device is already ample for representing the sampleluminances in the original histogram. This is evident from Equation (5c), since ∆b is theworld brightness range over the number of bins:

f (bi ) ≤T

N⋅

log( Lwmax ) − log(Lwmin )[ ]log(Ldmax ) − log(Ldmin )[ ] (5d)

1The tolerance of 2.5% was chosen as an arbitrary small value, and it seems to make little difference eitherto the convergence time or the results.

January 15, 1997 page 14

Page 147: HDRI and Image-Based Lighting

If the ratio of the world brightness range over the display brightness range is less than one(i.e., our world range fits in our display range), then our frequency ceiling is less than thetotal count over the number of bins. Such a condition will never be met, since a uniformdistribution of samples would still be over the ceiling in every bin. It is easiest to detectthis case at the outset by checking the respective brightness ranges, and applying a simplelinear operator if compression is unnecessary.

We call this method histogram adjustment rather than histogram equalization because thefinal brightness distribution is not equalized. The net result is a mapping of the scene'shigh dynamic range to the display's smaller dynamic range that minimizes visible contrastdistortions, by compressing under-represented regions without expanding over-represented ones.

Figure 10 shows the results of our histogram adjustment algorithm with a linear ceiling.The problems of exaggerated contrast are resolved, and we can still see the full range ofbrightness. A comparison of these tone mapping operators is shown in Figure 11. Thenaive operator is superlinear over a large range, seen as a very steep slope near worldluminances around 100.8.

Figure 10. Histogram adjustment with a linear ceiling on contrastpreserves both lamp visibility and tile appearance.

January 15, 1997 page 15

Page 148: HDRI and Image-Based Lighting

Figure 11. A comparison of naive histogram equalization with histogramadjustment using a linear contrast ceiling.

The method we have just presented is itself quite useful. We have managed to overcomelimitations in the dynamic range of typical displays without introducing objectionablecontrast compression artifacts in our image. In situations where we want to get a good,natural-looking image without regard to how well a human observer would be able to seein a real environment, this may be an optimal solution. However, if we are concernedwith reproducing both visibility and subjective experience in our displayed image, thenwe must take it a step further and consider the limitations of human vision.

4.5 Histogram Adjustment Based on Human Contrast Sensitivity

Although the human eye is capable of adapting over a very wide dynamic range (on theorder of 109), we do not see equally well at all light levels. As the light grows dim, wehave more and more trouble detecting contrast. The relationship between adaptationluminance and the minimum detectable luminance change is well studied [CIE81]. Forconsistency with earlier work, we use the same detection threshold function used byFerwerda et al. [Ferwerda96]. This function covers sensitivity from the lower limit of

January 15, 1997 page 16

Page 149: HDRI and Image-Based Lighting

human vision to daylight levels, and accounts for both rod and cone response functions.The piecewise fit is reprinted in Table 1.

log10 of just noticeable difference applicable luminance range

-2.86 log10(La) < -3.94

(0.405 log10(La) + 1.6)2.18 - 2.86 -3.94 ≤ log10(La) < -1.44

log10(La) - 0.395 -1.44 ≤ log10(La) < -0.0184

(0.249 log(La) + 0.65)2.7 - 0.72 -0.0184 ≤ log10(La) < 1.9

log10(La) - 1.255 log10(La) ≥ 1.9Table 1. Piecewise approximation for ∆Lt(La).

We name this combined sensitivity function:

∆Lt(La) = "just noticeable difference" for adaptation level La (6)

Ferwerda et al. did not combine the rod and cone sensitivity functions in this manner,since they used the two ranges for different tone mapping operators. Since we are usingthis function to control the maximum reproduced contrast, we combine them at theircrossover point of 10-0.0184 cd/m2.

To guarantee that our display representation does not exhibit contrast that is morenoticeable than it would be in the actual scene, we constrain the slope of our operator tothe ratio of the two adaptation thresholds for the display and world, respectively. This isthe same technique introduced by Ward [Ward91] and used by Ferwerda et al.[Ferwerda96] to derive a global scale factor. In our case, however, the overall tonemapping operator will not be linear, since the constraint will be met at all potentialadaptation levels, not just a single selected one. The new ceiling can be written as:

dLd

dLw

≤∆Lt(Ld )

∆Lt (Lw )(7a)

As before, we compute the derivative of the histogram equalization function(Equation (4)) to get:

exp( Bde ) ⋅f (Bw )

T∆b⋅log(Ldmax ) − log(Ldmin)

Lw

≤∆Lt (Ld )

∆Lt(Lw )(7b)

However, this time the constraint does not reduce to a constant ceiling for ƒ(b). Wenotice that since Ld equals exp(Bde) and Bde is a function of Lw from Equation (4), our

January 15, 1997 page 17

Page 150: HDRI and Image-Based Lighting

ceiling is completely defined for a given P(b) and world luminance, Lw:

f (Bw ) ≤∆Lt(Ld )

∆Lt (Lw )⋅

T∆bLw

log(Ldmax) − log(Ldmin)[ ]Ld (7c)

where:Ld = exp(Bde), Bde given in Equation (4)

Once again, we must iterate to a solution, since truncating bin counts will affect T andP(b). We reuse the histogram_ceiling procedure given earlier, replacing the linearcontrast ceiling computation with the above formula.

Figure 12. Our tone mapping operator based on human contrastsensitivity compared to the histogram adjustment with linear ceiling usedin Figure 10. Human contrast sensitivity makes little difference at these

light levels.

Figure 12 shows the same curves for the linear tone mapping and histogram adjustmentwith linear clamping shown before in Figure 11, but with the curve for naive histogram

January 15, 1997 page 18

Page 151: HDRI and Image-Based Lighting

equalization replaced by our human visibility matching algorithm. We see the twohistogram adjustment curves are very close. In fact, we would have some difficultydifferentiating images mapped with our latest method and histogram adjustment with alinear ceiling. This is because the scene we have chosen has most of its luminance levelsin the same range as our display luminances. Therefore, the ratio between display andworld luminance detection thresholds is close to the ratio of the display and worldadaptation luminances. This is known as Weber's law [Riggs71], and it holds true over awide range of luminances where the eye sees equally well This correspondence makesthe right-hand side of Equations (5b) and (7b) equivalent, and so we should expect thesame result as a linear ceiling.

Figure 13. The brightness map for the bathroom scene with lightsdimmed to 1/100th of their original intensity, where human contrast

sensitivity makes a difference.

To see a contrast sensitivity effect, our world adaptation would have to be very differentfrom our display adaptation. If we reduce the light level in the bathroom by a factor of100, our ability to detect contrast is diminished. This shows up in a relatively largerdetection threshold in the denominator of Equation (7c), which reduces the ceiling for the

January 15, 1997 page 19

Page 152: HDRI and Image-Based Lighting

frequency counts. The change in the tone mapping operator is plotted in Figure 13 andthe resulting image is shown in Figure 14.

Figure 13 shows that the linear mapping is unaffected, since we just raise the scale factorto achieve an average exposure. Likewise, the histogram adjustment with a linear ceilingmaps the image to the same display range, since its goal is to reproduce linear contrast.However, the ceiling based on human threshold visibility limits contrast over much of thescene, and the resulting image is darker and less visible everywhere except the top of therange, which is actually shown with higher contrast since we now have display range tospare.

Figure 14 is darker and the display contrast is reduced compared to Figure 10. Becausethe tone mapping is based on local adaptation rather than a single global or spot average,threshold visibility is reproduced everywhere in the image, not just around a certain set ofvalues. This criterion is met within the limitations of the display's dynamic range.

Figure 14. The dimmed bathroom scene mapped with the function shownin Figure 13.

January 15, 1997 page 20

Page 153: HDRI and Image-Based Lighting

5 Human Visual Limitations

We have seen how histogram adjustment matches display contrast visibility to worldvisibility, but we have ignored three important limitations in human vision: glare, colorsensitivity and visual acuity. Glare is caused by bright sources in the visual periphery,which scatter light in the lens of the eye, obscuring foveal vision. Color sensitivity is lostin dark environments, as the light-sensitive rods take over for the color-sensitive conesystem. Visual acuity is also impaired in dark environments, due to the complete loss ofcone response and the quantum nature of light sensation.

In our treatment, we will rely heavily on previous work performed by Moon and Spencer[Moon&Spencer45] and Ferwerda et al. [Ferwerda96], applying it in the context of alocally adapted visibility-matching model.

5.1 Veiling Luminance

Bright glare sources in the periphery reduce contrast visibility because light scattered inthe lens and aqueous humor obscures the fovea; this effect is less noticeable whenlooking directly at a source, since the eye adapts to the high light level. The influence ofglare sources on contrast sensitivity is well studied and documented. We apply the workof Holladay [Holladay26] and Moon and Spencer [Moon&Spencer45], which relates theeffective adaptation luminance to the foveal average and glare source position andilluminance.

In our presentation, we will first compute a low resolution veil image from our fovealsample values. We will then interpolate this veil image to add glare effects to the originalrendering. Finally, we will apply this veil as a correction to the adaptation luminancesused for our contrast, color sensitivity and acuity models.

Moon and Spencer base their formula for adaptation luminance on the effect of individualglare sources measured by Holladay, which they converted to an integral over the entirevisual periphery. The resulting glare formula gives the effective adaptation luminance ata particular fixation for an arbitrary visual field:

La = 0.913Lf +K L( , )

2 cos( )sin( )d d> f

∫∫ (8)

where:La = corrected adaptation luminance (in cd/m2)Lf = the average foveal luminance (in cd/m2)L(θ,φ) = the luminance in the direction (θ,φ)

θf = foveal half angle, approx. 0.00873 radians (0.5°)K = constant measured by Holladay, 0.0096

The constant 0.913 in this formula is the remainder from integrating the second partassuming one luminance everywhere. In other words, the periphery contributes less than9% to the average adaptation luminance, due to the small value Holladay determined forK. If there are no bright sources, this influence can be safely neglected. However, brightsources will significantly affect the adaptation luminance, and should be considered inour model of contrast sensitivity.

January 15, 1997 page 21

Page 154: HDRI and Image-Based Lighting

To compute the veiling luminance corresponding to a given foveal sample (i.e., fixationpoint), we can convert the integral in Equation (8) to an average over peripheral samplevalues:

Lvi = 0.087 ⋅

Lj cos( i, j )

i, j2

j ≠ i∑

cos( i, j )

i, j2

j ≠i∑

(9)

where:Lvi = veiling luminance for fixation point iLj = foveal luminance for fixation point jθ

i,j= angle between sample i and j (in radians)

Since we must compute this sum over all foveal samples j for each fixation point i, thecalculation can be very time consuming. We therefore reduce our costs by approximatingthe weight expression as:

cos2 ≈

cos

2 − 2cos(10)

Since the angles between our samples are most conveniently available as vector dotproducts, which is the cosine, the above weight computation is quite fast. However, forlarge images (in terms of angular size), the Lvi calculation is still the mostcomputationally expensive step in our method due to the double iteration over i and j.

To simulate the effect of glare on visibility, we simply add the computed veil map to ouroriginal image. Just as it occurs in the eye, the veiling luminance will obscure the visiblecontrast on the display by adding to both the background and the foreground luminance.2This was the original suggestion made by Holladay, who noted that the effect glare hason luminance threshold visibility is equivalent to what one would get by adding theveiling luminance function to the original image [Holladay26]. This is quitestraightforward once we have computed our foveal-sampled veiling image given inEquation (9). At each image pixel, we perform the following calculation:

Lpvk = 0.913Lpk + Lv (k) (11)

where:Lpvk = veiled pixel at image position kLpk = original pixel at image position kLv(k) = interpolated veiling luminance at k

The Lv(k) function is a simple bilinear interpolation on the four closest samples in ourveil image computed in Equation (9). The final image will be lighter around glaresources, and just slightly darker on glare sources (since the veil is effectively beingspread away from bright points). Although we have shown this as a luminancecalculation, we retain color information so that our veil has the same color cast as theresponsible glare source(s).

2The contrast is defined as the ratio of the foreground minus the background over the background, soadding luminance to both foreground and background reduces contrast.

January 15, 1997 page 22

Page 155: HDRI and Image-Based Lighting

Figure 15 shows our original, fully lit bathroom scene again, this time adding in thecomputed veiling luminance. Contrast visibility is reduced around the lamps, but the veilfalls off rapidly (as 1/θ2) over other parts of the image. If we were to measure theluminance detection threshold at any given image point, the result should correspondclosely to the threshold we would measure at that point in the actual scene.

Figure 15. Our tone reproduction operator for the original bathroomscene with veiling luminance added.

Since glare sources scatter light onto the fovea, they also affect the local adaptation level,and we should consider this in the other parts of our calculation. We therefore apply thecomputed veiling luminances to our foveal samples as a correction before the histogramgeneration and adjustment described in Section 4. We deferred the introduction of thiscorrection factor to simplify our presentation, since in most cases it only weakly affectsthe brightness mapping function.

January 15, 1997 page 23

Page 156: HDRI and Image-Based Lighting

The correction to local adaptation is the same as Equation (11), but without interpolation,since our veil samples correspond one-to-one:

Lai = 0.913Li + Lvi (12)

where:Lai = adjusted adaptation luminance at fixation point iLi = foveal luminance for fixation point i

We will also employ these Lai adaptation samples for the models of color sensitivity andvisual acuity that follow.

5.2 Color Sensitivity

To simulate the loss of color vision in dark environments, we use the technique presentedby Ferwerda et al. [Ferwerda96] and ramp between a scotopic (grey) response functionand a photopic (color) response function as we move through the mesopic range. Thelower limit of the mesopic range, where cones are just starting to get enough light, isapproximately 0.0056 cd/m2. Below this value, we use the straight scotopic luminance.The upper limit of the mesopic range, where rods are no longer contributing significantlyto vision, is approximately 5.6 cd/m2. Above this value, we use the straight photopicluminance plus color. In between these two world luminances (i.e., within the mesopicrange), our adjusted pixel is a simple interpolation of the two computed output colors,using a linear ramp based on luminance.

Since we do not have a value available for the scotopic luminance at each pixel, we usethe following approximation based on a least squares fit to the colors on the MacbethColorChecker Chart™:

Yscot = Y ⋅ 1.33 ⋅ 1+Y + Z

X

−1.68

(13)

where:Yscot = scotopic luminanceX,Y,Z = photopic color, CIE 2° observer (Y is luminance)

This is a very good approximation to scotopic luminance for most natural colors, and itavoids the need to render another channel. We also have an approximation based onRGB values, but since there is no accepted standard for RGB primaries in computergraphics, this is much less reliable.

Figure 16 shows our dimmed bathroom scene with the human color sensitivity function inplace. Notice there is still some veiling, even with the lights reduced to 1/100th theirnormal level. This is because the relative luminances are still the same, and they scatterin the eye as before. The only difference here is that the eye cannot adapt as well whenthere is so little light, so everything appears dimmer, including the lamps. The colors areclearly visible near the light sources, but gradually less visible in the darker regions.

January 15, 1997 page 24

Page 157: HDRI and Image-Based Lighting

Figure 16. Our dimmed bathroom scene with tone mapping using humancontrast sensitivity, veiling luminance and mesopic color response.

5.3 Visual Acuity

Besides losing the ability to see contrast and color, the human eye loses its ability toresolve fine detail in dark environments. The relationship between adaptation level andfoveal acuity has been measured in subject studies reported by Shaler [Shaler37]. Atdaylight levels, human visual acuity is very high, about 50 cycles/degree. In the mesopicrange, acuity falls off rapidly from 42 cycles/degree at the top down to 4 cycles/degreenear the bottom. Near the limits of vision, the visual acuity is only about 2 cycles/degree.Shaler's original data is shown in Figure 17 along with the following functional fit:

R(La ) ≈ 17.25arctan(1.4log10(La ) + 0.35) + 25.72 (15)

where:R(La) = visual acuity in cycles/degreeLa = local adaptation luminance (in cd/m2)

January 15, 1997 page 25

Page 158: HDRI and Image-Based Lighting

Figure 17. Shaler's visual acuity data and our functional fit to it.

In their tone mapping paper, Ferwerda et al. applied a global blurring function based on asingle adaptation level [Ferwerda96]. Since we wish to adjust for acuity changes over awide dynamic range, we must apply our blurring function locally according to the fovealadaptation computed in Equation (12). To do this, we implement a variable-resolutionfilter using an image pyramid and interpolation, which is the mip map introduced byWilliams [Williams83] for texture mapping. The only difference here is that we areworking with real values rather than integers pixels.

At each point in the image, we interpolate the local acuity based on the four closest(veiled) foveal samples and Shaler's data. It is very important to use the foveal data (Lai)and not the original pixel value, since it is the fovea's adaptation that determines acuity.The resulting image will show higher resolution in brighter areas, and lower resolution indarker areas.

Figure 18 shows our dim bathroom scene again, this time applying the variable acuityoperator applied together with all the rest. Since the resolution of the printed image islow, we enlarged two areas for a closer look. The bright area has an average level around

January 15, 1997 page 26

Page 159: HDRI and Image-Based Lighting

25 cd/m2, corresponding to a visual acuity of about 45 cycles/degree. The dark area hasan average level of around 0.05 cd/m2, corresponding to a visual acuity of about 9cycles/degree.

Figure 18. The dim bathroom scene with variable acuity adjustment. Theinsets show two areas, one light and one dark, and the relative blurring of

the two.

6 Method Summary

We have presented a method for matching the visibility of high dynamic range scenes onconventional displays, accounting for human contrast sensitivity, veiling luminance, colorsensitivity and visual acuity, all in the context of a local adaptation model. However, inpresenting this method in parts, we have not given a clear idea of how the parts areintegrated together into a working program.

January 15, 1997 page 27

Page 160: HDRI and Image-Based Lighting

The order in which the different processes are executed to produce the final image is ofcritical importance. These are the steps in the order they must be performed:

procedure match_visibility()compute 1° foveal sample imagecompute veil imageadd veil to foveal adaptation imageadd veil to imageblur image locally based on visual acuity functionapply color sensitivity function to imagegenerate histogram of effective adaptation imageadjust histogram to contrast sensitivity functionapply histogram adjustment to imagetranslate CIE results to display RGB valuesend

We have not discussed the final step, mapping the computed display luminances andchrominances to appropriate values for the display device (e.g., monitor RGB settings).This is a well studied problem, and we refer the reader to the literature (e.g., [Hall89]) fordetails. Bear in mind that the mapped image accounts for the black level of the display,which must be subtracted out before applying the appropriate gamma and colorcorrections.

Although we state that the above steps must be carried out in this order, a few of the stepsmay be moved around, or removed entirely for a different effect. Specifically, it makeslittle difference whether the luminance veil is added before or after the blurring function,since the veil varies slowly over the image. Also, the color sensitivity function may beapplied anywhere after the veil is added so long as it is before histogram adjustment.

If the goal is to optimize visibility and appearance without regard to the limitations ofhuman vision, then all the steps between computing the foveal average and generating thehistogram may be skipped, and a linear ceiling may be applied during histogramadjustment instead of the human contrast sensitivity function. The result will be an imagewith all parts visible on the display, regardless of the world luminance level or thepresence of glare sources. This may be preferable when the only goal is to produce anice-looking image, or when the absolute luminance levels in the original scene areunknown.

7 Results

In our dynamic range compression algorithm, we have exploited the fact that humans areinsensitive to relative and absolute differences in luminance. For example, we can seethat it is brighter outside than inside on a sunny day, but we cannot tell how muchbrighter (3 times or 100) or what the actual luminances are (10 cd/m2 or 1000). With theadditional display range made available by adjusting the histogram to close the gapsbetween luminance levels, visibility (i.e., contrast) within each level can be properlypreserved. Furthermore, this is done in a way that is compatible with subjective aspectsof vision.

In the development sections, two synthetic scenes have served as examples. In thissection, we show results from two different application areas -- lighting simulation andelectronic photography.

January 15, 1997 page 28

Page 161: HDRI and Image-Based Lighting

Figure 19. A simulation of a shipboard control panel under emergencylighting.

Figure 20. A simulation of an air traffic control console.

January 15, 1997 page 29

Page 162: HDRI and Image-Based Lighting

Figure 21. A Christmas tree with very small light sources.

7.1 Lighting Simulation

In lighting design, it is important to simulate what it is like to be in an environment, notwhat a photograph of the environment looks like. Figures 19 and 20 show examples ofreal lighting design applications.

In Figure 19, the emergency lighting of a control panel is shown. It is critical that thelighting provide adequate visibility of signage and levers. An image synthesis methodthat cannot predict human visibility is useless for making lighting or system designjudgments.

Figure 20 shows a flight controller's console. Being able to switch back and forthbetween the console and the outdoor view is an essential part of the controller's job.Again, judgments on the design of the console cannot be made on the basis of ill-exposedor arbitrarily mapped images.

Figure 21 is not a real lighting application, but represents another type of interestinglighting. In this case, the high dynamic range is not represented by large areas of eitherhigh or low luminance. Very high, almost point, luminances are scattered in the scene.The new tone mapping works equally well on this type of lighting, preserving visibility

January 15, 1997 page 30

Page 163: HDRI and Image-Based Lighting

while keeping the impression of the brightness of the point sources. The color sensitivityand variable acuity mapping also correctly represent the sharp color view of areassurrounding the lights, and the greyed blurring of more dimly lit areas.

Figure 22. A scanned photograph of Memorial Church.

7.2 Electronic Photography

Finally, we present an example from electronic photography. In traditional photography,it is impossible to set the exposure so all areas of a scene are visible as they would be to ahuman observer. New techniques of digital compositing are now capable of creatingimages with much higher dynamic ranges. Our tone reproduction operator can be appliedto appropriately map these images into the range of a display device.

Figure 22 shows the interior of a church, taken on print film by a 35mm SLR camera witha 15mm fisheye lens. The stained glass windows are not completely visible because therecording film has been saturated, even though the rafters on the right are too dark to see.Figure 23 shows our tone reproduction operator applied to a high dynamic range versionof this image, called a radiance map. The radiance map was generated from 16 separateexposures, each separated by one stop. These images were scanned, registered, and thefull dynamic range was recovered using an algorithm developed by Debevec and Malik

January 15, 1997 page 31

Page 164: HDRI and Image-Based Lighting

[Debevec97]. Our tone mapping operator makes it possible to retain the image featuresshown in Figure 23, whose world luminances span over 6 orders of magnitude.

The field of electronic photography is still in its infancy. Manufacturers are rapidlyimproving the dynamic range of sensors and other electronics that are available at areasonable cost. Visibility preserving tone reproduction operators will be essential inaccurately displaying the output of such sensors in print and on common video devices.

Figure 23. Histogram adjusted radiance map of Memorial Church.

8 Conclusions and Future Work

There are still several degrees of freedom possible in this tone mapping operator. Forexample, the method of computing the foveal samples corresponding to viewer fixationpoints could be altered. This would depend on factors such as whether an interactivesystem or a preplanned animation is being designed. Even in a still image, a theory ofprobable gaze could be applied to improve the initial adaptation histogram. Additionalmodifications could easily be made to the threshold sensitivity, veil and acuity models tosimulate the effects of aging and certain types of visual impairment.

This method could also be extended to other application areas. The tone mapping couldbe incorporated into global illumination calculations to make them more efficient by

January 15, 1997 page 32

Page 165: HDRI and Image-Based Lighting

relating error to visibility. The mapping could also become part of a metric to compareimages and validate simulations, since the results correspond roughly to humanperception [Rushmeier95].

Some of the approximations in our operator merit further study, such as color sensitivitychanges in the mesopic range. A simple choice was made to interpolate linearly betweenscotopic and photopic response functions, which follows Ferwerda et al. [Ferwerda96]but should be examined more closely. The effect of the luminous surround on adaptationshould also be considered, especially for projection systems in darkened rooms. Finally,the current method pays little attention to absolute color perception, which is stronglyaffected by global adaptation and source color (i.e., white balance).

The examples and results we have shown match well with the subjective impression ofviewing the actual environments being simulated or recorded. On this informal level, ourtone mapping operator has been validated experimentally. To improve upon this, morerigorous validations are needed. While validations of image synthesis techniques havebeen performed before (e.g., Meyer et al. [Meyer86]), they have not dealt with the levelof detail required for validating an accurate tone operator. Validation experiments willrequire building a stable, non-trivial, high dynamic range environment and introducingobservers to the environment in a controlled way. Reliable, calibrated methods areneeded to capture the actual radiances in the scene and reproduce them on a displayfollowing the tone mapping process. Finally, a series of unbiased questions must beformulated to evaluate the subjective correspondence between observation of the physicalscene and observation of images of the scene in various media. While such experimentswill be a significant undertaking, the level of sophistication in image synthesis andelectronic photography requires such detailed validation work.

The dynamic range of an interactive display system is limited by the technology requiredto control continual, intense, focused energy over millisecond time frames, and by theuncontrollable elements in the ambient viewing environment. The technological,economic and practical barriers to display improvement are formidable. Meanwhile,luminance simulation and acquisition systems continue to improve, providing imageswith higher dynamic range and greater content, and we need to communicate this contenton conventional displays and hard copy. This is what tone mapping is all about.

9 Acknowldgments

The authors wish to thank Robert Clear and Samuel Berman for their helpful discussionsand comments. This work was supported by the Laboratory Directed Research andDevelopment Funds of Lawrence Berkeley National Laboratory under the U.S.Department of Energy under Contract No. DE-AC03-76SF00098.

10 References

[Chiu93]K. Chiu, M. Herf, P. Shirley, S. Swamy, C. Wang and K. Zimmerman"Spatially nonuniform scaling functions for high contrast images,"Proceedings of Graphics Interface '93, Toronto, Canada, May 1993, pp. 245-253.

January 15, 1997 page 33

Page 166: HDRI and Image-Based Lighting

[CIE81]CIE (1981) An analytical model for describing the influence of lightingparameters upon visual performance, vol 1. Technical foundations. CIE19/2.1, Techical committee 3.1

[Debevec97]Debevec, Paul and Jitendra Malik, "Recovering High Dynamic RangeRadiance Maps from Photographs," Proceedings of ACM SIGGRAPH '97.

[Ferwerda96]J. Ferwerda, S. Pattanaik, P. Shirley and D.P. Greenberg. "A Model of VisualAdaptation for Realistic Image Synthesis," Proceedings of ACM SIGGRAPH'96, p. 249-258.

[Frei77]W. Frei, "Image Enhancement by Histogram Hyperbolization," ComputerGraphics and Image Processing, Vol 6, 1977 286-294.

[Glassner95]A. Glassner, Principles of Digital Image Synthesis, Morgan Kaufman, SanFrancisco, 1995.

[Green83]W. Green Digital Image Processing: A Systems Approach, Van NostrandReinhold Company, NY, 1983.

[Hall89]R. Hall, Illumination and Color in Computer Generated Imagery, Springer-Verlag, New York, 1989.

[Holladay26]Holladay, L.L., Journal of the Optical Society of America, 12, 271 (1926).

[Meyer86]G. Meyer, H. Rushmeier, M. Cohen, D. Greenberg and K. Torrance. "AnExperimental Evaluation of Computer Graphics Imagery," ACM Transactionson Graphics, January 1986, Vol. 5, No. 1, pp. 30-50.

[Mokrane92]A. Mokrane, "A New Image Contrast Enhancement Technique Based on aContrast Discrimination Model," CVGIP: Graphical Models and ImageProcessing, 54(2) March 1992, pp. 171-180.

[Moon&Spencer45]P. Moon and D. Spencer, "The Visual Effect of Non-Uniform Surrounds",Journal of the Optical Society of America, vol. 35, No. 3, pp. 233-248 (1945)

[Nakamae90]E. Nakamae, K. Kaneda, T. Okamoto, and T. Nishita. "A lighting modelaiming at drive simulators," Proceedings of ACM SIGGRAPH 90, 24(3):395-404, June, 1990.

[Rushmeier95]H. Rushmeier, G. Ward, C. Piatko, P. Sanders, B. Rust, "Comparing Real andSynthetic Images: Some Ideas about Metrics,'' Sixth Eurographics Workshopon Rendering, proceedings published by Springer-Verlag. Dublin, Ireland,June 1995.

January 15, 1997 page 34

Page 167: HDRI and Image-Based Lighting

[Schlick95]C. Schlick, "Quantization Techniques for Visualization of High DynamicRange Pictures," Photorealistic Rendering Techniques (G. Sakas, P. Shirleyand S. Mueller, Eds.), Springer, Berlin, 1995, pp.7-20.

[Spencer95]G. Spencer, P. Shirley, K. Zimmerman, and D. Greenberg, "Physically-basedglare effects for computer generated images," Proceedings ACM SIGGRAPH'95, pp. 325-334.

[Stevens60]S. S. Stevens and J.C. Stevens, "Brightness Function: Parametric Effects ofadaptation and contrast," Journal of the Optical Society of America, 53, 1139.1960.

[Tumbline93]J. Tumblin and H. Rushmeier. "Tone Reproduction for Realistic Images,"IEEE Computer Graphics and Applications, November 1993, 13(6), 42-48.

[Ward91]G. Ward, "A contrast-based scalefactor for luminance display," In P.S.Heckbert (Ed.) Graphics Gems IV, Boston, Academic Press Professional.

[Williams83]L. Williams, "Pyramidal Parametrics," Computer Graphics, v.17,n.3, July1983.

January 15, 1997 page 35

Page 168: HDRI and Image-Based Lighting

High Dynamic Range ImagingGreg Ward

Exponent – Failure Analysis Assoc.Menlo Park, California

Abstract

The ultimate in color reproduction is a display that canproduce arbitrary spectral content over a 300-800 nm rangewith 1 arc-minute resolution in a full spherical hologram.Although such displays will not be available until next year,we already have the means to calculate this informationusing physically-based rendering. We would therefore liketo know: how may we represent the results of ourcalculation in a device-independent way, and how do we mapthis information onto the displays we currently own? Inthis paper, we give an example of how to calculate fullspectral radiance at a point and convert it to a reasonablycorrect display color. We contrast this with the waycomputer graphics is usually done, and show wherereproduction errors creep in. We then go on to explainreasonable short-cuts that save time and storage spacewithout sacrificing accuracy, such as illuminant discountingand human gamut color encodings. Finally, we demonstratea simple and efficient tone-mapping technique that matchesdisplay visibility to the original scene.

Introduction

Most computer graphics software works in a 24-bit RGBspace, with 8-bits allotted to each of the three primaries in apower-law encoding. The advantage of this representation isthat no tone-mapping is required to obtain a reasonablereproduction on most commercial CRT display monitors,especially if both the monitor and the software adhere to thesRGB standard, i.e., CCIR-709 primaries and a 2.2 gamma[1]. The disadvantage of this practice is that colors outsidethe sRGB gamut cannot be represented, particularly valuesthat are either too dark or too bright, since the usefuldynamic range is only about 90:1, less than 2 orders ofmagnitude. By contrast, human observers can readilyperceive detail in scenes that span 4-5 orders of magnitude inluminance through local adaptation, and can adapt inminutes to over 9 orders of magnitude. Furthermore, thesRGB gamut only covers about half the perceivable colors,missing large regions of blue-greens and violets, amongothers. Therefore, although 24-bit RGB does a reasonablejob of representing what a CRT monitor can display, it doesa poor job representing what a human observer can see.

Display technology is evolving rapidly. Flat-screenLCD displays are starting to replace CRT monitors in manyoffices, and LED displays are just a few years off.Micromirror projection systems with their superior dynamic

range and color gamut are already widespread, and laser rasterprojectors are on the horizon. It is an important questionwhether we will be able to take full advantage and adapt ourcolor models to these new devices, or will we be limited aswe are now to remapping sRGB to the new gamuts we haveavailable -- or worse, getting the colors wrong? Unless weintroduce new color models to our image sources and do itsoon, we will never get out of the CRT color cube.

The simplest solution to the gamut problem is toadhere to a floating-point color space. As long as we permitvalues greater than one and less than zero, any set of colorprimaries may be linearly transformed into any other set ofcolor primaries without loss. The principal disadvantage ofmost floating-point representations is that they take up toomuch space (96-bits/pixel as opposed to 24). Although thismay be the best representation for color computations,storing this information to disk or transferring it over theinternet is a problem. Fortunately, there are representationsbased on human perception that are compact and sufficientlyaccurate to reproduce any visible color in 32-bits/pixel orless, and we will discuss some of these in this paper.

There are two principal methods for generating highdynamic-range source imagery: physically-based rendering(e.g., [2]), and multiple-exposure image capture (e.g., [3]).In this paper, we will focus on the first method, since it ismost familiar to the author. It is our hope that in thefuture, camera manufacturers will build HDR imagingprinciples and techniques into their cameras, but for now,the easiest path to full gamut imagery seems to be computergraphics rendering.

Computer graphics lifts the usual constraints associatedwith physical measurements, making floating-point colorthe most natural medium in which to work. If a renderer isphysically-based, it will compute color values thatcorrespond to spectral radiance at each point in the renderedimage. These values may later be converted to displayablecolors, and the how and wherefore of this tone-mappingoperation is the main topic of this paper. Before we get totone-mapping, however, we must go over some of thedetails of physically-based rendering, and what qualifies arenderer in this category. Specifically, we will detail thebasic lighting calculation, and compare this to commonpractice in computer graphics rendering. We highlight somecommon assumptions and approximations, and describealternatives when these assumptions fail. Finally, wedemonstrate color and tone mapping methods for convertingthe computed spectral radiance value to a displayable color ateach pixel.

Page 169: HDRI and Image-Based Lighting

The Spectral Rendering Equation

Ro( o, ) = fr ( o; i, ) Ri(∫∫i, )cos i d i

(1)

The spectral rendering Eq. (1) expresses outgoing spectralradiance Ro at a point on a surface in the direction o ( o, o)as a convolution of the bidirectional reflectance distributionfunction (BRDF) with the incoming spectral radiance overthe projected hemisphere. This equation is the basis ofmany physically-based rendering programs, and it alreadycontains a number of assumptions:

1. Light is reflected at the same wavelength at whichit is received; i.e., the surface is notfluorescent.

2. Light is reflected at the same position at which it isreceived; i.e., there is no subsurface scattering.

3. Surface transmission is zero.4. There are no polarization effects.5. There is no diffraction.6. The surface does not spontaneously emit light.

In general, these assumptions are often wrong. Startingwith the first assumption, many modern materials such asfabrics, paints, and even detergents, contain “whiteningagents” which are essentially phosphors added to absorbultraviolet rays and re-emit them at visible wavelengths.The second assumption is violated by many natural andman-made surfaces, such as marble, skin, and vinyl. Thethird assumption works for opaque surfaces, but fails fortransparent and thin, translucent objects. The fourthassumption fails for any surface with a specular (shiny)component, and becomes particularly troublesome whenskylight (which is strongly polarized) or multiple reflectionsare involved. The fifth assumption fails when surfacefeatures are on the order of the wavelength of visible light,and the sixth assumption is violated for light sources.

Each of these assumptions may be addressed andremedied as necessary. Since a more general renderingequation would require a long and tedious explanation, wemerely describe what to add to account for the effects listed.To handle fluorescence, the outgoing radiance at wavelengthλo may be computed from an integral of incoming radianceover all wavelengths λI, which may be discretized in amatrix form [4]. To handle subsurface scattering, we canintegrate over the surface as well as incoming directions, oruse an approximation [5]. To handle transmission, wesimply integrate over the sphere instead of the hemisphere,and take the absolute value of the cosine for the projectedarea [2]. To account for polarization, we add two terms forthe transverse and parallel polarizations in each speculardirection [4] [6]. To handle diffraction, we fold interactionsbetween wavelength, polarization, amplitude and directioninto the BRDF and the aforementioned extensions [7].Light sources are the simplest exception to handle – wesimply add in the appropriate amount of spontaneousradiance output as a function of direction and wavelength.

Participating MediaImplicitly missing from Eq. (1) is the interaction of lightwith the atmosphere, or participating media. If the spacebetween surfaces contains significant amounts of dust,smoke, or condensation, a photon leaving one surface maybe scattered or absorbed along the way. An additionalequation is therefore needed to describe this volumetriceffect, since the rendering equation only addressesinteractions at surfaces.

dR(s)

ds=− a R(s) − s R(s) +

s

4Ri( i)P( i) d∫

(2)

Eq. (2) gives the differential change in radiance as a functionof distance along a path. The coefficients σa and σs give theabsorption and scattering densities respectively at position s,which correspond to the probabilities that light will beabsorbed or scattered per unit of distance traveled. Thescattering phase function, P( i), gives the relativeprobability that a ray will be scattered in from direction i atthis position. All of these functions and coefficients arealso a function of wavelength.

The above differential-integral equation is usually solvednumerically by stepping through each position along thepath, starting with the radiance leaving a surface given byEq. (1). Recursive iteration from a sphere of scattereddirections can quickly overwhelm such a calculation,especially if it is extended to multiple scattering events.Without going into details, Rushmeier et al. approached theproblem of globally participating media using a zonalapproach akin to radiosity that divides the scene into a finiteset of voxels whose interactions are characterized in a form-factor matrix [8]. More recently, a modified ray-tracingmethod called the photon map has been applied successfullyto this problem by Wann Jensen et al. [9]. In this method,photons are tracked as they scatter and are stored in theenvironment for later resampling during rendering .

Solving the Rendering EquationEq. (1) is a Fredholm integral equation of the second kind,which comes close to the appropriate level of intimidationbut fails to explain why it is so difficult to solve in general[10]. Essentially, the equation defines outgoing radiance asan integral of incoming radiance at a surface point, and thatincoming radiance is in turn defined by the same integralwith different parameters evaluated at another surface point.Thus, the surface geometry and material functions comprisethe boundary conditions of an infinitely recursive system ofintegral equations. In some sense, it is remarkable thatresearchers have made any progress in this area at all, but infact, there are many people in computer graphics whobelieve that rendering is a solved problem.

For over fifteen years, three approaches have dominatedresearch and practice in rendering. The first approach isusually referred to as the local illumination approximation,and is the basis for most graphics rendering hardware, and

Page 170: HDRI and Image-Based Lighting

much of what you see in movies and games. In thisapproximation, the integral equation is converted into asimple sum over light sources (i.e., concentrated emitters)and a general ambient term. The second approach is calledray tracing, and as its name implies, this method tracesadditional rays to determine specular reflection andtransmission, and may be used to account for more generalinterreflections as well [11] [12]. The third approach iscalled radiosity after the identical method used in radiativetransfer, where reflectances are approximated as Lambertianand the surfaces are divided into patches to convert theintegral equation into a large linear system that may besolved iteratively [13]. Comparing these three approaches,local illumination is the cheapest and least accurate. Raytracing has the advantage of coping well with complexgeometry and materials, and radiosity does the best job ofcomputing global interactions in simpler, diffuseenvironments.

In truth, none of the methods currently in use provides acomplete and accurate solution to the rendering equation forgeneral environments, though some come closer than others.The first thing to recognize in computer graphics, andcomputer simulation in general, is that the key to getting areasonable answer is finding the right approximation. Thereason that local illumination is so widely employed whenthere are better techniques available is not simply that it’scheaper; it provides a reasonable approximation to much ofwhat we see. With a few added tricks, such as shadow maps,reflection maps and ambient lights, local illumination in thehands of an expert does a very credible job. However, this isnot to say that the results are correct or accurate. Even inperceptual terms, the colors produced at each pixel areusually quite different from those one would observe in areal environment. In the entertainment industry, this maynot be a concern, but if the application is prediction orvirtual reenactment, better accuracy is necessary.

For the remainder of this paper, we assume thataccuracy is an important goal, particularly color accuracy.We therefore restrict our discussion of rendering and displayto physically-based global illumination methods, such asray-tracing and radiosity.

Tone Mapping

By computing an approximate solution to Eq. (1) for agiven planar projection, we obtain a spectral rendering thatrepresents each image point in physical units of radiance perwavelength (e.g., SI units of watts/steradian/meter2/nm).Whether we arrive at this result by ray-tracing, radiosity, orsome combination, the next important task is to convert thespectral radiances to pixel color values for display. If we failto take this step seriously, it almost doesn’t matter howmuch effort we put into the rendering calculation – thedisplayed image will look wrong.

Converting a spectral image to a display image isusually accomplished in two stages. The first stage is toconvert the spectral radiances to a tristimulus space, such asCIE XYZ. This is done by convolving each radiance

spectrum with the three standard CIE observer functions.The second stage is to map each tristimulus value into ourtarget display’s color space. This process is called tone-mapping, and depending on our goals and requirements, wemay take different approaches to arrive at different results.Here are a few possible rendering intents:

1. Colorimetric intent: Attempt to reproduce theexact color on the display, ignoring vieweradaptation.1

2. Saturation intent: Maintain color saturation as faras possible, allowing hue to drift.

3. Perceptual intent: Attempt to match perception ofcolor by remapping to display gamut andviewer adaptation.

The rendering intents listed above have been put forth by theICC profile committee, and their exact meaning issomewhat open to interpretation, especially for out-of-gamutcolors. Even for in-gamut colors, the perceptual intent,which interests us most, may be approached in severaldifferent ways. Here are a few possible techniques:

A. Shrink the source (visible) gamut to fit within thedisplay gamut, scaling uniformly about theneutral line.

B. Same as A, except apply relative scaling so lesssaturated colors are affected less than moresaturated ones. The extreme form of this isgamut-clipping.

C. Scale colors on a curve determined by imagecontent, as in a global histogram adjustment.

D. Scale colors locally based on image spatial content,as in Land’s retinex theory.

To any of the above, we may also add a white pointtransformation and/or contrast adjustment to compensate fora darker or brighter surround. In general, it is impossible toreproduce exactly the desired observer stimulus unless thesource image contains no bright or saturated colors or thedisplay has an unusually wide gamut and dynamic range.2

Before we can explore any gamut-mapping techniques,we need to know how to get from a spectral radiance valueto a tristimulus color such as XYZ or RGB. Thecalculation is actually straightforward, but the literature onthis topic is vast and confusing, so we give an explicitexample to make sure we get it right.

Correct Color RenderingLooking at the simplest case, spectral reflection of a smalllight source from a diffuse surface in Eq. (1) reduces to thefollowing formula for outgoing radiance:

Ro( ) = d ( )E i( )

(3)

1 The ICC Colorimetric intent is actually divided into relativeand absolute intents, but this distinction is irrelevant to ourdiscussion.2 See www.hitl.washington.edu/research/vrd/ for informationon Virtual Retinal Display technology.

Page 171: HDRI and Image-Based Lighting

where d( ) is the diffuse reflectance as a function ofwavelength, and Ei( ) is the spectral irradiance computed byintegrating radiance over the projected source. To convertthis to an absolute XYZ color, we apply the standard CIEconversion, given below for SI units [16]:

X = 683 x ( )R( )d∫Y = 683 y ( )R( )d∫Z = 683 z ( ) R( ) d∫

(4)

At this point, we may wish to convert to an opponentcolor space for gamut-mapping, or we may wait until we arein the device color space. If our tone-mapping is a simplescale factor as described in technique A above, we may applyit in any linear color space and the results will be the same.If we convert first to a nonlinear device color space, we needto be aware of the meaning of out-of-gamut colors in thatspace before we map them back into the legal range ofdisplay values. We demonstrate a consistent and reasonablemethod, then compare to what is usually done in computergraphics.

BlueFlower ExampleTo compute the absolute CIE color for a surface point, weneed to know the spectra of the source and the material.Fig. 1 shows the source spectra for standard illuminant A(2856K tungsten), illuminant B (simulated sunlight), andilluminant D65 (6500K daylight). Fig. 2 shows thereflected spectral radiance of the BlueFlower patch from theMacBeth chart under each of these illuminants. To thesecurves, we apply the CIE standard observer functions usingEq. (4).

Source Spectra

38

0

39

0

40

0

41

0

42

0

43

0

44

0

45

0

46

0

47

0

48

0

49

0

50

0

51

0

52

0

53

0

54

0

55

0

56

0

57

0

58

0

59

0

60

0

61

0

62

0

63

0

64

0

65

0

66

0

67

0

68

0

69

0

70

0

71

0

72

0

Wavelength (nm)

Illum A

Illum B

Illum D65

Figure 1. Spectral power of three standard illuminants.

The resulting XYZ values for the three source conditions isgiven in the first row of Table 1. Not surprisingly, there isa large deviation in color under different illuminants,especially tungsten. We can convert these colors to theirRGB equivalents using Eq. (5), as given in the second rowof Table 1. If we were to directly display the colors from the

illuminant A and B conditions on the screen, they wouldlikely appear incorrect because the viewer would be adaptedto the white point of the monitor rather than the white pointof the original scenes being rendered. If we assume thescene white point is the same color as the illuminant and thedisplay white point is D65, then a white point adjustment isnecessary for the other illuminants (A and B), as given inthe third row of Table 1.

Reflected Spectra

38

0

39

0

40

0

41

0

42

0

43

0

44

0

45

0

46

0

47

0

48

0

49

0

50

0

51

0

52

0

53

0

54

0

55

0

56

0

57

0

58

0

59

0

60

0

61

0

62

0

63

0

64

0

65

0

66

0

67

0

68

0

69

0

70

0

71

0

72

0

Wavelength (nm)

Under A

Under B

Under D65

Figure 2. Spectral radiance of MacBeth BlueFlower patch underthree standard illuminants.

SourceCIE (x,y)

Illum D65(.3127,.3290)

Illum B(.3484,.3516)

Illum A(.4475,.4075)

BlueFlowerCIE XYZ

0.2740.2480.456

0.2800.2480.356

0.3020.2480.145

709 RGB(absolute)

0.2790.2190.447

0.3490.2090.341

0.5250.1790.119

709 RGB(adjusted)

0.2790.2190.447

0.2850.2180.444

0.3060.2150.426

Table 1. Computed color values for BlueFlower under threestandard illuminants.

R

G

B

=C

X

Y

Z

C709 =3.2410 −1.5374 −0.4986

−0.9692 1.8760 0.0416

0.0556 −0.2040 1.0570

(5)

We use a linear transform to adjust the white point from thatof the illuminant to that of the display, which we assume tobe D65 in this example. Eq. (5) gives the absolutetransformation from XYZ to CCIR-709 linear RGB, and

Page 172: HDRI and Image-Based Lighting

this is all we need for the D65 illuminant condition. Forthe others, we apply the transformation shown in Eq. (6).

Eq. (6) is the linear von Kries adaptation model withthe CMCCAT2000 primary matrix [14], which does areasonable job of accounting for chromatic adaptation whenshifting from one dominant illuminant to another [15]. Theoriginal white point primaries (Rw,Gw,Bw) are computedfrom the illuminant XYZ using the MCMCCAT matrix, and thedestination primaries (Rw’,Gw’,Bw’) for D65 are computedusing the same transform to be (0.9478,1.0334,1.0850).

′ X

′ Y

′ Z

= M−1

′ R w Rw 0 0

0 ′ G w Gw 0

0 0 ′ B w Bw

M

X

Y

Z

Rw

Gw

Bw

= M

Xw

Yw

Zw

MCMCCAT =0.7982 0.3389 −0.1371

−0.5918 1.5512 0.0406

0.0008 0.0239 0.9753

(6)

The combined matrices for a white shift from standardilluminants B and A to D65 (whose chromaticities are givenat the top of Table 1) and subsequent conversion from CIEXYZ to CCIR-709 RGB color space, are given in Eq.(7) asCB and CA. Matrix C709 from Eq. (5) was concatenatedwith the matrix terms in Eq. (6) to arrive at these results,which may be substituted for C709 in Eq. (5) to get theadjusted RGB colors in the third row of Table 1 from theabsolute XYZ values in the first row.

CB =3.1273 −1.6836 −0.4867

−0.9806 1.9476 0.0282

0.0605 −0.2036 1.3404

CA =2.9355 −2.0416 −0.5116

−1.0247 2.1431 −.0500

0.0732 −0.1798 3.0895

(7)

Conventional CG CalculationThe standard approach in computer graphics colorcalculations is to assume all light sources are perfectly whiteand perform calculations in RGB color space. To displaythe results, a linear scale factor may be applied to bring theresults into some reasonable range, and any values outsidethe sRGB gamut will be clamped.

We obtain an RGB value for the BlueFlower materialfrom its published (x,y) chromaticity of (0.265,0.240) andreflectance of 24.3%. These published values correspond toviewing under standard illuminant C (simulated overcast),

which is slightly bluer than D65. The linear RGB color forthe flower material using the matrix C709 from Eq. (5) is(0.246,0.217,0.495), which differs from the D65 results inTable 1 by 10 ∆E* units using the CIE L*uv perceptualmetric [16]. Most of this difference is due to the incorrectscene illuminant assumption, since the ∆E* betweenilluminant C and D65 is also around 10. This demonstratesthe inherent sensitivity of color calculations to source color.Using the color corresponding to the correct illuminant istherefore very important.

The reason CG lighters usually treat sources as white isto avoid the whole white balancing issue. As evident fromthe third row in Table 1, careful accounting of the lightsource and chromatic adaptation is almost a no-op in theend. For white points close to the viewing condition ofD65, the difference is small: a difference of just 1 ∆E* forilluminant B. However, tungsten is very far from daylight,and the ∆E* for illuminant A is more than 5, which isdefinitely visible. Clearly, if we include the sourcespectrum, we need to include chromatic adaptation in ourtone-mapping. Otherwise, the differences will be veryvisible indeed -- a ∆E* of 22 for illuminant B and nearly 80for illuminant A!

What if we include the source color, but use an RGBapproximation instead of the full spectral rendering? Errorswill creep in from the reduced spectral resolution, and theirsignificance will depend on the source and reflectancespectra. Computing everything in CCIR-709 RGB for ourBlueFlower example, the ∆E* from the correct result is 1for illuminant B and nearly 8 for illuminant A. Theseerrors are at least as large as ignoring the source colorentirely, so there seems to be little benefit in this approach.

Relative Color ApproximationAn improved method that works well for scenes with asingle dominant illuminant is to compute the absolute RGBcolor of each material under the illuminant using a spectralprecalculation from Eqs. (3) and (4). The source itself ismodeled as pure white (Y,Y,Y) in the scene, and sourceswith a different color are modeled relative to this illuminantas (Rs/Rw,Gs/Gw,Bs/Bw), where (Rw,Gw,Bw) is the RGBvalue of the dominant illuminant and (Rs ,Gs,Bs) is the colorof the other source. In our example, the RGB color of theBlueFlower material under the three standard illuminants arethose given in the second row of Table 1.

Prior to display, the von Kries chromatic adaptation inEq. (5) is applied to the image pixels using the dominantsource and display illuminants. The incremental cost of ourapproximation is therefore a single transform on top of theconventional CG rendering, and the error is zero byconstruction for direct reflection from a single source type.There may be errors associated with sources having differentcolors and multiple reflections, but these will be negligiblein most scenes. Best of all, no software change is required –we need only precalculate the correct RGB values for oursources and surfaces, and the rest comes for free.

It is even possible to save the cost of the final vonKries transform by incorporating it into the precalculation,

Page 173: HDRI and Image-Based Lighting

computing adjusted rather than absolute RGB values for thematerials, as in Eq. (7). We would prefer to keep thistransform separate to preserve the colorimetric nature of therendered image, but as a practical matter, it is oftennecessary to record a white-balanced image, anyway. Aslong as we record the scene white point in an image formatthat preserves the full gamut and dynamic range of ourtristimulus pixels, we insure our ability to correctly displaythe rendering in any device’s color space, now and in thefuture.

High Dynamic Range ImagesReal scenes and physically-based renderings of real scenes donot generally fit within a conventional display’s gamutusing any reasonable exposure value (i.e., scale factor). Ifwe compress or remap the colors to fit an sRGB or similargamut, we lose the ability to later adjust the tone-scale orshow off the image on a device with a larger gamut or widerdynamic range. What we need is a truly device-independentimage representation, which doesn’t take up too much space,and delivers superior image quality whatever the destination.Fortunately, such formats exist.

Since its inception in 1985, the Radiance physically-based renderer has employed a 32-bit/pixel RGBE (Red-Green-Blue-Exponent) format to store its high dynamicrange output [17]. Predating Radiance, Bill Reeves ofPixar created a 33-bit log RGB format for the REYESrendering system, and this format has a public versioncontributed by Dan McCoy in 1996 to Sam Leffler’s freeTIFF library ( www.libtiff.org ). While working at SGI, theauthor added to the same TIFF library a LogLuv format thatcaptures 5 orders of magnitude and the full visible gamut in24 bits using a perceptual color encoding [18]. The 32-bitversion of this format holds up to 38 orders of magnitude,and often results in smaller files due to run-length encoding[19]. Both LogLuv formats combine a logarithmic encodingof luminance with a linear encoding of CIE (u’,v’)chromaticity to cover the full visible gamut as opposed tothe gamut of a specific device or medium.

Of the formats mentioned, only SGI’s LogLuv TIFFencoding covers the full gamut and dynamic range ofperceivable colors. The Radiance RGBE format spans alarge dynamic range but is restricted to positive RGB values,so there are visible chromaticities it cannot represent. Thereis an XYZE version of the same format, but the associatedquantization errors make it a poor choice. The Pixar 33-bitlog format also has a restricted RGB gamut and only covers3.8 orders of magnitude, which is marginal for humanperception. Since the TIFF library is well tested and free,there is really no reason not to use LogLuv, and manyrendering packages now output in this format. Evenshareware browsers such as ACDSee are able to read anddisplay LogLuv TIFF’s.

Gamut MappingIn order to fit a high dynamic range image into the limitedcolor space of a conventional display, we need to apply one

of the gamut compression techniques mentioned at thebeginning of this section.

Figure 3. Radiance rendering of control tower clamped tolimited display gamut and dynamic range.

Figure 4. The same rendering displayed using a visibility-preserving tone operator including glare effects.

Figure 5. A tone operator designed to optimize print contrast.

Page 174: HDRI and Image-Based Lighting

Specifically, we show how one might apply the thirdapproach to display an image:

C. Scale colors on a curve determined by imagecontent, as in a global histogram adjustment.

We assume that the rendering system has calculated thecorrect color at each pixel and stored the result in a highdynamic-range image format. Our task is then to examinethis image and choose an appropriate mapping to ourdisplay. This is a difficult process to automate, and there isno guarantee we will achieve a satisfactory result in allcases. The best we can do is codify a specific set of goalsand requirements and optimize our tone-mappingaccordingly.

One possible goal of physically-based rendering is toassess visibility in some hypothetical environment orsituation, or to recreate a situation that is no longer readilyavailable (e.g., a plane crash). In such cases, we want to saythat anything visible to an observer in the actual scene willbe visible on the tone-mapped display. Conversely, ifsomething is not visible on the display, we want to say thatit would not be visible to an observer in the actual scene.This kind of visibility-matching operator was described in[20], and we show the result in Fig. 4. Fig. 3 shows theimage mapped to an sRGB gamut using technique B todesaturate out-of-gamut colors. As we can see, some of thedetail in the planes outside the window was lost toclamping, where it is preserved in the visibility-matchinghistogram-adjustment procedure in Fig. 4. An optionalfeature of our tone operator is the ability to simulatedisability glare, which reduces visible contrast due to theharsh backlighting in the tower environment. This isvisible as a slight haze in front of the monitors in Fig. 4.

Fig. 5 demonstrates another type of tone operator.This is also a histogram adjustment method, but instead ofattempting to reproduce visibility, this operator seeks tooptimize contrast over the entire image while keeping colorswithin the printable gamut. Especially in digital photoprinters, saturated colors may be difficult to reproduce, so itmay be desirable to darken an image to avoid desaturatingsome regions. We see that this method produces goodcontrast over most of the image.

Fig. 6 shows the global mapping of these threeoperators from world (rendered) luminance to display value(fraction of maximum). Where the naive linear operatorclamps a lot of information off the top end, the twohistogram adjustment operators present this information at areduced contrast. This compression is necessary in order tobring out detail in the darker regions. We can see that theslopes match the linear operator near black in Fig. 7,deviating from the linear clamping operator above a certainlevel, where compression begins.

Fig. 8 plots the contrast optimizing tone operatoragainst the world luminance distribution. Peaks in theluminance histogram correspond to increases in contrast,visible in the tone-mapping as a slight increase in slope.Since this is a log-log luminance plot, a small change inslope corresponds to a large change in contrast. The dipbetween 1.5 and 2.0 corresponds to a more gradual slope in

the tone-mapping and lower contrast. In the low end, we seethat this operator tends to provide more contrast tocompensate for veiling reflection typical of glossy prints.

0.00

0.20

0.40

0.60

0.80

1.00

1.20

0 1000 2000 3000 4000 5000 6000 7000 8000

World Luminance

Dis

pla

y Y

vis-match

contrast

clamped

Figure 6. Comparison between three tone-mapping operators.

0.00

0.05

0.10

0.15

0.20

0.25

0 50 100 150 200 250 300 350 400 450

World Luminance

Dis

pla

y Y

vis-match

contrast

clamped

Figure 7. Close-up on darker region of tone-mappings.

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5

Log10 Word Luminance

Log DispY

Freq

Figure 8. Good global tone operators produce greater contrast atpeaks in the input histogram.

Page 175: HDRI and Image-Based Lighting

Conclusion

The recommendations we make in this paper for accuratecolor rendering may be summarized as follows:

1. Use a global illumination method with appropriatesolutions for all of the phenomena being simulated.

2. Follow accurate spectral calculations with a goodchromatic adaptation model to avoid color casts inthe displayed image.

3. Substitute full spectral rendering with a relativecolor approximation for scenes with a singledominant illuminant.

4. Record images in a high dynamic range format topreserve display options (i.e., SGI LogLuv TIFF).

5. Base tone-mapping and gamut-mapping operatorson specific goals, such as matching visibility oroptimizing color or contrast.

Floating-point spectral calculations and high dynamic-rangeimage manipulation are critical to accurate color rendering.The original approach of rendering directly in 24-bit RGBwas recognized as hopeless and abandoned decades ago, butmuch of the mentality behind it remains with us today.

The methods outlined in this paper are not particularlyexpensive, neither in terms of implementation effort norrendering cost. It’s simply a matter of applying the rightapproximation. The author is not aware of any commercialsoftware package that follows more than one or two of theseprinciples, and it seems like a question of priorities.

Most of the money in rendering is spent by theentertainment industry, either in movies or in games. Littleemphasis has been placed on accurate color rendering, butwith the recent increase in mixed-reality rendering, this isbeginning to change. Mixed-reality special effects andgames require rendered imagery to blend seamlessly withfilm or live footage. Since reality follows physics and colorscience, rendering software will have to do likewise. Thoseof us whose livelihood depends on predictive rendering andaccurate color stand to benefit from this shift.

References

1. Michael Stokes, Matthew Anderson, SrinivasanChandrasekar, Ricardo Motta, A Standard Default ColorSpace for the Internet, www.w3.org/Graphics/Color/sRGB

2. Greg Ward, The RADIANCE Lighting Simulation andRendering System, Computer Graphics (Proceedings ofSIGGRAPH 94), ACM, 1994.

3. Paul Debevec, Jitendra Malik, Recovering High DynamicRange Radiance Maps from Photographs, ComputerGraphics (Proceedings of SIGGRAPH 97), ACM, 1997.

4. Alexander Wilkie, Robert Tobler, Werner Purgathofer,Combined Rendering of Polarization and FluorescenceEffects, Proceedings of 12 th Eurographics Workshop onRendering, June 2001.

5. Henrik Wann Jensen, Stephen Marschner, Marc Levoy, PatHanrahan, A Practical Model for Subsurface Light

Transport, Computer Graphics (Proceedings of SIGGRAPH01), ACM, 2001.

6. Xiaodong He, Ken Torrance, François Sillion, DonGreenberg, A Comprehensive Physical Model for LightReflection, Computer Graphics (Proceedings of SIGGRAPH91), ACM, 1991.

7. Jay Gondek, Gary Meyer, Jon Newman, WavelengthDependent Reflectance Functions, Computer Graphics(Proceedings of SIGGRAPH 94), ACM, 1994.

8. Holly Rushmeier, Ken Torrance, The Zonal Method forCalculating Light Intensities in the Presence of aParticipating Medium, Computer Graphics (Proceedings ofSIGGRAPH 87), ACM, 1987.

9. Henrik Wann Jensen, Efficient Simulation of LightTransport in Scenes with Participating Media using PhotonMaps, Computer Graphics (Proceedings of SIGGRAPH 98),ACM, 1998.

10. Jim Kajiya, The Rendering Equation, Computer Graphics(Proceedings of SIGGRAPH 86), ACM, 1986.

11. Greg Ward Larson, Rob Shakespeare, Rendering withRadiance, Morgan Kaufmann Publishers, 1997.

12. Henrik Wann Jensen, Realistic Image Synthesis UsingPhoton Mapping, A.K. Peters Ltd., 2001.

13. Francois Sillion, Claude Puech, Radiosity and GlobalIllumination, Morgan Kaufmann Publishers, 1994.

14. C. Li, M.R. Luo, B. Rigg, Simplification of theCMCCAT97, Proc. IS&T/SID 8 th Color ImagingConference, November 2000.

15. Sabine Süsstrunk, Jack Holm, Graham Finlayson,Chromatic Adaptation Performance of Different RGBSensors, IS&T/SPIE Electronic Imaging, SPIE Vol. 4300,January 2001.

16. Günter Wyszecki, W.S. Stiles, Color Science, J. Wiley,1982.

17. Greg Ward, Real Pixels, Graphics Gems II, edited by JamesArvo, Academic Press, 1992.

18. Greg Ward Larson, Overcoming Gamut and Dynamic RangeLimitations in Digital Images, IS&T/SID 6th Color ImagingConference, November 1998.

19. Greg Ward Larson, The LogLuv Encoding for Full Gamut,High Dynamic Range Images, Journal of Graphics Tools,3(1):15-31 1998.

20. Greg Ward Larson, Holly Rushmeier, Christine Piatko, AVisibility Matching Tone Reproduction Operator for HighDynamic Range Scenes, IEEE Transactions onVisualization and Computer Graphics, Vol. 3, No. 4,December 1997.

Biography

Greg Ward (a.k.a. Greg Ward Larson) graduated in Physicsfrom UC Berkeley in 1983 and earned a Master’s inComputer Science from SF State University in 1985. Since1985, he has worked in the field of light measurement,simulation, and rendering variously at the Berkeley NationalLab, EPFL Switzerland, Silicon Graphics Inc., Shutterfly,and Exponent. He is author of the widely used Radiancepackage for lighting simulation and rendering.