C_Bilateral
C_Bilateral is a smoothing filter that operates by mixing nearby source pixels according to their spatial distance and color similarity. The filter is particularly good at preserving edges, though it can be computationally expensive.
It's similar to the standard Nuke Bilateral node, but with the addition of GPU acceleration and an optional guide input to compute color similarity while filtering.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
src |
The image sequence to filter. |
guide |
An optional image to compute color similarity while filtering. Connecting the guide input converts the output from the filter to the same format as the guide image, resulting in a joint bilateral resampling filter. If the src and guide images have the same format, the node acts as a cross bilateral filter. If the guide input is not connected, the output format is equal to that of the src input and acts as a standard bilateral filter. |
|
mask |
An optional image to use as a mask. By default, the filter effect is limited to the non-black areas of the mask. At first, the mask input appears as triangle on the right side of the node, but when you drag it, it turns into an arrow labeled mask. If you cannot see the mask input, ensure that the mask control is disabled or set to none. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
C_Bilateral Tab |
|||
Local GPU |
gpuName |
N/A |
Displays the GPU used for rendering when Use GPU if available is enabled. Local GPU displays Not available when: • Use CPU is selected as the GPU device in the Preferences. • no suitable GPU was found on your system. • it was not possible to create a context for processing on the selected GPU, such as when there is not enough free memory available on the GPU. You can select a different GPU device, if available, by navigating to the Preferences and selecting an alternative from the GPU Device dropdown. Note: Selecting a different GPU requires you to restart Nuke before the change takes effect. |
Use GPU if available |
useGPUIfAvailable |
enabled |
When enabled, rendering occurs on the Local GPU specified, if available, rather than the CPU. The output between the GPU and CPU is identical, but using the GPU can significantly improve processing performance. Note: Enabling this option with no local GPU allows the script to run on the GPU whenever the script is opened on a machine which does have a GPU available. GPU processing also requires certain drivers. For more information on the minimum requirements, see the Nuke Release Notes available in Help > Release Notes. |
Channels |
channels |
all |
The filter is only applied to these channels. If you set this to something other than all or none, you can use the checkboxes on the right to select individual channels. |
Guide Channels |
guide |
all |
When the guide input is connected, sets the channels in the guide image used to compute the filtering weights. The guide image should contain some prior information on the source useful to the filtering, such as a depth channel. If no information is available, the result of an unguided C_Bilateral filter can be used as guide input of a second filtering operation. |
Size (w, h) |
Size |
3 |
Sets the height and width of the area within which pixels are compared to calculate the filter. Higher values widen the compare area, producing greater effect. |
Positional Sigma |
PositionalSigma |
0.4 |
Controls the amount that nearby pixels affect the overall filter. A low value only mixes pixels that are close to each other. Higher values mix more distant pixels as well, as long as their colors are similar. |
Color Sigma |
ColorSigma |
0.4 |
Controls the influence of pixel colors during filtering. A low value only mixes pixels that have very similar colors, helping to preserve edges in the image. Higher values mix pixels with greater color differences, resulting in smoother edges and larger areas with non-uniform color. |
mask |
N/A |
disabled |
Enables the associated mask channel to the right. Disabling this checkbox is the same as setting the channel to none. |
maskChannelInput |
none |
The channel to use as a mask. By default, the filter effect is limited to the non-black areas of this channel. |
|
inject |
inject |
disabled |
Copies the mask input to the predefined mask.a channel. Injecting the mask allows you to use the same mask further downstream. |
invert |
invert_mask |
disabled |
Inverts the use of the mask channel so that the filter effect is limited to the non-white areas of the mask. |
fringe |
fringe |
disabled |
When enabled, only apply the effect to the edge of the mask. When disabled, the effect is applied to the entire mask. |
mix |
mix |
1 |
Dissolves between the original image at 0 and the full effect at 1. |