Hi-Res Demo

1. Create a still image or animation
For this demo the following still image was used:

2. Keyframe Near, Far and Focus Distances and render the scene with zDepthDOF
The result could be a movie like this:
<a href="http://homepage.mac.com/bauer/portfolio_shaders/zDepthDOF/gfx/demo_zDepth_hi.mpg">demo_zDepth_hi.mpg</A>
In this example the focus is first moved from near to far, and back;
then just the far distance is moved further back, followed by just the near distance.
Both are then moved forward to focus on the center sphere.
The focus area is then expanded from the center to engulf all objects, and back;
followed by a softening of the focus area's fall-off, and finally a crisp fall-off.

3. The resulting Depth of Field animation
The depth of field blur is deliberately exagerated to better demonstrate the effect.
<a href="http://homepage.mac.com/bauer/portfolio_shaders/zDepthDOF/gfx/demo_movie_hi.mpg">demo_movie_hi.mpg</A>
This example also uses the zDepth image to reduce the contrast and saturation of out-of-focus areas (both exagerated for demonstration purposes).
Compositing has been done in Shake.
[Any visible banding when the Depth of Field focus shifts is due to the MPEG compression and the exaggerated contrast shift.]