Activity › Forums › Adobe After Effects Expressions › scaling at marker specified time.
-
scaling at marker specified time.
Posted by Rosy Singh on April 29, 2008 at 7:41 amHi,
I have a small problem in my current project. I have 113 layers in my composition and i want each one of them to scale from 0 to 100% over 20 frames but at times that i will mark on the layers. Is it possible to do this without giving keyframes for each layer and using an expression instead.
Also is it possible to slightly rotate the layer from + or – 10degs to its current angle as it is scaling.
Thanks in advance,
Rosy.Ran Ben avraham replied 18 years ago 3 Members · 7 Replies -
7 Replies
-
Dan Ebberts
April 29, 2008 at 1:08 pmTry this:
numFrames = 20;
minVal = [0,0];
maxVal = [100,100];if (marker.numKeys > 0){
t1 = marker.key(1).time;
t2 = t1 + numFrames*thisComp.frameDuration;
ease(time,t1,t2,minVal,maxVal)
}else{
minVal
}I’m not sure exactly what you mean with the rotation, but it should look similar:
numFrames = 20;
minVal = -10;
maxVal = 0;if (marker.numKeys > 0){
t1 = marker.key(1).time;
t2 = t1 + numFrames*thisComp.frameDuration;
value + ease(time,t1,t2,minVal,maxVal)
}else{
value + minVal
}Dan
-
Rosy Singh
April 30, 2008 at 5:49 amHi Dan,
I tried the first script and it works beautifully. It scales at exactly where the marker appears.
I’m sorry I couldn’t convey the rotation bit properly. What I meant was that as the layer is scaling up it also rotates by 10 degrees.
Also as I applied the expression I realised that instead of the constant scale up of the layer, what would look really nice is if the layer scales from 0 to 110%in the first 10 frames and then gradually settles down to 100% in the next 10 frames.
Maybe I’m asking for too much, but in the name of good animation I’m going ahead and asking anyways.
Thanks a tonne Dan for your help, I wouldn’t have moved forward in my project without it.
Thanks,
Rosy. -
Ran Ben avraham
April 30, 2008 at 6:32 amIf i understood you correctly, all you need to do is –
create a null object, connect all your layers to the null object And scale, rotate, change position the null object as you wish – It will effect all the other layers.Hope that helps you.
Ran Ben Avraham. -
Rosy Singh
April 30, 2008 at 11:22 amHi Ran,
Thanks for your response.
I could have connected all the layers to the Null Object for the various animations but the only catch is that i want the animations to happen at different times for each layer. I don’t think that a null will help in that case unless there is a way to use a null and define the timing with the markers.
Thanks,
Rosy. -
Dan Ebberts
April 30, 2008 at 1:23 pmLike this:
numFrames = 20;
minVal = [0,0];
maxVal1 = [110,110];
maxVal2 = [100,100];if (marker.numKeys > 0){
t1 = marker.key(1).time;
t2 = t1 + numFrames*thisComp.frameDuration/2;
t3 = t1 + numFrames*thisComp.frameDuration;
if (time < t2){ ease(time,t1,t2,minVal,maxVal1) }else{ ease(time,t2,t3,maxVal1,maxVal2) } }else{ minVal } Dan -
Rosy Singh
May 1, 2008 at 12:59 pmHey Dan,
That’s really coll it works perfectly!.
Thanks once again, you’re the coolest!!
Rosy.
-
Ran Ben avraham
May 2, 2008 at 9:03 amSorry cant help you there.
If you do come to a solution, i would love to know about it.
Good luck.
Ran Ben Avraham.
Reply to this Discussion! Login or Sign Up