Dither
Dither adds random noise to an image to hide color quantization effects. Color quantization is a reduction in the number of colors used in the image, and can occur, for example, if the image has been stored into an 8-bit file without error diffusion. In a dithered image, colors that are not available are approximated by a diffusion of colored pixels from within the available palette. The human eye perceives the diffusion as a mixture of the colors within it. This produces an impression of a larger number of colors and eliminates banding artifacts.
See also Noise, Grain, ScannedGrain, and F_ReGrain.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
unnamed |
The image sequence with unwanted color quantization effects. |
mask |
An optional image to use as a mask. By default, the dither 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 |
Dither Tab |
|||
channels |
channels |
all |
The effect 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. |
amount |
amount |
0.1 |
Up to 0.5 of this amount is added or subtracted from each pixel to create the effect. Higher values produce more dither and vice versa. |
monodither |
monodither |
disabled |
When enabled, the same dithering pattern is used for all channels. |
seed |
seed |
1 |
The same pattern is usually produced for each Dither node. Changing the seed number produces a different pattern, for instance if you’re using multiple Dither nodes. |
static seed |
static_seed |
disabled |
When enabled, the dither pattern remains the same for every frame producing a constant dither effect. |
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 dither 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 dither 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. |
(un)premult by |
N/A |
disabled |
Enables the associated channel to the right. Disabling this checkbox is the same as setting the channel to none. |
unpremult |
none |
The image is divided by this channel before being processed, and multiplied again afterwards. If you are using premultiplied input images, you may want to check (un)premult by and select rgba.alpha here. This will simulate applying the dither before the premultiplication was done. It is the same as adding an Unpremult node before this node and a Premult node after, but allows you to work faster if you’re only using one Dither node. If you are using unpremultiplied input images, you should leave this set to none. |
|
invert |
invert_unpremult |
disabled |
Inverts the use of the (un)premultiply channel. |
mix |
mix |
1 |
Dissolves between the original image at 0 and the full dither effect at 1. |