About Filters |
While color corrections change the value of an individual pixel according to
a mathematical equation (for example., *2, -.5, etc.), filters calculate the
new value of a pixel by examining its neighbors, and passing it through what
is called a Spatial Filter. Classic filter functions are blurs, image sharpen,
emboss, and median filters. You can also create your own unique filters, of
any resolution, with the Convolve
function. Spatial filters are also applied when a geometrically transformed
image is resampled, for example, after a Scale or Rotate node.
Masking Filters
To have an image control the amount of filtering, it is recommended to use the special image-based filters such as IBlur, ISharpen, IRBlur instead of simply masking the effect. Although the node is slower, the effect is higher quality.
In this example, blur some Text with a Ramp that controls the amount of blur:
![]() |
![]() |
Normally, a Blur node is attached, and then a Ramp is applied as the mask. The result is not very compelling, since you merely end up with a blend between sharp and blurred elements. Note the Ramp has an Alpha value of 1 for both ends, so you should change your alpha1 value to 0.
![]() |
![]() |
Instead, use the dedicated IBlur node, with the Ramp as the second input image, rather than a mask input:
![]() |
![]() |
Filter
Characteristics
Shake is engineered to use the highest quality filtering process when doing transformations, blurs, and convolve effects. This is especially noticeable on animated effects, whether it is an animated transformation, or simply if the parameters of a blur are animated.
It is very difficult to decide on a single filter to use on both up and down resizing. That's why the "default" filter was built the way it is: it uses mitchell going up and sinc going down (the switch is automatic). The choice was made after projecting several versions of the same shots, processed with different filters, to a small panel of film professionals. Other filters, such as box (the closest thing to what users may know as "bi-linear") may give subjectively superior results in some cases (in particular on static imagery), but poor handling of high frequencies quickly becomes apparent.
Often, you can set different filters for X and Y, so you may increase the X resolution, but decrease the Y resolution. You usually have the option to set both directions, keeping in mind that default automatically uses mitchell to zoom up and sinc to zoom down. If there are not two options, as in Resize, simply place two Resize nodes, one to zoom the X, and the second to zoom the Y. Your speed hit is minor.
The subpixel control affects the way fractional resize is performed. If your
resize value is not an integer, (for example., 512 zooming to 1024 is an integer
by a factor of 2. Zooming 512 to 1023 is not an integer, as it is a factor of
1.998), you have subpixel sampling. For Resize, if the new width or height
is not an integer (either because it was set that way, or because of a proxy
scale), you have a choice to snap to the closest integer (subpixel off) or generate
transparent pixels for the last row and column (subpixel on).
Filter
|
Description
|
box | Relatively inexpensive and gives a "boxy" look. Default size is 1x1. |
default | By default, mitchell is used to resize up, and sinc to resize down. |
dirac | Dirac and impulse are the same. Default size is 0x0. |
gauss | Gaussian lacks in sharpness, but is good with ringing and aliasing. Default size is 5x5. |
impulse | Fast but lower quality. Default size is 0x0. |
lanczos | Similar to the sinc filter, but with less sharpness and ringing. Default size is 6x6. |
mitchell | This is the default filter when scaling up. A good balance between sharpness and ringing, and so a good choice for scaling up. Default size is 4x4. This is also known as a high-quality Catmull-Rom filter. |
quad | Like triangle, but more blur with fewer artifacts. Default size is 3x3. |
sinc | This is the default filter when scaling down. Keeps small details when scaling down with good aliasing. Ringing problems make it a questionable choice for scaling up. Default size is 4x4. It can also deliver negative values, which can be interesting when working in float/channel bit depth. |
triangle | Not highest quality, but fine for displaying a scaled image on your screen. Default size is 2x2. |