By George de Beaumont.
I've spent a fair amount of time investigating Imagine's Depth of Field feature and thought I'd share my findings. The following text is long winded, excessively formal and has not been reviewed for errors. Still, You may find something of use. If not, don't hesitate to delete...
According to the addendum text file accompanying Imagine 3.0, the Depth of Field (DOF) feature was added late in development and is therefore not covered in the manual. While the supplemental DOF text file is brimming with potentially useful information, it has not been prepared with the average end user in mind. Compounding this problem is a less than intuitive DOF interface (DOF and 3D stereo imaging share the same parameters and requester box). The result is an exceptionally high learning curve. The goal of this text is to strip away the noise associated with the mixed function interface and provide a practical explanation of the Depth of Field feature.
Imagine 3.0 simulates many of the real world relationships associated with photography/videography. These include:
It is the point of perfect focus. Objects nearer or farther tend to be blurred, although an acceptable field of focus extends for some distance on the near and far sides of this plane.
The Depth of Field is the range of distances from the camera over which focus is considered adequately sharp.
FOV is the width of the camera viewing area (usually expressed in degrees). FOV depends on the lens focal length.
This is the distance behind the lens (usually expressed in millimeters) where the image will be in sharp focus. The focal length also provides an indication of the FOV the user can expect from a camera system. The terms FOV and focal length are used interchangeably in this text. Common focal lengths and their associated FOV are given below.
focal fov lens length (degrees) type (mm) 17 180 fisheye 20 94 wide angle 28 75 wide angle 50 46 standard 55 43 standard 100 24 intermediate telephoto 135 18 intermediate telephoto 200 12 long telephoto 500 5 long telephoto
The aperture of a lens is the opening through which light is admitted. In photography/videography is desirable to be able to adjust the amount of light passing through the lens. This is accomplished via a variable diaphragm. A wide aperture lets in more light but at the expense of a greatly reduced DOF.
It is the interaction of the focal length, aperture size and focal point which determine the DOF for a specific situation. In general:
Imagine's DOF, FOV (or focal length) and aperture controls are intimately associated with the camera's X and Y sizes.
We have all adjusted the camera view interactively via the angle (A), zoom (Z) and perspective (P) controls associated with the perspective view in the Stage editor. What follows is a description of how Imagine numerically handles some of this information.
The camera's FOV depends on the RATIO of the camera X and Y sizes. These values can be examined via the Transformation requester (Stage editor) or Camera size timeline (Action editor). The important thing to remember, is that a particular X or Y size does not determine FOV, but the ratio of X/Y (X divided by Y) does. There are MANY X and Y values that will yield the SAME X/Y ratio (and therefore the same FOV). See the following examples:
X Y X/Y FOV (degrees) 100 320 .31 18 200 640 .31 18 100 200 .5 55 320 640 .5 55
As the X/Y ratio changes, so does the FOV. If You decrease X or increase Y (make the ratio smaller) You will zoom in (narrow the FOV). If You increase X or decrease Y (make ratio larger) You will zoom out (widen the FOV). When modeling real life situations, the following may be used as a guide for setting Imagine's FOV numerically.
focal fov X/Y example length (degrees) ratio X/Y (mm) 20 94 2.19 1400/640 28 75 0.68 435/640 55 43 0.50 320/640 100 24 0.43 277/640 135 18 0.31 200/640 200 12 0.22 143/640 500 5 0.04 28/640
An examination of the FOV and X/Y ratio values show that they do not change proportionally (i.e. doubling the ratio does not double the FOV). The relationship is logarithmic. That is, making a wide FOV wider requires a much greater change in the X/Y ratio.
Be aware that wide FOVs produce considerable distortion, especially at the edges (certain portions of the image will appear disproportionately large).
Imagine's focal point is associated with the camera Y axis (the camera view points in the direction of the Y axis). Until the DOF feature is activated (in the Action editor), all objects will be in perfect focus (infinite DOF) and a specific camera Y size is not important. When the DOF function is activated the camera Y size will have a dual role (we already know that the camera size X/Y ratio affects FOV). When DOF is activated, the camera Y size will also specify the distance from the camera which is the point of perfect focus (FOCAL POINT).
In a real camera, it is the interaction of the lens focal length, aperture size and the point of focus that determines the DOF. In Imagine, the DOF can be configured in several ways. It can be set to a specific numerical value independent of the aperture size or FOV (or focal length). If desired, the DOF can be tied to an apparent aperture size and FOV to allow the simulation of camera optics.
Imagine 3.0 has only a limited notion of aperture size. Imagine uses an apparent aperture size to influence the DOF. This aperture size does not in any way affect the amount of light reaching Imagine's virtual camera. Lighting changes must be done by altering the intensity of ambient lighting or the individual light sources.
To activate the depth of field function, You must go to the Action editor and add an Actor bar to the camera timeline. This will open up a the 3D Stereo/Depth of Field Requester box. The following check/data entry boxes deal with the 3D Stereo image features and can be IGNORED when adding simple depth of field to Your project:
Check the "Y size is DOF focus distance" box to activate the DOF feature.
Next, check one of the two following boxes:
Which one You check will depend on whether or not You need to animate the DOF effect. For example, You may want to animate the DOF effect to simulate the optics of a real video camera. If You were to focus a video camera on an object (at some intermediate distance) and then zoom in (close-up), You would observe that the background would progressively become out of focus.
Imagine will interpret the value that You enter into the "Aperture Size (DOF)" box differently, depending on whether You chose the static or dynamic version of the DOF feature.
This DOF option is static in the sense that changes in the FOV (X/Y ratio) do not alter the DOF. The value You enter in the "Aperture Size (DOF) box" will be multiplied by the pixel width of the image (set in the Project editor). The product of which will be the maximum defocusing that will occur for objects in the distant background (in pixels). Larger values result in a narrower DOF and greater defocusing of distant objects. In lieu of using the following equation, entering a small number (0.01) will usually provide an acceptable starting value.
When You choose this option, DOF becomes linked to the camera X size value (see the equation below). This DOF option is dynamic in the sense that as You change the FOV (X/Y ratio), the DOF also changes. The dynamic DOF option can be animated to simulate camera optics. Like the static DOF option, larger values result in a decreased DOF and increased defocusing of the distant background. In lieu of using the following equation, entering values in the range of 2 - 4 generally provide an acceptable starting point.
As previously mentioned, once the DOF function is activated, the camera Y size determines the focal point. The trick is to vary the Y size (change point of focus) while keeping the desired focal length (FOV). This is accomplished by first activating the camera line function (Stage editor/Display menu). Next scale the camera, using the Y bounding line (Top view) as the guide for determining the point of focus. As long as the X and Y axis are scaled proportionally, the focal length (FOV) will remain the same.
This text provides the basics for implementing the Imagine 3.0 Depth of Field feature. Use of 3D stereo imagining (LCD shutter glasses) with Depth of Field has not be covered. These instructions should provide a sufficient basis for understanding the Impulse supplemental text.
While Impulse's implementation of Depth of Field is not particularly intuitive, it does offer lots of flexibility and artistic potential. For instance, You could progressively defocus one object while bringing another into sharp focus (thereby changing the viewer's point of attention) by transitioning between two equivalent X/Y camera size ratios. There are undoubtedly many other ways to use this feature creatively.
Be aware that the amount of defocusing adversely affects rendering time. Severe defocusing (narrow DOF) not only results in longer rendering times but also does not always yield photorealistic results.
In the text I listed focal lengths and their equivalent field of view. The values are specific to a 35mm SLR type camera system (which I did not mention). This may mislead some who may want to simulate other camera systems (video or still). Even though focal length and field of view are related concepts, I was not technically correct to use the terms interchangeably.