Activity › Forums › Adobe After Effects Expressions › terms and definitions?
-
terms and definitions?
Posted by Omnidecay on May 14, 2007 at 7:08 pmI am new to the script/expressions side of AE. I was wondering if there is a terms and definitions page out there explaining what each letter/term ment and how they corrispond with one another.
Omnidecay replied 18 years, 11 months ago 4 Members · 7 Replies -
7 Replies
-
Lord Scales
May 14, 2007 at 9:36 pmOh, I recommed the two sites I know about expressions:
http://www.motionscript.com – site of master Dan and https://www.jjgifford.com/expressions/index.htmlBut if ou are talking about variables, that are letters that we use to “capture” a value, here is a short explanation.
You can just add a variable to simplify your expression. An example: I have this in Opacity property:
(75-5*2)/2
To simplify (or maybe not) I could do this:
l = 75;
m = 5*2;
s = l-m;
c = 2;s/c
We just eliminate the parentheses. In this case the variables difficult a bit, but in some cases they’re amazing. You can give almost any name to them (there are some “illegal” terms, like “value” and “final”). I could have:
LordScales = 75;
Mom = 4*2;
sugar = LordScales – Mom;
coffee = 2;sugar/coffee
For (more information)
-
Omnidecay
May 15, 2007 at 1:17 amThat helps clrify a little bit, I still dont understand the whole .thiscomp.Layer() thing, Im gussing things like this are already programmed into AE? I was trying to link two layers together and I couldn’t figure it out. This whole scripting thing is a confusing wall to bust through. The math doesnt confuse me, its how AE reads it.
Editor>God
-
Omnidecay
May 15, 2007 at 1:25 amHow would I move a simple 100×100 box from say left to right?
Editor>God
-
Filip Vandueren
May 15, 2007 at 1:33 amFirst and foremost, remember that each expression is just a calculation. The result will be a number, or Array (mutiple numbers like a position), or sometimes text.
Being that an expression is only designed to return a result to the property it is applied to (for example, Opacity), if you want to ‘link’ two layers together as if they were exact clones (changing the value of something in one layer would have the exact result on the other): every single property of the ‘clonelayer’ would have need an expression looking up the value of the same property on the ‘masterlayer’
How does one ‘calculate’ that?Well, if you want to know the value of something else to use in your expression, you’l need to reference it like “thisComp.layer(1).position.value”
Often, the easiest way to get a reference like this is to use the “pickwhip”.But some properties of layers or compositions are not visibly represented in the timeline to pick-whip to. Like: what’s the framerate of “comp 2”, or how many pixels wide is the footage of layer 3 ?
Those properties exist though, you just have to know what their name is:
You can find the entire list of pre-programmed functions and properties in the online help (or on a pdf file on the installer CD).Some other stuff (like how Math works, or basic language constructions like if-clauses or for-loops) is not really described in the online help, but you can find plenty of javascript 101 sites all over the web to explain those.
-
Filip Vandueren
May 15, 2007 at 1:46 amTo move something, the position-property would need an expression.
Expressions don’t “set keyframes”,they just calculate values, so to have an animation (different values at different times), the property “time” has to be used in the calculation.
for example, apply this to position:
value + time*[10,0];
value = the value position has by itself, before expressions.
time is a global property. It represents the time of your comp in seconds at the current frame.
[10,0] is an array
This array represents another position or vector in 2 dimensions [x,y]:
x(left/right)=10 pixels
y(up/down)=0 pixels.
by multiplying it with time we get an array that grows 10 pixels per second.the result: the layer will start to move to the right from the start of the comp, 10 pixels per second, but will never stop.
whta if you want is to start after 4.5 seconds, and have moved 60 pixels o the right after 8 seconds, when it should stop ?
you need a more complex calculation, but After Effects’ built in functions can help us.
Take for example the function ‘linear’:value + [ linear(time, 4.5, 8, 0, 60) , 0 ]
here I even embedded the function inside the first element of the array.
Makes some sense ?
-
Darby Edelen
May 15, 2007 at 6:43 am[omnidecay] “I still dont understand the whole .thiscomp.Layer() thing”
If the periods are confusing you I’d recommend looking at other object-oriented programming languages for some insight. It’s a way to access data in an object. In AE many of these objects are predefined with certain data structures, methods and attributes.
For example,
thisCompreturns a reference to the current composition which contains other data that can be accessed using the period operator:thisComp.layer(1)Calls a method
layer()that returns the first layer associated withthisComp(the composition where the expression resides).You could add to this another period operator to access attributes/methods of the returned layer:
thisComp.layer(1).positionWill return the
positionof the firstlayer()inthisComp.For more info try the Adobe AE online help:
https://livedocs.adobe.com/en_US/AfterEffects/8.0/WS3878526689cb91655866c1103906c6dea-7a35.html
Darby Edelen
DVD Menu Artist
Left Coast Digital
Aptos, CA
Reply to this Discussion! Login or Sign Up