AECBytes Architecture Engineering Construction Newsletters  

AECbytes Tips and Tricks Issue #24 (November 20, 2007)

High Dynamic Range Imagery in Photoshop and 3ds Max

Scott Onstott
Book & Video Author

High dynamic range imagery (HDR imagery or HDRI) is a hot topic in the film special-effects industry. Increasingly used in AEC visualization, HDRI can boost the realism of your 3D renderings. HDR images actually store more information than can be displayed on screen at a given time. By storing light intensity in addition to color, HDRI can be used to realistically illuminate a 3D scene through a technique called Image Based Lighting (IBL). In this technique, the illumination in the 3D scene essentially comes from information captured from the real world, rather than being lit entirely by virtual light sources.

In this article I will show you how to create and process an HDR image in Photoshop CS3 Extended, and then use the result to render a scene with IBL in 3ds Max 9. (Tip: If you don’t have Photoshop CS3 Extended, try HDRShop.)

Creating and Processing an HDR image in Photoshop

As discussed in my previous Tips and Tricks article, the first step in capturing an expanded dynamic range is to bracket, or take multiple exposures of the same scene by adjusting the shutter speed in each shot. After you’ve downloaded these bracketed photos to your computer, launch Photoshop CS3 Extended and choose File > Automate > Merge to HDR. You’ll be prompted to select either a folder of images or to select the individual photos that you want to merge into one super HDR data set. If you hand-held the shots, check Attempt to Automatically Align Source Images. Otherwise, leave this setting unchecked if you bracketed using a tripod and click OK.

mege to hdr

Here, I’ve selected four bracketed images of a living room and they are now visible in the Merge to HDR dialog box. You can see their exposure values (EV) in the vertical pane on the left. The histogram of the overall composite is shown on the right. Adjust the slider under the histogram to set the white point by dragging it to the right edge of the histogram. Set the bit depth to 32 bits/Channel if it’s not already selected. When you click OK to close this dialog box, Photoshop will take some time to merge the bracketed images (in this case there are four) into a single HDR image.

animated hdr

Notice that there's a slider at the bottom of the HDR image document window. Drag the slider to move through the image’s dynamic range—all the way from black to white and everywhere in between. The animated GIF above shows frames from this range in jumps, but the change is continuous in Photoshop because the entire dynamic range gets interpolated between the four bracketed inputs.

Believe it or not, this image is too sharp to use as IBL in 3ds Max. You’ll get a smoother, more realistic rendering if you blur the light map. Choose Filter > Blur > Gaussian Blur and use a fairly large blur of say 15 pixels. Click OK and then drag the exposure slider and observe that the entire HDR data set is now blurred. Save in Radiance format as LivingRoom.hdr and exit Photoshop.

blur

Rendering High-Dynamic-Range Image-Based-Lighting in 3ds Max

Launch 3ds Max (I’m using version 9 but this technique will work in the last few versions). Create a 3D scene with geometry and texture maps, or open a project you’ve been working on. Choose Create > Lights > Standard > Skylight. It doesn’t matter where in the scene you place the skylight—it will radiate light evenly in a hemispherical dome. However, it’s necessary to hide the ceiling and/or roof objects in interior spaces that are to be illuminated with skylight.

With the skylight selected, switch to the Modify panel and click the None button in the Sky Color group. Choose Bitmap in the Material/Map Browser.

skylight

Select the HDR file you generated (LivingRoom.hdr) and the special HDRI Load Settings dialog box will appear. Set the white point by dragging the Linear spinner up or down so that the vertical red line aligns with the right edge of the histogram and click OK.

hdri load

Press M to open the Material Editor. Drag the bitmap from the Modify panel into a slot in the Material Editor. Choose Instance rather than Copy when prompted, so that there is a connection between the map in the editor and the sky color bitmap.

Scroll down in the Material Editor and open the bitmap's Output rollout. Boost the RGB Level parameter to move through the dynamic range of the HDR image. Choosing the correct value for RGB Level depends on how brightly you wish to illuminate the scene and the character of your HDR image. Here I chose a value of 100 to target a bright portion of the living room’s dynamic range. The bitmap sample slot thumbnail gives a good visual indication as to where you are in the dynamic range. Standard 8 bit/channel bitmaps burn out at an RGB Level setting of around 5, so it is amazing that one can choose a value of 100 and not have a pure white image.

reg level

In addition to using an HDR image for IBL, you can use one for reflection maps as well. Sample the material of any highly reflective object in the scene into the Material Editor—here I chose the glass teapot—and open up its Maps rollout. Instance the HDR map into the Reflection map slot of the teapot’s material. Note that the teapot material also has a Raytrace map in its refraction slot to better simulate the bending of light through glass.

hdr ref map

Render the scene and you’ll be amazed how much more punch the HDR version has compared to a traditional scanline rendering. The HDR IBL is responsible for the highlights on the sofa and the rendering’s overall warmth, while the HDR reflection map produces a sparkle of brilliance on the teapot and coffee table not present in the “normal” rendering. The animated image below shows both the regular and the IBL-based renderings.

before and after


About the Author

Scott Onstott is a book and video author of AEC software tutorials. He has a degree in architecture from UC Berkeley and has served as an instructor there, in addition to working in several prominent engineering, architecture, and interiors firms in San Francisco. He has also worked as a technical editor and technology consultant.

Scott has contributed to over two dozen books and videos on AutoCAD, Architectural Desktop, VIZ Render, Revit, 3ds Max, VIZ, Photoshop, Illustrator, Painter, Fireworks, and Dreamweaver. He most recently co-authored AutoCAD:_Professional_Tips_and_Tricks with Lynn Allen. He can be reached via: www.ScottOnstott.com.


If you found this article useful and have not yet subscribed to AECbytes, please consider doing so. Subscription is free, and more subscribers will allow this publication to provide more of such content to you.

Tips & Tricks > High Dynamic Range Imagery in Photoshop & 3ds Max > Printer-friendly format

 
© 2003-2009 Lachmi Khemlani, AECbytes. All rights reserved.
Site design by Vitalect, Inc