Combine Multiple Masks in Kdenlive with Alpha Operations
This guide explains how to combine multiple video masks in Kdenlive using the “Alpha Operations” effect. You will learn how to apply multiple shape masks to a single clip and use alpha channel math—such as add, subtract, and intersect—to create complex, custom-shaped masks for your video editing projects.
Step 1: Apply Your First Mask
Select the video clip on your timeline where you want to apply the masks. Search for a masking effect in the Effects tab, such as Shape Alpha or Rotoscoping, and drag it onto your clip. Adjust the size, position, and transition of this first mask to define your initial selection area.
Step 2: Apply Your Second Mask
Drag a second masking effect (such as another Shape Alpha or Rotoscoping effect) onto the same video clip. By default, Kdenlive processes these masks independently, so you must add an instruction to tell the software how to merge them.
Step 3: Add the Alpha Operations Effect
Search for the Alpha Operations effect in the Effects panel and drag it onto your clip. In the effect stack for your clip, ensure that the Alpha Operations effect is positioned below both of your mask effects. The processing order is crucial; the masks must be calculated first before Alpha Operations can manipulate their overlapping data.
Step 4: Configure the Operation Mode
In the Alpha Operations settings, locate the Operation dropdown menu. Choose the option that fits your project needs:
- Add (Maximum): Combines the areas of both masks. If a pixel is covered by either mask, it remains visible.
- Subtract: Cuts the shape of the second mask out of the first mask.
- Intersect (Minimum): Keeps only the area where both masks overlap.
- Exclude (XOR): Displays both mask areas but hides the region where they overlap.
Once selected, Kdenlive will render the combined mask shape in the project monitor. You can still adjust the position, feathering, and size of the individual masks, and the combined output will update automatically.