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

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.

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

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.

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…

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

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:.

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

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.

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…!!

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.

1 Like

Everything is fine. I just would add to the description that the Overly HTML filter is named differently now.
And the newest part had useful bits to improve my skills, so thanks!

As I understood so far, you don’t want to use the preset “Diagonal”-Transition and lay your stripes over it? Why?

You can fit the stripes motion to the diagonal transition which works fine. So I will use it if I am fine with this angle.
But if you want another angle, though, you have to use this approach. In DEMO 2 the different angles are shown.

Hi @elusien, Now that seems a super idea! I’m presuming you mean putting two filters on one clip - an HTML filter (with the green colour swiping across a transparent background), and a chroma filter to make the green transparent, then another html filter on a transparent clip with the snazzy blue stripe?

The idea is cool - I will experiment with it when I get a moment and see if it would work. Thanks!

Hi @dvs ,
Yes, as @samth says, using a diagonal transition works fine for a stripe angle of 30% - although I just tried it and it took quite a bit of tweaking the lengths of the transition and the HTML clip to sync the timing - see this short demo for how the tracks need to be positioned. However, as @smith also mentioned, you are restricted to that angle.

https://streamable.com/4nckx
https://streamable.com/4nckx

I’ve been messing about with CSS3 animation filters and doing a 1-off for your filter should not be too much effort.

exactly.

If the chroma filter idea works then doing the synchronisation for any angle is a doddle, as it can be 1 more green DIV that you can show or not depending on which type of filter you wanted - the chroma key mask or the transition filter itself.

Hi @elusien,

Did some testing - I designed a html “swipe” with a pink rotated box which slides across from left to right (pink, not green, because I tried green, but the test clip I used had some green in it and it made bits of it transparent, so changed the green to magenta).

In the demo below, the background is yellow:

https://streamable.com/cbb6c

Next I set up SC as per demo below and applied the HTML file (background=transparent) to V2, then added a chroma filter, and chroma-keyed out the magenta. I had to tweak the speed of movement of the pink box slightly to correspond with the blue swipe as follows:

0% : {opacity:1; width:2800; height:2600; left:-180%; top:-90%;webkitTransform:rotate(30deg);},
20% : {opacity:1; width:2800; height:2600; left:-180%; top:-90%;webkitTransform:rotate(30deg);},
70% : {opacity:1; width:2800; height:2600; left:-10%; top:-90%;	webkitTransform:rotate(30deg);},
100% : {opacity:1; width:2800; height:2600; left:-10%; top:-90%;webkitTransform:rotate(30deg);} 

Finally on V3 is a transparent clip with the blue diagonal stripes set at the same angle (30% rotation).

Result:

https://streamable.com/6av73

Is this similar to what you had in mind? Adding the chroma key to the HTML on the same clip seems to work…:smile:

PS my HTML code in full:
Pink sliding box 30 per cent rotation 20 per cent delay 70 per cent exit YELLOW background.zip (827 Bytes)

Yes, that’s exactly what I had in mind. I would make the Chroma color a parameter of the filter, so you could choose any color. Since it is a Javascript animation I can relatively easily tailor the swipes to match, no matter what angle is chosen. The filter would have the following parameters:

  • Framerate (this is required for all CSS animations)
  • Length of swipe (in seconds)
  • Angle of swipe
  • Main color (lightblue in your demo)
  • Stripe color

Give me a few days and I’ll see what I can come up with for you to try, and make suggestions.

That’s really great, @elusien. Thank you!

In the meantime I’ve done some work on my blue diagonal stripe wipes. I’ve created HTML code for not only Left to Right swipes, but also Right to Left, one for each of the angles 30%, 60%, 70% and 90%(vertical).

Also, I made up a folder called “JONRAY Diagonal stripe transition TOOLKIT”,

and inside it I added subfolders such as “01 Left to right 30 per cent rotation”, “02 Left to right 60 per cent rotation” etc, etc.
Then, inside each subfolder are 4 files:

  1. The HTML file for that particular swipe effect,
  2. A corresponding Matte (black and white) MP4 file with duration 2 seconds (FAST wipe),
  3. A corresponding Matte (black and white) MP4 file with duration 3 seconds (MEDIUM wipe),
  4. A corresponding Matte (black and white) MP4 file with duration 4 seconds (SLOW wipe).

I made this for my own use but I have also uploaded it to Dropbox so anyone here can make use of it f they wish.

I hope using it will be straightforward if you follow the instructions I gave in post #9 of this thread:

Just make sure the clip on v3 with the added HTML file matches the length of the Matte MP4 (ie 2 seconds for a FAST wipe, 3 seconds for a MEDIUM wipe, or 4 seconds for a SLOW wipe).

I Made this demo using it :

https://streamable.com/n243v

https://streamable.com/n243v

Link to the “JONRAY Diagonal stripe transition TOOLKIT” folder:

5 Likes