Clean diagonal swipe transition using HTML file overlaid on a transparent clip


#1

Hi folks,
I designed a diagonal swipe transition in Notepad++ and applied it to a transparent clip with the newly-named “Text:HTML” filter (19.06 onwards, previously named “Overlay HTML” filter).
It works fine. Here are two short demos I made:
DEMO 1:

https://streamable.com/1vs8y

DEMO 2:

https://streamable.com/xh7ff

The diagonal swipe design features 4 large “boxes”, each rotated, moving from left to right using @elusien’s webvfx framework.
I have:

  1. White box set at opacity =0.1;
  2. Light blue box;
  3. Darker blue box (thin);
  4. White box set at opacity =0.1.

All set to fly across the screen in <2 seconds. Each box has slightly different speed of movement for artistic effect.

I made several versions of the HTML file, changing the angle of the stripes, for variety.

The screenshot below shows how I did it in Shotcut - I put all the clips on V1 and made a short dissolve transition between each, then I put the transparent clips on V2 and V3, carefully positioning them to achieve the desired transition effect.

For Demo 2 I lengthened the transitions by extending the length of the transparent clips.
I’m very happy to share the HTML files I used - just ask.


#2

What a beautiful and clean transition! I like it very much. I find it professional looking which is nice because some transitions are too gimmicky, at least in my opinion.

One point though, it seems to take some effort to let the swipe really seem like a transition since one can see the next clip before the swipe occurs. But that said, it shouldn’t be too difficult just a bit more work than an actual transition.

I would like to have the corresponding HTML files, please. I rather change your code lines than to create a new file :grin:.


#3

Neat. I am in the final throws of testing a way of using CSS3 animations with Shotcut. I should have something for you to play with in a day or two. This will be independent of my WebVfx framework and should make designing animation HTML Overlays like thus much easier.


#4

@jonray this transition is looks professional. go ahead.


#5

Thank you @samth, @Elusien and @dipensan for your kind comments.

I totally agree, especially noticeable on the slow demo. I have a plan, though :smile: - next time I get time to experiment, I plan to make a diagonal swipe matte (black/white) video using the same HTML file, then apply it to the clips via “mask from file”. Or I could use the mask:simple shape filter. Either way if I can create a diagonal transition which coincides with the blue bar moving across - if it works to plan I should get a perfect transition! If I get success I’l post here.

I’ll sort out the HTML files as soon as possible and post them.


#6

HTML files attached:

JonRay HTML files TRANSPARENT with BLUE swipes.zip (32.4 KB)
I’ve included the webvfx.js file. (This has to be put in the same folder as the .html files. If you would like to know a bit about my style of creating HTML files for use in SC (so that you may understand my code better), you may like to see my recent set of tutorials on this. Part 1 is here:


(although they’re already out of date, since the “Overlay HTML” filter had its name changed to “text:HTML” 2 days before I posted them on YouTube :disappointed_relieved::sweat: ).

#7

Indeed a clever approach. By contrast, my idea seems a bit too simple: I thought of applying a blur filter during the swipe. This makes is just less obvious, though. An actual diagonal transition behind the swipe is way better.

That would be wonderful.

Your tutorial on YouTube will be helpful for several persons, I am certain. That the parts were over various threads was a bit untidy, so now concentrated in one place is more accessible. And with part 4 published as well, I will rewatch the whole series :smile:.
You can change the title of the videos and the descriptions, and hopefully the people will understand what you are referring to.


#8

Try to do it with the keyed mask filter for real transitions!:wink:


#9

It WORKS! Woo-HOO! Perfect transitions revealed by the blue diagonal swipe.
First, here’s the result:

https://streamable.com/4zaww

How I did it:
I adapted the HTML code to make it black and white (it must start all white and end all black), then applied it to a 4-second colour clip in SC, then exported it as an Mp4. I named it the same as the HTML file but added MATTE PAIR to the file-name for identification.:

https://streamable.com/70ra3

Then set the time line up like this:

Step-by step instructions:

  1. Make 4 video tracks;
  2. Put clip 1 on V1;
  3. Put the Matte Pair mp4 on V4. Use this as a template only for guiding where to split clip 2 (hide V4 with the eye icon). Line up the end of this clip with the end of Clip 1.
  4. Put clip 2 on V2. Overlap it and line it up with Matte clip on V4. Split at position= end of clip 1. This gives clip 2A and 2B.
  5. Apply a Mask:from file filter to Clip 2A. Select custom and point to the Matte pair MP4.
  6. Put a transparent colour clip on V3. Make it 4 seconds long. Apply the Text:HTML filter (v.19.06 onwards), select webvfx and point to the original blue sliding HTML file.

Preview - it should work.

Then - move clip 2A down to V1 and repeat for all other clips in your sequence:

Ta - Dah!

It may look a complex procedure when written out like this, but it didn’t take long once I had prepared the HTML file and the Matte pair MP4. I used the copy feature to copy the transparent clip, and the copy filters feature to ad the “Mask:from file” filter to each clip.

Of course, I would need to make more Matte Mp4s if I wanted to change the angles of the diagonal swipe to add variety.

I also made a FAST matte MP4 to make this demo:

https://streamable.com/rx8tt

One more point: It’s easy to change the colours of the swipe bar by adapting the original HTML file.


#10

Beautiful, like a real transition.
Yes, it is a bit more difficult than an actual transition. But it isn’t that complex if one is following your instructions.
Adjusting the length of the transparent clip to get a seamless transition is every time necessary. It would be easier if one could just use a PNG like your “Diagonal Rain” transition.
That said, it really isn’t that much work. Thanks for your instructions!

Just a minor comment regarding your files: The body and #fullscreen_box have a background colour defined. Because of the transparent in the name of the folder I thought there was no background.
Also a typo:

I guess it should be 2B instead of 2A.


#11

That is a good idea and quite easy as I noticed.
It unfortunately has one downside: The angle of the diagonal mask is not adjustable so the stripes have to adhere to the given angle.
But if that is the preferred angle, this definitely saves time.


#12

Why don’t you use “Rotate and scale” for the mask? :wink:


#13

And how do you apply this filter only to the mask? I tried it with and without Mask: Apply but it affects the whole clip and not only the mask. My basic understanding is not enough, I guess. I probably need a proper introduction into masking.

By the way, if you use the winking smiley too often, it seems condescending and I don’t think you mean it that way.


#14

The HTML file has a “data-control” value of 4 seconds, so if you set the length of the transparent clip in the timeline to 4 seconds it should work as intended. The matte (black and white version) was based on the HTML file so the two should, in theory, work in sync together.

Well spotted! It’s purposefully done, because when I preview in Chrome I remove the “x” from “lightgreyx” and “purplex” so I can see the background colour, otherwise it would just look white. Adding the “x” makes the background transparent, because it forces the browser (or SC) to use the default value, which is transparent.

Ah, yes, you are correct.Thanks!:smile:

Yes indeed. It will be quite easy, though, to make several HTML files for varying angles, then produce a corresponding Matte MP4 for each.

Hi @DvS, thank you. I just tried that (had to apply a scale value to zoom in as well as rotate, of course). However I got into a bit of trouble aligning this up with the HTML. I think the rotated Mask MP4 probably travels at a slighly different speed than the original (athough I can’t be 100% sure).

Just to add, personally, I don’t have an issue with your “wink” emoticons"…:smile:

I’m going to experiment with using “Mask:simple shape” instead of “Mask: from file” next, when I get some time…


#15

Sorry, in Germany we use that winking smiley often for a hint.


#16

It seems the data-control is only for the browser and in Shotcut the length of the clip is used.

I assumed that was the reason, just wanted to make you aware that you uploaded this version :smile:.

Exactly. It needs preparation but only once and then it is fairly fast to do.

And that is my problem because with a zoom I would add another element to the transition which I do not want. Could you perhaps elaborate how you would do it, @DvS?

I read once an article about the differences in perceiving of smileys/emojis among various persons and it seems that is the case now. I am not able to say if my perception is the general perception in Switzerland but personally, it has this connotation of “you know that, right?” if used frequently within few comments/messages. Less frequently used, I perceive it as a friendly nod or also as a hint. It is good to know this, so I will try to remember this possible use. And you do not have to be sorry if I misinterpreted it :smile:.


#17

You are from Switzerland? Therefore I must apologise for England beating you 6-5 on penalties in the football last Sunday :laughing::blush:


#18

Yes, indeed. I am fine with that, I am really not interested in football :sweat_smile:. So you are a fan of the English team then?
I am currently watching your tutorial so it is funny to receive a message from you.


#19

Yes, I do like to watch all the England matches. Also watching the women’s World Cup at the moment - congratulations USA for your 13-0 victory over Thailand …:laughing::laughing:

Thank you. I hope there are no errors in it…!!


#20

Would it be possible to do the following:

Create an Overlay HTML filter to mirror the Matte MP4 file but in GREEN and apply the CHROMA filter to reveal the slide on V1 gradually (synchronised with the transition). Then apply the “transition” Overlay HTML filter to get the snazzy animation.

This would do away with the multiple MP4 files for different angles.

If this worked I could knock up a proper Filter with various options (angle, colors etc) that would then do away with multiple HTML files as well.