Justin Alexander
Forum Replies Created
-
Thanks Dan,
That brain of yours is magnificent!
I got my original one sorted but this new script of yours is brilliant. Thanks for sharing, I think I will have many uses for it.
Cheers
Justin
-
It seems I can’t edit joy posts.
Anyway, I have got the scale up at the inPoint working with an if else call in the below code. The only think I can’t get working is the nice little bounce at the start.
numFrames = 5;
minVal = [70,70];
maxVal = [80,80];rate = 1200;
decay = 18;
freq = .02;
rampDur = value[0]/rate;
w = freq*Math.PI*2;
n = marker.numKeys;if (time < (inPoint + rampDur)){
s = ease(time,inPoint,inPoint+rampDur,0,minVal[0])
 }else if (n > 1){
d = framesToTime(numFrames);
t1 = marker.key(1).time;
t2 = marker.key(2).time;
if (time < (t1+t2)/2){
if (time < (t1 + rampDur)){
s = ease(time,t1,t1+rampDur,minVal[0],maxVal[0]);
}else{
t = time - (t1+rampDur);
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}else{
if (time > (t2 - rampDur)){
s = ease(time,t2-rampDur,t2,maxVal[0],0);
}else{
t = (t2 - rampDur) - time;
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;}
}
}
[s,s]; -
Hi Dan, speaking of messes,
I have the following code that is working perfectly. It scales up at the first marker and scales to 0 at the second marker all with a nice little bounce that you helped me with some months ago.
What I would love is for it to be able to scale up from zero to minVal at the inPoint. However, everything I have tried has ended up with either totally messed up scales or parts of the script being ignored completely.
Thanks for everything so far, hope I am not pushing it by asking for more.
Cheers
Justin
numFrames = 5;
minVal = [70,70];
maxVal = [80,80];rate = 1200;
decay = 18;
freq = .02;
rampDur = value[0]/rate;
w = freq*Math.PI*2;n = marker.numKeys;
if (n > 1){
d = framesToTime(numFrames);
t1 = marker.key(1).time;
t2 = marker.key(2).time;
if (time < (t1+t2)/2){
if (time < (t1 + rampDur)){
s = ease(time,t1,t1+rampDur,minVal[0],maxVal[0]);
}else{
t = time - (t1+rampDur);
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}else{
if (time > (t2 - rampDur)){
s = ease(time,t2-rampDur,t2,maxVal[0],0);
}else{
t = (t2 - rampDur) - time;
s = value[0] + rate*Math.sin(t*w)/Math.exp(t*decay)/w;
}
}
}
[s,s]; -
Thanks so much Dan,
worked perfectly. I see where I was all at sea, now I can go forth and make a mess of a heap more scripts.
Regards
Justin
-
Justin Alexander
October 21, 2011 at 9:19 pm in reply to: Scale Expression with inertia bounce – start from zeroHi Dan,
Thank you so much for solving my problem.
That is absolutely what I was after.
This will save me a heap of time over the next few yeas.
Much appreciated
Justin
-
Justin Alexander
October 21, 2011 at 7:41 am in reply to: Scale Expression with inertia bounce – start from zeroThanks for the heads up.
I hate making newbie misstakes
-
Hi I have posted a question similar to this but as I am new it is awaiting moderation.
Is there a way to get this to work without the need for keyframes?
Would love to be able to apply this to dozens of layers and get it to start at the inPoint, also would be awesome to slightly change the variables with sliders to get a nice randomness about it.
Would also love to have it do the same in reverse at the outPoint with a quick little ‘bounce’ and then out she goes.