LevelSet
Within a single channel determined by the channel control, LevelSet outputs the distance from a pixel in the Viewer to the nearest pixel in the input channel with the value set in the threshold control.
LevelSet can be used to make high-quality dilate or unpremultiply operations. When gradient out is set to rgba, LevelSet outputs the motion vectors of pixels in the Viewer using the red (x axis) and green (y axis) values.
Inputs and Controls
Connection Type |
Connection Name |
Function |
Input |
unnamed |
The input sequence to dilate or unpremultiply. |
Control (UI) |
Knob (Scripting) |
Default Value |
Function |
LevelSet Tab |
|||
channel |
channel |
rgba.alpha |
The levelset is only calculated for this channel. |
threshold |
threshold |
0.5 |
Sets the pixel value that the Viewer pixel distance is measured from. |
level set out |
N/A |
enabled |
Enables the associated channel to the right. Disabling this checkbox is the same as setting the channel to none. |
output |
rgba.alpha |
Write distance from the threshold crossing to this channel. |
|
gradient out |
gradient |
motion |
Write gradient vectors to these channels. These vectors point toward the threshold crossing. |
create matte |
create_matte |
disabled |
Output a matte channel rather than a level set. |
dilate |
matt_limit |
0 |
Output matte is the level set thresholded at this value. This is a good way to grow a matte. Negative values shrink the matte. |
extrapolate channels |
extrapolated |
none |
If the creatematte button is turned on and extrapolatechannels is set to something other than none, the colors at the edge of the original matte are extrapolated as the matte is expanded. Unless gradientextrapolate is enabled, this function simply copy uses the color of the closest edge pixel. |
gradient extrapolate |
gradient_extrapolate |
disabled |
Instead of copying the nearest pixel, colors are extrapolated as a gradient to produce a ramp. |