In this tutorial, I won't go into the technical and physical backgrounds of High Dynamic Range Image. Instead, I'll present you with a basic instruction about the photography of the images needed to produce HDRI's, the way to go about in Photoshop (which in CS2 has a feature incorporated that will produce a so-called Radiance document with little effort) and how to use the HDRI in 3D (I use Cinema4D but other software will differ only slightly)
Just a little background though: Did you notice that on a sunny day, your camera tells you that you need 1/30 seconds of exposure with a 2.8 lens opening
indoors and when you step outside it just needs 1/1000 seconds at f11.
In fact the difference between complete darkness and complete “lightness” is pretty endless. A camera or your eyes can only see a portion of it without adjusting, and once they have, they can't see as well anymore what they saw before the adjustment. When you step back inside the house it takes a second to get used to the darkness. And when you take a picture with your camera still at 1/1000 at f11, the print is black.
In an HDRI, multiple situations are all combined in one image: indoor and outdoor at the same time so to say. You need a slider to make it visible to the eye,
but when you do, it is all there: the sphere of the sun and the inside of a drawer.
In 3D-software maths, this wide boundary or high dynamic range can be inverted to do something special: it can act as an actual light source.
Ansel Adams (Click to enlarge)
HDRI photography: what do you need?
If you have all of the items above, you're a rich man: Adobe Photoshop CS2 to convert different camera exposures into a Radiance image, a tripod and a camera that can shoot RAW-images. In this tutorial we'll use them all. But:
If you can't shoot RAW, that's OK. If you don't have Photoshop CS2, visit http://graphicslab.ict.usc.edu/HDRShop/ to get a free copy of HDRshop v1, which does a good job. It's only available to the Wintel platform though. They have a lot of fantastic information about the technical side of HDRI, too.
And if you don't have a tripod, you can ask your sister too stand really still for a while. No, I tripod is handy.
The item on the top isn't mandatory either. If you don't have a professional probe, you can use a christmas ball. But again here, you can work without a perfectly reflecting sphere.
(You would use it to get 180 degrees of surrounding environment to encapsulate your 3D scene. In the following example I used simple rectangular images and for me that works just fine. If your scene contains smooth, dome-shaped objects, then you start needing a probe of some sort as the seams of a rectangular image would be visible.)
Click to enlarge
Open a RAW-image into Photoshop and Photoshop will open its RAW-image dialogue.
This photo of my studio door is pretty much balanced. You can more or less see what is inside and you sort of see what is outside. There is no pixel information in the highlights though. I check that by activating the Highlight-tickbox:
When I do that, Photoshop gives me this feedback:
Pixels that are pure white are displayed as red. As you can see there's no information in the sky behind the door, nor is there between the blinds. If I want to see that information, I need to bring the exposure down. But when I do that, dark parts in the foto start to become pure black. I can check that by activating the Shadows-tickbox:
(It is difficult to see -overexposure happens much easier than underexposure- but it's the blue areas.)
You can see, the top image is overexposed but you can see details in the door and the foreground.
The photo below is underexposed but there is information in the sky. Well, on the particular day I made these shots we had an almost pure grey sky, so still not much to see but the rain drops on the glass become visible:
Each of the photographs cover another part of the light situation and the range per photo is quite small. Going from the deepest shadows up to the brightest highlights, in this weather, I need to make about 6 to 7 photographs that I import into Photoshop CS2:
In the dialogue that appears you can either choose multiple images or a folder containing a set of images or images that are already open in Photoshop.
If you didn't take the photos from a tripod and they have slightly different angles you can use this feature. Beware though, it can't make up for big differences and it's time consuming.
After I browse to my folder with different exposures of my studio door, Photoshop starts to batch process all of them and finally comes up with this:
Click to enlarge
All images that have a green mark:
next to them will be incorporated in the final HDRI when I click OK. By default, they all have one. When I uncheck one, the preview is updated.
With the Set White Point slider I can view through the whole exposure gamma.
I want 32 Bit/Channel because I need as much as information as I can into my 3D setup. When I click OK, Photoshop merges all the images into an HDRI that I Save As Radiance. Note that there's nothing really special to see about the HDRI at a glance. That is because your monitor simply can't show all the information it contains. But when you go to Image> Adjustments> Exposure and slide through Exposure, it is like day breaks and night falls..! (Like I said before, I made my HDRI from RAW-im-ages but you could also build it from TIFF's.)
I am going to light my astronaut character with the exact lighting conditions from my studio door.
HDRI in 3D software
Now that we have a Radiance image, we need to set up a simple setup in 3D and make it act as a light source. As I mentioned before, I will use Cinema4D (version 9) to do that. My object is an astronaut. It goed without saying that you can use anything to light with the HDRI output.
Make a new material and load the HDRI in the Luminance channel. Set Mix Mode to Multiply. My HDRI is very bright and if I don't bring down its Mix Strenght it will wash out the scene.
Put a Sphere in the scene and set its radius to a large value so it will encapsulate everything else. Apply the HDRI to it plus a Compositing Tag.
In the Attributes of the tag, turn off everything but Seen by Rays and Seen bij GI:
Throw a Camera in with a Target and a Plane or a Floor object to be able to see the actual forming of shadows. And of course put in your model of choise. The whole thing looks as follows:
Next, in Render Settings, activate Radiosity and in Options deactivate Auto Light:
I found the above settings after some trial and error. Parameters for the amount of light you should adjust are Mix Strenght in the Luminance channel of the HDRI or the Radiosity Strenght. It's best to adjust just one or you'll get confused.
Fighting artefacts in your render is done with Stochastic Samples and Min and Max Resolution.
At this stage of the process you need some patience. HDRI-lighting and can give some unexpected results at first and rendering can be slow.
In the reflection of the helmet of my astronaut you can clearly see the door and window of the studio. Notice that the brightest highlight, the one from the door, casts a complemetary shadow.
Click to enlarge
This tutorial cannot cover everything there is to know about HDRI-imaging. There is more to find about the subject on the internet every day. Just Google HDRI and you're presented with a plethora of results. Some of them go into the physics, some of them into rendering, there are manufacturers who sell ready-made HDRIimages and there are many questions answered on the subject in forums. I hope I revealed the basics of making your own and use them yourself. Happy Rendering!