Get 30+ hr of DaVinci Resolve courses & 400+ pre-made assets

As little as $15/month for all courses and pre-made assets

Wand Mask Node

The Wand mask masks an image based on a wand-style selection, similar to the Magic Wand tool found in Adobe Photoshop. As with a Bitmap mask, any image in the composition can be the source of the mask. Generally, the default is most useful, where the source image is the input of the node to which the mask is applied.

When adding a Wand mask to a node, a crosshair appears in the viewers. This crosshair should be positioned in the image to select the color used to create the Wand mask. The mask is created by examining the pixel color beneath the selection point and adding that color to the mask. The mask then expands to examine the pixels surrounding the selection point. Surrounding pixels are added to the mask if they are the same color. The mask stops expanding when no connecting pixels fall within the color range of the mask.

Wand Mask Node Inputs

The Wand mask node includes two inputs in the Node Editor.

  • Input: The orange input accepts a 2D image from which the mask is created.
  • Effect Mask: The optional blue input expects a mask shape created by polylines, basic primitive shapes, paint strokes, or bitmaps masks. Connecting a mask to this input combines the masks. How masks are combined is handled in the Paint mode menu in the Inspector.

Wand Mask Node Setup

The Wand mask node is not required for connecting an image into the effect mask input, but like the Bitmap node, it does provide options that are otherwise unavailable. It allows for selecting channels other than RGBA for the mask, as well as softness and clipping. In the node tree below, the Wand node takes the composite out of the merge, creating a mask for the color correction.

Wand Mask Node Controls Tab

The Controls tab is used to refine how the mask appears after the Wand makes a selection in the viewer.

Show View Controls
The Show View Controls checkbox is used to enable/disable the display of the mask’s onscreen controls in the viewer. Onscreen controls, including center position, polylines, angles, and others, do not appear when this checkbox is disabled, even when the node is selected.

The Level control sets the transparency level of the pixels in the mask channel. When the value is 1.0, the mask is completely opaque (unless it has a soft edge). Lower values cause the mask to be partially transparent. The result is identical to lowering the Blend control of an effect.

This control selects the filtering algorithm used when applying Soft Edge to the mask.

  • Box: This is the fastest method but at reduced quality. Box is best suited for minimal amounts of blur.
  • Bartlett: Otherwise known as a Pyramid filter, Bartlett makes a good compromise between speed and quality.
  • Multi-box: When selecting this filter, the Num Passes slider appears and lets you control the quality. At 1 and 2 passes, results are identical to Box and Bartlett, respectively. At 4 passes and above, results are usually as good as Gaussian, in less time and with no edge “ringing.”
  • Gaussian: The Gaussian filter uses a true Gaussian approximation and gives excellent results, but it is a little slower than the other filters. In some cases, it can produce an extremely slight edge “ringing” on floating-point pixels.

Soft Edge
Use the Soft Edge slider to blur (feather) the mask, using the selected filter. Higher values cause the edge to fade off well beyond the boundaries of the mask. A value of 0.0 creates a crisp, well-defined edge.

Paint Mode
Connecting a mask to the effect mask input displays the Paint mode menu. The Paint mode is used to determine how the incoming mask for the effect mask input and the mask created in the node are combined.

  • Merge: Merge is the default for all masks. The new mask is merged with the input mask.
  • Add: The mask’s values add to the input mask’s values.
  • Subtract: In the intersecting areas, the new mask values subtract from the input mask’s values.
  • Minimum: Comparing the input mask’s values and the new mask, this displays the lowest (minimum) value.
  • Maximum: Comparing the input mask’s values and the new mask, this displays the highest (maximum) value.
  • Average: This calculates the average (half the sum) of the new mask and the input mask.
  • Multiply: This multiplies the values of the input mask by the new mask’s values.
  • Replace: The new mask completely replaces the input mask wherever they intersect. Areas that are zero (completely black) in the new mask do not affect the input mask.
  • Invert: Areas of the input mask that are covered by the new mask are inverted; white becomes black and vice versa. Gray areas in the new mask are partially inverted.
  • Copy: This mode completely discards the input mask and uses the new mask for all values.
  • Ignore: This mode completely discards the new mask and uses the input mask for all values.

Selecting this checkbox inverts the entire mask. Unlike the Invert Paint mode, this checkbox affects all pixels, regardless of whether the new mask covers them.

Selection Point
The Selection Point is a pair of X and Y coordinates that determines where in the source image the Wand mask derives its initial color sample. This control is also seen as a crosshair in the viewers. The selection point can be positioned manually, connected to a tracker, path, or other expressions.

Color Space
The Color Space button group determines the color space used when selecting the source color for the mask. The Wand mask can operate in RGB, YUV, HLS, or LAB color spaces.

The Channel button group is used to select whether the color that is masked comes from all three color channels of the image, the alpha channel, or an individual channel only.

The exact labels of the buttons depend on the color space selected for the Wand mask operation. If the color space is RGB, the options are R, G, or B. If YUV is the color space, the options are Y, U, or V.

The Range slider controls the range of colors around the source color that are included in the mask. If the value is left at 0.0, only pixels of the same color as the source are considered part of the mask. The higher the value, the more that similar colors in the source are considered to be wholly part of the mask.

Range Soft Edge
The Range Soft Edge determines the falloff range of the colors selected. Any pixel within the range defined above are treated as 100% within the mask. If the soft range is set to 0.0, no other pixels are considered for the mask. Increasing the soft range increases the number of colors close to, but not quite within, the range included in the mask. These pixels are semitransparent in the mask.


About the Author

Justin Robinson is a Certified DaVinci Resolve, Fusion & Fairlight instructor who is known for simplifying concepts and techniques for anyone looking to learn any aspect of the video post-production workflow. Justin is the founder of JayAreTV, a training and premade asset website offering affordable and accessible video post-production education. You can follow Justin on Twitter at @JayAreTV YouTube at JayAreTV or Facebook at MrJayAreTV

Get 30+ hr of DaVinci Resolve courses & 400+ pre-made assets

As little as $15/month for all courses and pre-made assets

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *