FORUMS: list search recent posts

'ValueAtTime' along With 'Dan Ebberts Over Shot'!

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michel Salloum
'ValueAtTime' along With 'Dan Ebberts Over Shot'!
on Aug 27, 2014 at 7:15:24 pm

This maybe a very noob question..
i want to make a layer follow the rotation of other layer using 'ValueAtTime' expression. and it worked just fine.

But i also want this layer to over shot using the great expression of 'Dan Ebberts'
so my expression looked like this

thisComp.layer("Scound Squar").transform.rotation.valueAtTime(time -0.04) +value


freq = 3;
decay = 5;

n = 0;

if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
value


But it didn't work this way, the 'valueAtTime' get ignored..
I appreciate any help..


Return to posts index

Dan Ebberts
Re: 'ValueAtTime' along With 'Dan Ebberts Over Shot'!
on Aug 27, 2014 at 8:01:44 pm

That would be more like this:


p = thisComp.layer("Scound Squar").transform.rotation;
tDelay = time -0.04;
val = p.valueAtTime(tDelay);

freq = 3;
decay = 5;
n = 0;
if (p.numKeys > 0){
n = p.nearestKey(tDelay).index;
if (p.key(n).time > tDelay) n--;
}
if (n > 0){
t = tDelay - p.key(n).time;
amp = p.velocityAtTime(p.key(n).time - .001);
w = freq*Math.PI*2;
val + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
val



Dan



Return to posts index

Michel Salloum
Re: 'ValueAtTime' along With 'Dan Ebberts Over Shot'!
on Aug 30, 2014 at 7:23:47 am

Dan!! Thank you veeery very Much!


Return to posts index


Michel Salloum
Re: 'ValueAtTime' along With 'Dan Ebberts Over Shot'!
on Sep 2, 2014 at 12:48:32 pm

hello again!! so i tried to work something on my own,
so i added '+value' to the end of the equation so i can use the key-frames to animate the child-layer separately...

and it kinda worked! but sadly with no over-shot if animated with key-frames..

p = thisComp.layer("Main Squar").transform.rotaion;
tDelay = time -0.04;
val = p.valueAtTime(tDelay);

freq = 3;
decay = 5;
n = 0;
if (p.numKeys > 0){
n = p.nearestKey(tDelay).index;
if (p.key(n).time > tDelay) n--;
}
if (n > 0){
t = tDelay - p.key(n).time;
amp = p.velocityAtTime(p.key(n).time - .001);
w = freq*Math.PI*2;
val + amp*(Math.sin(t*w)/Math.exp(decay*t)/w)+value;
}else
val


Thanks in advance for all your help.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]