Depth of Field
compositing node
Creates a depth-of-field mask, which describes how out of focus parts of the image are.
See also: Blur, Defocus, Lighting
This operation creates a depth-of-field mask, which describes how out of focus parts of the image are. Combined with a Blur or Defocus COP, with the mask set to M and “Per-Pixel Blur/Defocus” on, a depth-of-field effect can be done. This mask can also used as an input to color correction operations to accentuate an area of interest.
A point or depth plane (P or Pz) must be present in order for this operation to produce valid results.
Overloading VEX Parameters
This operator is implemented in VEX, which supports parameter overloading. If the first input has a plane which matches an operation parameter’s channel name, the input plane will be used as the parameter’s value, effectively overriding it. The overloaded parameter is then evaluated from the plane on a per-pixel basis.
eg. If the input COP has the following planes:
C{r,g,b}
A
fogdens
and it is fed into a VEX Fog COP, the fog density will be determined at each pixel by the fogdens plane, since the Fog Density parameter’s channel name matches the 'fogdens' channel name.
Parameters
|
Focus Distance |
The distance where everything is entirely in focus. |
|
Depth Adjustment |
Increase or decrease the size of the area that will be out of focus. Corresponds to the “depth of focus” on a real camera lens. |
|
Distance Adjustment |
Adds a constant value to the distance (which is not the same as adjusting the focus distance, which adjusts the dropoff as well). |
|
Default Mask Value |
The mask value to use when a depth-of-field value cannot be computed (if the depth is zero). |
Local variables
|
L |
Sequence length |
|
S |
Start of sequence |
|
E |
End of sequence |
|
IL |
Input sequence length |
|
SR |
Sequence frame rate |
|
NP |
Number of planes in sequence |
|
W,H |
Width and height of image |
|
I |
Image index (0 at start frame) |
|
IT |
Image time (0 at start frame) |
|
AI |
Current plane array index |
|
PI |
Current plane index |
|
PC |
Num of channels in current plane |
|
CXRES |
Composite Project X resolution |
|
CYRES |
Composite Project Y resolution |
|
CPIXA |
Composite Project pixel aspect ratio |
|
CDEPTH |
Composite Project raster depth |
|
CBP |
Composite Project black point |
|
CWP |
Composite Project white point |
Usages in other examples
| Example name | Example for | |
|---|---|---|
| DepthOfField |
Defocus compositing node |