Graphics Reference
In-Depth Information
Small
CoC
Big
CoC
Image appear sharp
Image appear blurry
Sensor plane
Sensor plane
Figure 3.3. Variation of the CoC for a combination of subject distances.
sharp to unsharp abruptly. It gradually goes out of focus as it gets farther from
the focal point. Since it is a gradient, we quantify the blur amount with the size
of the circle of confusion (CoC). The bigger the CoC value for a particular pixel,
the more blur you apply to it. Conversely, the smaller the CoC value, the sharper
the pixel should appear. (See Figure 3.3.)
The CoC value will vary in the range [0 , 1] and will indicate how much in or out
of focus the pixel is. The blur amount, generally in pixel size, will be multiplied
by the CoC of the pixel to find the blur amount for a particular pixel in the
framebuffer. The maximum blur value will be game driven and is something that
artists can tweak to achieve the desired DOF effect.
So what does bokeh have to do with all this? Well, bokeh is intimately
connected to the lens aperture, or more precisely, the aperture shape. On a
real camera the quantity of light passing through the lens is controlled by the
aperture. A set of blades mounted into the lens controls the light entering the
camera, as shown in Figure 3.4.
We can now see how the lens design affects the shape of out-of-focus highlights.
(See Figure 3.5.) Typically, you will have a nice circular bokeh shape with a fully
opened aperture. Some lens manufacturers have iris blades with curved edges to
make the aperture more closely approximate a circle rather than a polygon.
Figure 3.4. Aperture shape depending on the f-stop. We can see now where the bokeh
shape is coming from!
Search WWH ::




Custom Search