ZBlur
Function
This is a dedicated version of IBlur
that is used to simulate depth-of-field blurring based on the Z channel.
You can set a center point of focus (focusCenter), and the range of drop-off
to the maximum amount of blur. If you don't have a Z channel, you can
copy a channel in from another image. Therefore, if you are working in
8 or 16-bit, your ranges will be between 0 and 1, ie, your focusCenter
couldn't be 10, but would be somewhere between 0 and 1.
This functions works best with gradual changes of Z, i.e., looking down
a hallway, like this:
If you have foreground objects overlapping blurred background objects,
you will have ringing on the background. In this case, it is best if you
can separate your foreground from your background in to two separate elements,
i.e, do two renders if you are generating elements in 3D. Here is an example
from a 3D render. The text will have ringing around the background letters
when normally passed into a ZBlur. Instead, I separate the circle
into foreground and background elements with my 3D render. These are then
blurred and composited in Shake.
Parameters
|
Type
|
Defaults
|
Function
|
amount |
float
|
20 |
The maximum amount of blur |
near |
float
|
0 |
The value of distance towards the camera at which maximum blur
occurs
|
far |
float
|
1 |
The value of distance away from the camera
at which maximum blur occurs |
focusCenter |
float
|
(far-near)/2+near |
The distance from the camera at which there
is no blur. |
focusRange |
float
|
0 |
The distance away from the
focusCenter, both towards and away from the camera, that remains
in un-blurred. |
steps |
int
|
5 |
The amount of steps that the
total range is divided between. |
stepBlend |
float
|
1 |
The mixing of the different
steps. 0 means no mixing, and it good for getting a feel for your
step ranges. 1 means complete, linear blending. |
Synopsis
image ZBlur( image,
float amount,
float near,
float far,
float focusCenter,
float focusRange,
int steps,
float stepBlend
);
Script
image ZBlur( image,
amount,
near,
far,
focusCenter,
focusRange,
steps,
stepBlend
);
Command Line
shake -zblur amount near far etc...
See Also
PercentBlur,
Blur , IBlur,
Defocus
|