Activity › Forums › Adobe After Effects Expressions › How to edit this expression
-
How to edit this expression
Posted by Muhammad Mont on November 22, 2020 at 2:40 pmI found this expression written by Mr.Dan
The object jumps from one position to another
How can I edit it to make the object moves smoothly between every position!!
Thanks.
Muhammad Mont replied 5 years, 5 months ago 2 Members · 6 Replies -
6 Replies
-
Muhammad Mont
November 22, 2020 at 2:45 pmYes sorry here it is,
minInt = 120;
maxInt = 240;
minAmp = 3;
maxAmp = 7;
minDur = 5;
maxDur = 10;
fade = .5;
prev = next = inPoint;
seedRandom(index,true);
while (time >= next){
prev = next;
next += random(minInt,maxInt);
}
seedRandom(prev,true);
amp = random(minAmp,maxAmp);
dur = random(minDur,maxDur);
w = wiggle(5,amp);
t = time – prev;
if (t < dur/2)
ease(t,0,fade,value,w)
else
ease(t,dur-fade,dur,w,value);
-
Dan Ebberts
November 22, 2020 at 3:53 pmI don’t see any jumping. What behavior are you looking for exactly?
-
Muhammad Mont
November 22, 2020 at 4:10 pmI want object to travels on the screen x and y randomly with smooth movment
And makes me control movment and hold duration
-
Dan Ebberts
November 22, 2020 at 6:35 pmThat’s still pretty vague. See what you think of this one:
holdDur = .5;
minDur = 1.0;
maxDur = 1.5;
seedRandom(index,true);
tNext = tPrev = -random(minDur);
while (tNext <= time){
tPrev = tNext;
tNext += random(minDur,maxDur);
}
vMin = [0,0];
vMax = [thisComp.width,thisComp.height];
seedRandom(tPrev,true);
vPrev = random(vMin,vMax);
seedRandom(tNext,true);
vNext = random(vMin,vMax);
ease(time,tPrev,tNext-holdDur,vPrev,vNext);
-
Muhammad Mont
November 22, 2020 at 8:12 pmYes its exactly what I want,
Like screen saver movment in pc or No signal in lcds
Thank you so Much Mr Dan
Reply to this Discussion! Login or Sign Up