Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Video in AE - Dimension/Proportion match animation

New Here ,
Sep 29, 2024 Sep 29, 2024

Hey! I'm looking to create this animation effect for some video transitions in a project. Unable to find an explanation on a how-to.

 

Is there a simple way to 'link' a video layer with dimensions of a mask/matte so they move togther (like in the example), or is the only way to acheive the video changing it's dimensions within the desired 'box outline' (as in the video changes it's centre point to fill the area proportionally) is to alter it manually and match the mask or matte keyframes with the video position keyframes. Hope that makes sense.

 

Thanks!

 

 

 

TOPICS
How to
835
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 30, 2024 Sep 30, 2024

You don't use masks, you use shape layers as track mattes. That takes care of half the work. you know, there is a parametric rectangle with rounded corners... Multiple boxes can then be linked with some expressions so they push and pull each other out of the way as one resizes. the only thing you may need to do fully manually is re-centering and scaling the underlying images for a nice zoom-in effect. It's really not that complicated.

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2024 Sep 30, 2024

This question and @Mylenium 's reply intrigued me and I wondered if it is as simple as the big M says.

As soon as I saw Shape Layers, I started thinking that Trim Paths was a better option.  This allows you to control the width without having to manage the anchor point.  But then height is still an issue.

So I tried out shape layers and with a couple of simple expressions, you can get 4 boxes to respond... but when each box grows or shrinks the video underneath would be unaffected. And that made me think a better way would be to use the layer's scale to control the box size.

 

So... I did the following:

  • Made a red solid the size of the comp
  • Set it's anchor point to -960 by -540 (I was using a 1920 x 1080 comp)
  • Set it's position to 0,0
  • This puts the anchor point in the top left corner of the solid and the comp.  Any scale changes will grow from the left and top.
  • To get the rounded corners, I added a Simple Choker and set that to about 40.  I might end up putting that on an adjustment layer if needed.
  • For the blue solid, I wanted the anchor point in the top right corner, so it was 960,540 and its position 1920,0
  • Then I linked the blue's scale to the red's using this expression:
100-thisComp.layer("Box 1").transform.scale;​
  • For the green, it's anchor was -960,540 and position 0,1080 and its scale expression:
    X = value[0];
    Y = 100-thisComp.layer("Box 1").transform.scale[1];
    [X,Y]​

    This allows the X / width scale to be keyframed while the Y scale is driven by the red solid.



  • For the final purple box, the anchor is 960,540, position: 1920x1080 and the scale:
    X = 100-thisComp.layer("Box 3").transform.scale[0];
    Y = 100-thisComp.layer("Box 1").transform.scale[1];
    [X,Y]​

 

boxes.png

 

This gives me 4 boxes, all on their own layer for matting and any videos I choose to add can be set to be parented to the corresponding layer to scale as needed.

 

Here's the project with all 3 options (comp 3 is the one above) : https://www.dropbox.com/scl/fi/wwt4anhl85niwlvawrwjv/Matte-boxes.zip?rlkey=y1szjh9yohmrxmcb607avoase...

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 02, 2024 Oct 02, 2024

Hi,

Appreciate the detailed response!

 

I'm obviously not an expert at AE, so thank you for explaining. With your file I'm running into the problem (vid attached) where the video I place within the matte and parented to the box distorts along with the scale animation. I'm sure there is a way to fix this that I'm not aware of, and I understand that to get around that I could animate the position and scale of the video itself seperately. I just thought AE might have an effect / expression that could get around this for quicker workflow (expressions is something I'm somewhat new too).

 

I'm basically trying to animate something like the original video I posted and the 2nd one I have attached to this reply. Animations originally created in Figma for a 4 screen video wall display where scale is animated and the video file is 'linked' to frame scale to move around but not distorted or stretched.

 

Thanks again,

G

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 05, 2024 Oct 05, 2024
LATEST

I'm sorry, I've had a couple of nightmare days at work and not had any time to respond.  After putting together the original comp I shared, I've resvisited and and added in a few extra touches.  The centre of each video now remains in the centre of each box, so you don't have to adjust the positions.  You still need to adjust the scale, but that's partly because I prefer to have some control and lets you use each video's anchor point to alter positioning if needed.

 

https://www.dropbox.com/scl/fi/n4petyzh78m295z7yiksc/Matte-boxes.zip?rlkey=7u4d3zz9ukyyqyb1el9bnroxy... 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines