-
Basic expressions question: I wanted to scale. got it done, but don’t understand why it worked…
Hello, i’m new to AE and expressions. I’m trying to make some very basic things, partially in order to understand the basics of the expressions language. I’m trying to learn from different sources online, including this site – all are good but i still can’t find the answer to this basic case:
I was trying to write a very simple expression that will scale a layer (x,y,z all together) from [value] at the inPoint, to the [value+20] at outPoint. my first and most simple plan was to use something with ‘+20’ in it. I’ve tried it in different ways, including defining x,y,z (and then using them inside the expression) , and including using ‘+20’ in different ways inside the expression, but all i got was either error msgs OR i got only the x scaling, with the y and z not changing.
i’ve tried it with both locked and unlocked aspect on the scale parameter (via checking and unchecking the little chain button), and got no different results.the only thing that DID work for all the 3 parts of the scale array (x,y,z) was this simple expression:
linear(time,inPoint,outPoint,value,value*1.2);so – i got the job done, but i do not understand some very basic about the expressions language:
1. why multiplication (*) worked, but addition (+) didn’t work?
2. how could i still use the (+) or (-) in order to control the scaling of this layer? how should i write the expression for something like that?
3. what if i wanted each of the 3 parts of the scale array to act differently? for example 1 to go +20, another to go -20 and the third to stay the same.thanks!
Ori.