For HDR, the recommendation is to set your camera to a fixed ISO and f-stop. Therefore whatever you set your f-stop for and wherever your focal point is, is what determines the sharpness from front to back. The only thing that should change is the shutter speed for best results (I made mistakes when I started on this technique by keeping the ISO in auto mode - it doesn't work well when you do this). If you want the picture to be in focus from near to far, then set the f-stop to some small number (f/22 for example) and focus about 1/3 of the way into the scene.
For true HDR (sadly many if not most shots labeled as HDR on the net are not really HDR ) you should take at least three bracket shots with min. 2.0 EV offset each. That also means that the scene you want to capture should have enough contrast difference to justify the large EV offset / use of HDR.
As hcmcdole mentioned above it is important to maintain the same DOF (Depth of Field) between your bracketing shots by using the same aperture and varying the shutter speed only. Variation in ISO the change exposure is also possible if your camera doesn't introduce noise at higher ISO which would be detrimental to the HDR end result. Generally compact cameras don't do well in the ISO noise realm so exposure variation via ISO are to be avoided there.
White Balance between the shots should also be the same so it's better to use manual WB instead of Auto WB.
HDR software does try to align the different exposures but it may not always do a good job with it therefore I also recommend the use of a tripod.
Ted, I'm not sure from your original question if you are asking about bracketing for focus as well as HDR in the same series of shots or if they are two separate questions. If you did mean in the same series, then you have the answer as all have pointed out, you have to keep the focus the same for the HDR shots.
However, if you are asking if you can expand the depth of field by taking multiple shots, then the answer to that one is, yes, you can. But, this is totally different from HDR.This technique is called focus stacking and is usually used for macro shots. You just put your cam on a tripod and take several shots while manually changing the focus from front to back or back to front. Then you stack the shots in software that is designed to blend them such as Helicon Focus or you can also use other programs. There are some freebies out there that will do this, just not as good as Helicon. Photoshop does a fairly good job of blending focus stacked images. You can google it to find out how.
Back to HDR...
I agree that it is best to use a tripod when you shoot the HDR shots (as it is for focus stacking shots), but I have found that the latest version of Photomatix does an incredibly good job of aligning the exposures when I get stuck without a tripod and have to shoot handheld. Of course, there has to be enough light for me to handhold without camera shake, but I don't have to worry about not getting exactly the same field of view on the photos. What I do is set my camera up to shoot 7 shots (or in the case of my old 50D, only three shots allowed) in exposure bracketing and then I set it to multiple exposures. I brace myself as best I can and just hold the shutter down and let the camera rapid fire the 7 (or 3 with 50D) shots. It works! So, don't give up on being able to do HDR if you don't have your tripod. At least give it a try.
Handheld HDR is very possible with auto bracketing but I agree with the tripod if you have one on hand. Also ghosting can happen (where the wind can move the leaves of a plant or if you just happened to take some bracketed shots of animals or people then they must stay absolutely still. Photomatrix and FDRTools both do good jobs.
You can also go to manual mode when bracketing and exposure compensation aren't enough (just set the aperture and ISO and then adjust your shutter speed between each shot - definitely use a tripod in this case and a cable release). The book I bought on HDR shows one photo from the author where he used manual mode and took 32 shots of the same scene - very impressive image when he was finished. Seven shots in this particular scene was not enough!
Shame we cannot post TIF pictures on DG because the HDR effects can be stunning (even if they are only tone mapped).
Focus from near to far can be done fairly well by setting a small aperture and focusing about one third of the way into the scene. If the scene has lots of contrast though you want to do HDR or wait for a cloudy day.
Holy mackerel! 32 shots! I can't imagine ever needing that many shots. If I have a tripod, I usually do just as you described and use manual mode and dial the shutter speed up and down. I hardly ever need more than 7. I guess if you're trying to photograph a bright light in a coal mine, you might need 32. LOL. Seriously, can you think of a situation where 32 would be needed? Does the author describe a scenario?
I've had pretty good luck with moving objects too, but sometimes it just doesn't work for me. Have you tried Nik's HDR program? I've heard it is very good too, but I haven't tried it. I'll have to check out FDRTools. I haven't used it either.
Interesting discussion! I love HDR, but I really have to work at getting the images processed to a realistic looking photo. I still tend to get a bit otherworldly.
I don't think he used all 32 images. The scene was a tunnel with graffiti on the brickwork and at the end of the tunnel were trees in bright light. He showed what happened with just a few bracketed shots and it was so noisy that he knew he could do better and went back to do a lot more shots. I think he did it in 1/3 stops from like -7 to +7 and then let the program decide what to do with the images.
I heard that the new Photoshop does a decent job at HDR as well.
The problem with some of these tools is there is a lot of guesswork on what settings to use before the final image is tone-mapped. The author made this clear that with experience, the end user could almost guess what settings to use to get the look they are after. Some of the stuff I did was amazing and others too plastic looking to use.
I did see ghosting in some of my pictures as the author pointed out can happen (especially with plants that can easily move in a slight breeze). Also water scenes will have ghosting but that can be a pleasant effect.
Ah, I can see that the tunnel scene would be a difficult one.
I do have Photoshop CS5 and it is a lot better than CS4 was, but I still don't like it nearly as well as Photomatix. I always try PS first and then if I don't get something acceptable, I go to Photomatix. I have had the same experience with some series just not working out no matter what I did. I know I don't have enough experience yet to predict the settings. But that's okay - just gives me an excuse to go shoot more HDRs.
I did check out the FDR software. It is interesting that one of their claims is to be able to remove one or more of the photos and the tonemapped image will update automatically. The latest version of Photomatix does that too. I wonder if they copied FDR...