遮罩

您可以使用以下其中一种效果创建遮罩:

备注

名称中带有*(蒙版)*的效果需要与**蒙版应用**配合使用才能生效。它允许将其他效果和滤镜仅应用于蒙版区域 (也可反选以应用于蒙版之外的区域)。不带*(蒙版)*的效果仅创建 Alpha 通道,使下方轨道的剪辑能够透显。

Effect Stack Example

../../_images/masking_timeline.webp

Example of using (Mask) effects to apply effects/filters

This example shows the effect stack with an Alpha Shapes (Mask) and Mask Apply effect as brackets (1) around the actual effects Gaussian Blur and Bw0r (2).

Note that effects are always applied top down.

Steps to create a mask

  1. Depending on your use case apply one of the masking effects.

    Alpha 形状:

    Creates a rectangle, ellipse, triangle, and diamond shape that can be adjusted in position, size, rotation, and feathering. For illustration purposes, Operation Subtract has been selected.

    ../../_images/masking-alpha_shapes_rec.webp ../../_images/masking-alpha_shapes_ell.webp ../../_images/masking-alpha_shapes_tri.webp ../../_images/masking-alpha_shapes_dia.webp
    矩形Alpha遮罩:

    Is a simple mask whose edges are defined in number of pixels from the edge of the frame.

    动态遮罩:

    Is best suited for complex shapes, for example when persons or animals or other irregular objects need to be masked.

    形状透明度通道:

    Allows to use an image or video to be used as a mask. The resource must have an alpha channel. This is particular useful for using masks created by online background removal service like those from a Google search.

  2. Adjust the mask to your needs

    ../../_images/transitions_and_compositions-masking-rotoscoping.gif

    Rotoscoping (click to enlarge)

    In this example the jumping person shall be composited into the scene with the road. For this complex shape the Rotoscoping - 转描 effect is best. It creates a mask[1] outside the shape. Using the Alpha Operation the mask can be inverted.

    ../../_images/masking-adjust_alpha_shapes_mask.webp

    An Alpha Shapes (Mask) applied

    In this example the alpha shape rectangle has been adjusted in size, position, and transition width to cover the house in the middle. For better adjustment, Operation has been set to Write on clear. For the mask to work (protecting the masked area) Operation must be set to Subtract.

  3. Apply the desired effect(s) to the clip and adjust as needed

    ../../_images/masking-adjust_alpha_shapes_mask_gblur.webp

    Gaussian Blur effect applied

    This will blur the rest of the image but not the part covered by the mask.

    ../../_images/masking-adjust_alpha_shapes_mask_bw0r.webp

    bw0r effect (b&w) applied

    This will make the rest of the image black and white but not the part covered by the mask.

  4. Add the Mask Apply effect to the clip

    ../../_images/masking-adjust_alpha_shapes_mask_result.webp

    Result of the mask

    The masked area is protected from the effects of the two effects/filters. In this example the house in the middle stands out and is in focus.

    To adjust for camera movement, you can use keyframes in the Mask effect to change position, size, rotation, and other parameters.

You can repeat this as often as needed for the same clip or add other effects after the Mask Apply for affecting the entire clip.

Other Examples

This is an example for using rotoscoping with keyframes to highlight an object in a video:

../../_images/transitions_and_compositions-masking-rotoscoping_2.gif

Rotoscoping Mask with keyframes

The Colorize effect was used to highlight the masked area.