What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

After Effects Wiggle at specific time


JustinR

Active Member
Messages
28
Likes
3
So I wrote this expression:

Code:
timeToStart = 1; 
  if (time > timeToStart){ 
     a =  wiggle(3,100);  
    [a[0],value[1],value[2]];
  }else{ 
      value; 
  }

But I want to start wiggling at 1.3s. After var. timeTostart change wiggle still starts at 1s. So how to format time properly that I could start at more specific time?
 
I set an expression for a shape:
Code:
 wiggle(3,100);
Shape wiggles, but wiggling begins and lasts all the composition time. I want to control when wiggle starts. So I write this:
Code:
timeToStart = 1;    if (time > timeToStart){       a =  wiggle(3,100);       [a[0],value[1],value[2]];   }else{        value;    }
Now shape stats to wiggle after 1s (timeToStart = 1).
I need to start wiggle after 1:30s Unfortunately when timeToStart is set to 1,30 or 1:30 it still rounds back to 1 so shapes starts to wiggle after 1s.
How can I make AF to understand that I need to start wiggle at 1:30s.
 
what is your composition set up are you in mins seconds or frames normally your 1.3 could be right but if you have wrong units set up then it could be 0:90 for seconds
 
Last edited:
or maybe an easier option is to just keyframe an empty Null object and pig tail whip to it. without knowing exactly what your doing hard to say what is best. I think video copilot do a free course on expressions and wiggle commands.
 
Thanks Hoogleman for response. Neither 1.5, 1,5, 1:5, "1:5" worked, but I thought about idea of counting frames and I wrote this:

Code:
frames = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);

timeToStart =31;   
  if (frames> timeToStart){ 
     a =  wiggle(3,100);  
    [a[0],value[1],value[2]];
  }else{ 
      value; 
  }
So now I check how many frames have passed, if my composition frame rate is 15 frames per second I can easily calculate the start time of wiggle.
Example: 30 / 15 = 2 after 2 seconds wiggle will start.
Example: 35 / 15 = 2 after 2,(3) seconds wiggle will start and so on...
 
the time frame should be simple though so has this corrected it or are you still having problems However as I believe an expression is amount of wiggles per second so maybe it will always round up or round down. But here is what I think it should be but I have not got after effects on my laptop to test it out. and tweak the values to whatever works best for you. Other than this I am out of ideas.
timeToStart = 1.5; if (time > timeToStart){ wiggle(3,100); }else{ value; }and then to end animation should be something like this
timeToStop = 4; if (time > timeToStop){ value; }else{ wiggle(3,100); }
 
Everything works great, now I can control when wiggle starts and ends by counting frames. So cheers! ;)
 

Back
Top