This is a first attempt using fully automatic Gradient Domain High Dynamic Range Compression to compress the bightness range of the HDRI to the range of a computer monitor.
The top diagram shows 10 spherical panoramas. Each panorama was taken one f-stop of exposure apart in order to capture the full range of light in this scene. This is the source material to create a High Dynamic Range Image (HDRI). This image goes beyond the usual requirements of HDRI for relighting synthetic 3D objects. I wanted to have an image that was of higher resolution and image quality for automatic high dynamic range compression and the creation of HDR textures by using these images for image based modeling.
The exploded views demonstrate the resolution detail available in the image. They also demonstrate why the extreme exposures were necessary. In the case of the shadow detail I wanted to make sure that I got all the texture information off the surface of the objects in the shadows. I also wanted an exposure that would capture an outline and color information about the light source as seen in the highlight detail.
If you are unfamiliar with HDRI there is a good description the HDR Shop webpage.
|1.7MB QuickTime slideshow demonstrating reflective and matte objects lit w/ HDRI at different exposures|
Equipment: digital camera, tripod, panoramic photography pan and tilt head, shutter release cable, Stitching application, HDR Shop.
The first step was to take the pictures via the usual process for panoramic photography. It is important that your camera pan and tilt around the camera's focal node to get a good stitched panorama. This is usually done with a panoramic pan/tilt head. Make sure your exposure and white balance are set to manual. It is likely that you will have to correct the lens distortion in on your camera's lens before stitching, I recommend Panorama Tools for accuracy but if you can get by with Lens Doc it is much easier.
Each time I panned or tilted the camera I took a series of 10 bracketed photos instead of one shot. Each shot was in one f-stop increments and I only adjusted the shutter speed to get my exposure change. Changing the aperture would result in images with different depths of field; the change in focus would cause the pixels not to be aligned perfectly. Many digital cameras also have an EV (exposure value) adjustment; this essentially adjusts the CCD gain and will add differing amounts of noise to each image, ideally this should be avoided.
Once I downloaded my images to my computer I parsed the images out to different
folders by exposure using the
EXIF data if
I got confused about which exposure the images was taken at. I then batch renamed
all the files in each folder so that each folder contained images with names
that corresponded to the other pictures taken at the same pan and tilt in each
folder (i.e. each folder contained "image01.jpg", "image02.jpg"
Once I had my images parsed and renamed, I took the exposure that had the best overall exposure and was most likely to stitch correctly.
Any multi-row panoramic stitcher that can use the same control points (points of correspondence between images) across multiple projects will work; I listed a few at the bottom of the page. For this reason automatic stitchers will not work for this process. If you use Realviz's Stitcher as I did, do not use the template feature as this will try to find new control points in each panorama and the panoramas will not register perfectly when you want to make your HDRI. I created a project with one panorama and then because the file format uses relative path names to the images I was able to just copy this project file into each of the folders. When I opened the Stitcher project file it would open fully stitched with the files in that folder, all I had to do then is open each file and render out a panorama for each exposure. Do not edit the images at this point; editing will be much easier to do once the HDRI is created.
Below is a screenshot from Realviz's Stitcher.
Once the perfectly registered panoramas taken at different exposures were acquired I performed the rest of the work in HDR Shop. There are more detailed tutorials on the HDR Shop website.
The first step is to acquire a "camera curve" that describes the CCD's response to color and brightness. This does not need to be created from the files that you are planning on creating your HDRI from. The scene you photograph to create your curve should have a high dynamic range of light, preferably the entire range of your camera, and the stops of your bracket should be taken in small increments. Unfortunately my Nikon 5000 only has single stop increments you can control with the shutter speed so this is what I used. Each white balance setting will produce a different curve, so unless you want to do this every time you shoot an HDRI you should use one of your cameras preset white balance settings.
Selecting "create camera curve" from the create menu brings up the
calibration window where you can select the images and input the exposure increments
that you used. Clicking "Go" will cause HDR Shop to start an iterative
process that will produce the curve; you can stop it at any time. I found that
mine did not change much after 4-5 minutes on a 1.7GHz PC. This was the resulting
The spikes on the right hand side are an inaccurate representation of the camera's response. HDR Shop has a little blue slider on either side that can be used to only calibrate in the region that there is accurate information. Pulling the little blue slider on the lower right hand column fixed these spikes.
It is also desirable to have a smooth curve, because we were not able take small enough increments in our bracket the curve is jagged. The regularize slider will smooth out the curve.
|On the left is the curve generated from the Cloudy white balance setting. The curve on the right is a little different generated from the same scene on the sunlight setting.|
From the create menu choose "Assemble HDR from Image Sequence" load your images and specify the exposure increments, select the camera curve "change" button and select the camera curve you created, click on "Generate Image" and save your HDRI.
Use the + and - keys to tab through the exposures. Now you can edit the image. Choose an exposure where the pixels are neither all black or all white and choose "Edit in Image Editor" from the file menu, this open the image in your image editor when you are done, save and hit the "OK" button in HDR Shop to have it save the changes to all the layers of the HDRI.
Now you can also set the white balance of your HDRI. Select an exposure where something that should be white is properly exposed. Make a selection of the white, from the "Image" menu pull down to "Pixels" and select "White balance selection". If you skip this step you may find that anything you render lit from the HDRI will have a strong color cast.
I found the process of taking the pictures a bit too labor intensive. If I did not have a specific need for very high resolution and high image quality I would have just shot with a fisheye lens or light probe. I found that in the time it took me to take the pictures (about 50 minutes for 320 photos) the light changed significantly, the resulting HDRI is still smooth and looks very good but it is not a "snapshot" in time of the lighting conditions. Of course the whole process could be streamlined significantly by trading off some of the resolution for fewer pictures with a wide angle lens (not every application requires an 18,000 pixel wide pano) and I could have shot brackets that were further apart reducing the overall number of images. I expect I could reduce the time requirement down to less than a 15 minutes and still have a pretty good result. My camera, like many new digital cameras has a built in bracketing feature, unfortunately it was useless because it only adjusted the EV value that only adjusts the gain increasing pixel noise. Now that I have all the steps of the exposures for this scene I plan on experimenting to see how many I really nee