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

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

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

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

4 Likes

This is now available as a Shotcut filter for ease of use. See:

1 Like