How to draw a rectangle?

Hey guys,

how can I draw a rectangle in my shotcut movie? I do not want to have finished rectangle - I want to see the drawing process.

For example starting on the upper left corner, drawing a line to the upper right corner, than going down to the bottom right corner and … so on, going clockwise, till the frame/rectangle is finished and closed. Best, the rectangle is maybe 50 oder 100 pixel away from the border of the movie.

See pic attached.

For the intro of my movie I want to have the title in the center and the animation of the drawing of the rectangle around my title. Maybe Keyframes offer a solution. But, I have no idea, how to do it.

Any idea?

I checked the forum and did a search, but did not find any suitable topic.

Best, Guenther

There are several ways of achieving what you want. Animating an SVG is one way, see here for a much more complex line animation:

https://elusien.co.uk/shotcut/resources/index.html#section_1

HTML/CSS animation is another way. Yet another way of doing it just using Shotcut could be:

  • Create 2 PNG images, one of a horizontal line, one of a vertical line.
  • Put the horizontal line on two tracks and the vertical line on 2 other tracks.
  • Keyframe the Size-Position-Rotate filter on each track to reveal the lines in sequence.

Actually they don’t have to be on separate tracks, they can be consecutive clips on the same track - much better.

Another way is to keyframe several masks. Let us know how you got on.

Hi @Gunther_Dorn,
As it happens a year or two ago I made lots of short mp4 files, each one featuring a revealing box (square or rectangle) of different sizes. I made them using HTML/CSS and @elusien’s webvfx, for use in my tutorial videos.
Anyway your post has prompted me to upload the whole lot to my Google Drive:
https://drive.google.com/drive/folders/1S9WKoKT1xBK8ff1i2yj_xZFjgd_48rGX?usp=sharing
Feel free to download , choose the right size and use in your video.
Place on a track higher than your text track. To remove the black background, either apply a chromaKey filter or a Blend Mode filter set to “add”.
Example video:

https://streamable.com/3z259o

3 Likes

People will submit 10 different ways to do this, all of them with good result. :smile:

I suppose the “correct” way would be a sonar-like black-and-white mask that could reveal the line as the mask rolls away. But finding or making a mask takes time (EDIT: unless @jonray shows up and just gives you one lol), so here’s my hack workaround…

I extracted the frame from your image and broke it into an upper-right segment and a lower-left segment. I saved them as PNGs with transparency. Then I layered them over your Curo text, made a transition between them and transparent clips, and changed the transition to “Diagonal Top Left”. I inverted the lower-left segment to make the transition go the other way. The effect looks like this:

One-Line-Fade

For fun, I left the entire frame intact and used a single transition to make two lines fade in at once:

Two-Line-Fade4

The transition has a Softness parameter that can modify how faded or sharp the end of the line being drawn is. This hack is definitely a one-trick pony, but it gets the job done.

Here are the project files and media:

Curo.zip (69.3 KB)

7 Likes

That’s excellent, @austin! Love the way you get a really classy fade effect with that method. I wouldn’t have thought of splitting it into an upper- and lower-segment and applying a “Diagonal Top Left” transition. Clever. :+1:
PS Thank you for the project files.

1 Like

LOL! Yes, it took a while to create the HTML files! BTW here’s one of the HTML files I made. The “webvfx” file must be in the same folder.
Double-click it and it will play in your browser. The you could take a screen capture of it using ShareX.
Or you could use it directly in Shotcut (has to be version 20_07 or earlier) in conjunction with a text:HTML filter.
Revealing box HTML with webvfx.zip (25.6 KB)

1 Like

With the picture of @Austin
Without html, just SPR in Shotcut

Curo_rect.zip (37.7 KB)

1 Like

Great idea! Unbelievable! Thank you! :grinning:

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