Object within a circle (mask)

I have been trying to apply a mask to make it so that the object (telegram logo) moves while showing within the circle, without poking outside of it (like it does here).

I tried some ways to implement it and searched online, but couldn’t manage to reach the result I wanted.

I have only been using Shotcut for a few weeks so I am still not too familiar with it, any help would be appreciated.

Hi @AhmedMudkip

Assuming this is what you are after:

Here is one way to do it. This is just proof of concept and you will have to adjust accordingly (I made the circle and the logo larger than your example for ease of use). Here is the mlt file and the png I used. Place them both in the same folder then open the mlt in Shotcut and you should be good to go. If you click on the size, position, & rotate filter from the screenshot, that will allow you to drag the logo around.

telegram mask.mlt (6.5 KB)

Hopefully that helps.
P.S I created this project using video mode 1080p @ 30fps. When you open the mlt that should be set correctly, but if not you can manually adjust after opening by going to settings → video mode → and select HD 1080p @ 30fps.

1 Like

I think there’s a slightly better way, but it’s 1am and I’m in bed, so I will update it when I get time in the morning.

It did work, got to know that I was able to move the bounding box and resize it through the simple shape mask.
Thanks for the help! The files really did help.

1 Like

My first effort works and is useful if you plan on changing the background colour without using a graphics program. But because there is a mask and a crop circle, you have to adjust mask positioning if you plan on moving the location of the entire circle. That can be a pain, since the mask movement is done by % (it works just fine but it might be deemed fiddly).

So here is the second version and it has some definite advantages. Same principle - copy the mlt and logo to the same folder, make sure video mode is set to HD 1080p @ 30fps and you’re good to go.

By selecting the bottom Size, position & rotate (SPR) filter, you can drag the entire circle around and the logo moves relative to that circle. Also, this method doesn’t need a mask, so the edges are cleaner. But to make it work, I had to enlarge the background of the telegram logo and make that the same colour you want the circle to be (logo isn’t transparent). It’s actually really easy to change that background in a program like GIMP, but I understand that might not be for everyone.

telegram mask v2.mlt (8.4 KB)

Anyway, this is the method I would use because I can easily alter backgrounds using a graphics program, but you can pick your poison!

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.