Video Montage with Kdenlive: Advanced Editing: Animated Transparency Masks

In the previous post we saw color blending mode transitions between tracks and we have already seen some tricks to apply it with texts or shapes. In this post we will see more possibilities working with these transitions, especially we will see how to make animated transparency masks.

As in the previous post I already explained the theoretical part, in this one we go directly to practical examples to see new possibilities of these modes.

Practice 1. Animated rectangle to reveal part of a video clip

In this practice, the objective is, on a video clip in the background, to discover part of another with a title clip consisting of a simple rectangle that will animate entering from the left to disappear from the right.

The composition that I intend is the following:01.png

The elements used are:

In this case I use images but it can be done in the same way with video clips.

  1. A title clip.02.png
  2. An image (could be a video clip) to use a piece of it.03.png
  3. And a video clip in the background (in this case it is a still image, but on the blog this is indifferent).04.png

As I have quoted in the statement, the goal is for the title clip to pass over the clip that has the welcome text and it is visible over the background clip.

For this we need the following layer distribution:05.pngThat is, three overlapping tracks in the way we see in the image above. Before applying the transition, the result we have is the following:06.pngThat has nothing to do with what we intend but, just by applying a blend mode transition, the result changes completely.

In this case, we apply the “alphain” transition between the two upper tracks, remaining as follows.07.pngWhat this transition does is to make visible the part where there is color information about the clip below it and transparent what is the alpha channel of the title clip.

The result we obtain is the following:08.png

Now we animate the title clip with the transformation effect of “Position and zoom” as we have indicated in the statement. This clip is 5 seconds long so this is the animation time. The only parameter we animate is the position value of the “X” axis.

  1. Initial frame;

    09.png
    The only parameter that I have animated is the x-axis, setting its value to -1920, since it is the screen width.

  2. Final frame:

    10.png
    Now I have set the value of x to positive to 1920

In this way the rectangle will appear on the left revealing the text to disappear on the right.

I’ve applied a square blur to the title clip to smooth the edges with a core value of 20.11.png

Next I put a gif emulating the result of this practice.12 secP1.gif

Observations on this practice

If we use the “alphain” transition, it does not alter the colors, it makes it opaque where there is color information, whether this is any color, and it makes the part that does not have color information transparent, (that is, the alpha channel). In this case, the title clip is a solid red color with maximum opacity, but if we give this rectangle a transparency value, it will be seen in the result and, with this simple method, very interesting results can be achieved.

I give it an opacity value of 128 which equates to 50% transparency.13

And I get this result:

14
It is observed that now the fringe is semitransparent.

As I have indicated, transitions of this type that affect the alpha do not alter the colors, they only work with the transparency information.

But let’s see if we use any of the other options that do take color into account. In the following examples I have raised the opacity value of the title clip rectangle to 180.

With the “color_only” mode

16 color only.png
In this case, the strip has adopted the red color of the clip, maintaining transparency (as in alpha modes), but tinting the resulting color from the original color.

With the “difference” mode

17 difference.png
What this mode does is invert the colors.

As we appreciate, these modes act the same as that of “alphain” but also taking into account the color, so the results are different depending on the mode used.

Practice 2. Sequence of images that fill the screen from animated rectangles and will serve as a mask to create a transition between clips

In this practice, what we will do is a transition with a sequence of images made in blender, this is the following:gif_example 50fr_ok.gifAs can be seen, we start from a totally transparent image and in a sequence of 4 seconds (that is, 100 frames) we build an image. In this case I have used lights with the three basic colors that give the results that we see in the gif above this paragraph.

We already know that if we use an alpha transition the result will be the same regardless of the colors used; however, if we use other layer blending modes, the colors will affect the result.

The other two images that I have used for this practice are the following:18.jpg

19.jpgI have used two contrasting images to better see the effect. And of course we can do this same practice with videos.

  1. We load the sequence of images using the tool “Add presentation clip” and choose the option “Pattern of file names” (We saw this in the corresponding entry about the images)
  2. We put this clip in the upper track on the two tracks that we want to create the transition using this sequence of images.
  3. We add the “alphain” transition between the two upper tracks, that is, the track that will enter.20.png

And with these simple steps we obtain the following result:21 secP2.gifAs I have mentioned before I have used images but the steps to do these processes with videos are exactly the same. And we also see that when using an alpha transition the colors are not altered.

With other modes, for example burn, the colors would be affected:22.png

23.png

If we wish to prolong this effect and that after the transition the flower clip gradually acquires its color, what we do is insert the last image of said sequence just behind the sequence of images; in this case I give it a duration of two seconds, I insert the transition “Cairo blend” I put the “Blend mode” in “Color Burn” which is the same that I used in the previous transition and I encourage the opacity. This starts with the value of 100% and ends with the value of 0%. In this way the transition goes from being colored to its original colors in a progressive way.

24.png
Layout of tracks with the clip at the end for a progressive color transition.
25.png
Effect parameters for progressive color transition

Example Gif with the result at a very low quality, to make the input lighter, if you want to see this fragment with better quality you can see and download it from this link.29_color.gif

Thank you for your attention and I hope it has been useful to you, any questions or suggestions will be well received. For this you can make use of the comments.

See_Video_G

Deja un comentario