Add Alpha Operation & Invert Functions To Mask: Draw

I was trying to do a text reveal effect with Mask: Draw that I saw here in a tutorial for Kdenlive.

In that tutorial, he uses a text clip and applies the masking effect to it while the footage is on the layer underneath.

I tried to add the Mask: Draw filter to a transparent clip with Text: Simple like it was done in that tutorial in Shotcut but it didn’t work. Unless I missed something, the only way I got it to work is to make several sections of clips and copies of them. Here is how it looks in the timeline in order to make the text reveal effect work:

That is a lot of steps and isn’t as quick as it should be.

It would be a lot quicker if there were additional functions added to Mask: Draw (Glaxnimate), specifically the Alpha Operation option that is found in other filters like Mask: Simple Shape and Chroma Key: Advanced.

Also, Chroma Key: Advanced has the Invert option in the filter itself which would be very handy if it was already in the Mask: Draw (Glaxnimate) filter rather than having to add another filter (Alpha Channel: Adjust) just to do Invert especially considering how common that function will be used when doing masking.

Can these two functions be added to Mask: Draw (Glaxnimate)?

Mask: Draw is based on Mask: From File but with convenience functions for Glaxnimate integration. But also see the Channel parameter in Mask: From File - Brightness or Alpha. When you choose Alpha it overwrites the alpha channel with that from the file. Mask: Draw turns that on since that is expected (no need to use the correct color). If you draw something white (or grayscale) in Glaxnimate you can use it with the Brightness mode of Mask: From File

Brightness mode modified the existing alpha channel, but Alpha mode overwrites. But yeah, it is a good idea to add these options.

Also you can see in my screenshot how I trimmed the Mask filter. Does filter trimming help reduce the number of clips you needed?

1 Like

Mask: Draw applied to the text clip

glaxnimate_vtQF3mRCGu

With and without the Blend Mode filter (set to Screen)

shotcut_H7qDvpb4Ej

Yeah. Along with that picking the mask rawr file in Mask: From File allowed me to end up only needing two clips like in the tutorial I linked to instead of the 4-5 I had to create above by just using Mask: Draw (Glaxnimate).

It is a workaround along with the alternative method that @MusicalBox took the time to demonstrate. Thanks, both of you. :slightly_smiling_face:

Any chance of getting them in for the next version? They are pretty important and standard for masking. Of course parameters like controlling feathering and such things are needed too. Since it’s based on Mask: From File then along with Invert, Reverse could be added too.

By the way, is Mask: Draw (Glaxnimate) multi-threaded?

@shotcut, thanks a lot for getting these additional options in! :slightly_smiling_face:

Any chance of getting feathering/softness options added as well?

No

@shotcut, that’s peculiar that you say there’s no chance of adding control for feathering/softness in Mask: Draw (Glaxnimate) when Mask: File does have a softness parameter.

That does not work when using alpha. You might see it doing something when threshold is turned on, but it is not proper alpha feathering. That smoothing was designed for the luma wipes. And these new alpha modes only operate when threshold is off. See the source code for more details.