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

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

Mask Paint Node

The Mask Paint node allows direct painting of mask images, using the pointer as if it was a paintbrush. In addition to regular paint strokes, it is possible to apply basic primitive shapes and polyline style strokes.

Each stroke can have a duration that lasts for the entire project, a single frame. or an arbitrary number of fields. The strokes can have independent durations in the Keyframes Editor for easy manipulation of time. Alternatively, Multistrokes is a faster but non-editable way for doing many mask clean up paint tasks.

Mask Paint Node Inputs

The Paint mask node includes a single effect mask input.

  • 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.

Mask Paint Node Setup

The Mask Paint node is useful for painting masks using a more free hand, pressure sensitive style. In the node tree below, the Mask Paint node is used to patch up holes in a Bitmap mask.

Mask Paint Node Controls Tab

Not all of the controls described here appear in all modes. Some controls are useful only in a specific Paint mode and do not appear when they are not applicable. The Controls tab is used to configure your paint settings before painting. Once a paint stroke is created, except for the Multistroke and Clone Multistroke, you can select the stroke in the viewer and update the controls.

Brush Controls
Brush Shape The brush shape buttons select the brush tip shape. Except for the single pixel shape, you can modify the size of the brush shape in the viewer by holding down the Command or Ctrl key while dragging the mouse

  • Soft Brush: The Soft Brush type is a circular brush tip with soft edges.
  • Circular Brush: A Circular Brush is a brush tip shape with hard edges.
  • Image Brush: The Image Brush allows images from any node in the node tree, or from a file system, to be used as a brush tip.
  • Single Pixel Brush: The Single Pixel Brush is perfect for fine detail work, creating a brush tip precisely one pixel in size. No anti-aliasing is applied to the single pixel brush.
  • Square Brush: A Square Brush is a brush tip with hard edges.

Vary Size
Vary size settings change the stroke size based on speed or a pressure-sensitive pen and tablet.

  • Constant: The brush tip remains a constant size over the stroke.
  • With Pressure: The stroke size varies with the actual applied pressure.
  • With Velocity: The stroke size varies with the speed of painting. The faster the stroke, the thinner it is.

Vary Opacity
Vary opacity settings change the stroke opacity based on speed or a pressure-sensitive pen and tablet.

  • Constant: The brush tip remains at a constant transparency setting over the entire stroke.
  • With Pressure: The stroke transparency varies with the applied pressure.
  • With Velocity: The stroke transparency varies with the speed of painting. The faster the stroke, the more transparent it is.

Use this control to increase or decrease the Softness of a soft brush.

Image Source
When using the Image Source brush type, select between three possible source brush images.

  • Node: The image source is derived from the output of a node in the node tree. Drag the node into the Inspector’s Source node input field to set the source.
  • Clip: The image source is derived from an image or sequence on disk. Any file supported by Fusion’s Loader or MediaIn node can be used.
  • Brush: Select an image to use as a brush from the menu. Images located in the Fusion > Brushes directory are used to populate the menu.

Color Space
When the Fill tool is selected, a Color Space menu selects the color space when sampling colors around the Fill tool center for inclusion in the fill range.

When the Fill tool is selected, a Channel menu select an Alpha value is used in the fill paint. For example, the fill occurs on contiguous pixels of the alpha channel.

Apply Controls
Apply Mode The Apply Modes are buttons that change a brush’s painting functionality.

  • Color: The Color Apply Mode have only a single Alpha value.
  • Clone: The Clone Apply Mode copies an area from the same image using adjustable positions and time offsets. This mode can also copy portions of one image into another image. Any image from the node tree can be used as the source image.
  • Emboss: The Emboss Apply Mode embosses the portions of the image covered by the brush stroke.
  • Erase: Erase reveals the underlying image through all other strokes, effectively erasing portions of the strokes beneath it without actually destroying the strokes.
  • Merge: This Apply Mode effectively merges the brush onto the image. This mode behaves in much the same way as the Color Apply Mode but has no color controls. It is best suited for use with the image brush type.
  • Smear: Smear the image using the direction and strength of the brushstroke as a guide.
  • Stamp: Stamps the brush onto the image, completely ignoring any alpha channel or transparency information. This mode is best suited for applying decals to the target image.
  • Wire: This Wire Removal Mode is used to remove wires, rigging, and other small elements in the frame by sampling adjacent pixels and draw them in toward the stroke.

Stroke Controls
The stroke controls contain parameters that adjust the entire stroke of paint as well as control it over time.

  • Size: This control adjusts the size of the brush when the brush type is set to either Soft Brush or Circle. The diameter of the brush is drawn in the viewer as a small circle surrounding the mouse pointer. The size can also be adjusted interactively in the viewer by holding the Command or Ctrl key while dragging the mouse pointer.
  • Spacing: The Spacing slider determines the distance between dabs (samples used to draw a continuous stroke along the underlying vector shape). Increasing this value increases the density of the stroke, whereas decreasing this value causes the stroke to assume the appearance of a dotted line.
  • Stroke Animation: The Stroke Animation menu provides several pre-built animation effects that can be applied to a paint stroke. This menu appears only for vector strokes like Stroke and Polyline Stroke.
  • All Frames: This default displays the stroke for all frames of the image connected to the orange background input of the Paint node.
  • Limited Duration: This exists on the number of frames specified by the Duration slider.
  • Write On: When Write On is selected, an animation spline is added to the paint stroke that precisely duplicates the timing of the paint stroke’s creation. The stroke is written on the image exactly as it was drawn. To adjust the timing of the Write On effect, switch to the Spline Editor and use the Time Stretcher node to adjust the overall length of the animation spline. To smooth or manually adjust the motion, try reducing the points in the animation spline.
  • Write Off: Write Off performs the reverse of Write On, drawing the stroke starting from the end and working backward to the start of the stroke.
  • Write On Then Off: This menu option applies a Write On and then a Write Off animation mode to the stroke.
  • Trail: Selecting the Trail option from the menu causes both the start and end points of the stroke to be animated simultaneously, offset from each other by the amount specified in the Duration control. This has the effect of creating a painted segment that follows the stroke path. As with the Write On and Write Off effects, this starts on the current frame when the animation mode is selected. The timing of the animation can be adjusted manually using the Spline or Keyframes Editors.
  • Duration: Duration sets the duration of each stroke in frames. This control is present only for Multistroke and Clone Multistroke, or when the stroke animation mode is set to Limited Duration. It is most commonly employed for frame-by-frame rotoscoping through a scene. Each Vector stroke applied to a scene has a duration in the Keyframes Editor that can be trimmed independently from one stroke to the next. The duration can be set to 0.5, which allows each stroke to last for a single field only when the node tree is processing in Fields mode.
  • Write On and Write Off: This range slider appears when the Stroke Animation is set to one of the Write On and Write Off methods. The range represents the beginning and end points of the stroke. Increase the Start value from 0.0 to 1.0 to erase the stroke, or increase the End value from 0.0 to 1.0 to draw the stroke on the screen. This control can be animated to good effect. It works most effectively when automatically animated through the use of the Write On and Write Off modes of the Stroke Animation menu.
  • Make Editable: This button appears only for Vector strokes. Clicking on Make Editable turns the current stroke into a polyline spline so that the shape can be adjusted or animated.

Mask Paint Mask Node Tab

The Mask tab is used to refine the basic mask parameters that do not fall into the category of “panting.” These include how multiple masks are combined, overall softness control, and level control.

Show View Controls
The Show View Controls checkbox is used to enable/disable the display of the masks 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, the checkbox affects all pixels, regardless of whether the new mask covers them or not.

Mask Paint Node Image and Settings Tabs

The Image and Settings tabs in the Inspector are also duplicated in other mask nodes. These common controls are described in detail HERE.


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 *