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


#21

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!


#22

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


#23

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.


#24

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


#25

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.


#26

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:


#27

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)


#28

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.


#29

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