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

Super basic expression to scale over time

Community Beginner ,
Jul 31, 2021 Jul 31, 2021

Hi folks

An embarrisingly simple one that I'm struggling to find an answer to online.... I want to scale a layer over time, so if I change the length of the layer I don't need to keep moving keyframes. I know for Rotate it's just "time*2", but using this on Scale I get an error "expression result must be of dimension 2".  Clearly this is because there is X and Y.  Can you tell me how to do this please?

Many thanks in advance!

TOPICS
Expressions
14.8K
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

correct answers 1 Correct answer

Community Expert , Jul 31, 2021 Jul 31, 2021

Do you want it to scale between the in point and the out point of a layer?

Do you want to constantly increase the scale over time?

 

The time value is in seconds so if you just wanted the layer to increase 5% in scale every second the expression would look like this:

 

t = time - thisLayer.inPoint;
v = t * 5;
[value[0] + v, value[1] + v]

 

 If you want the layer to expand by 50% between the in point and the out point the expression would look like this:

 

t = time;
tMin = thisLayer.inPoint;
tM
...
Translate
Community Expert ,
Jul 31, 2021 Jul 31, 2021

Do you want it to scale between the in point and the out point of a layer?

Do you want to constantly increase the scale over time?

 

The time value is in seconds so if you just wanted the layer to increase 5% in scale every second the expression would look like this:

 

t = time - thisLayer.inPoint;
v = t * 5;
[value[0] + v, value[1] + v]

 

 If you want the layer to expand by 50% between the in point and the out point the expression would look like this:

 

t = time;
tMin = thisLayer.inPoint;
tMax = thisLayer.outPoint;
sclVal = linear(t, tMin, tMax, 0, 50);
[value[0] + sclVal, value[1] + sclVal]

 

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 Beginner ,
Jul 31, 2021 Jul 31, 2021

Wow that is so helpful Rick!  I'd never have worked that out on my own.  The first one was perfect and I changed v = t * 5; to v = t * 1;  so that the text I have slowly scales larger in frame regardless of the clip length.  Appreciate you taking the time to reply.

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 ,
May 13, 2023 May 13, 2023

Bringing up an oldie but goodie here. Rick's scale expression workes great but I want to control the frame range where scaling occurs.

I have many followers in a chain that are entering frame along a 3D path, rotating around a layer and then exiting the opposite side of the frame. As they rotate around, I want them to scale slightly, then return to original scale as they pass behind the layer. Since each follower crosses at a different time, I was thinking I could make this work with 2 markers. So as each follower encounters the first marker, it would scale as defined in a scale expression, then be back at it's original scale as it encounters the second marker and continue on. And moving the markers would easily adjust the range for quick adjustments if the timing of the overall animation changes.

 

Possible?

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 ,
May 13, 2023 May 13, 2023
LATEST

Guitarnut_0-1683992904618.png

 

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