Skip navigation
Currently Being Moderated

Opacity random motion, ok! and loops?

Aug 29, 2012 11:13 AM

Tags: #random #motion #opacity #loops

Hi there!

I'm using an expression by Dan Ebberts, thanks Dan!

This expression works great, but the problem is that It's not a loop.

I need to do a loop to 4500 f. I try to use time % loopTime, but it doesn't work.

Does anyone have any idea how to do this?

Thanks!


Expression below:
segMin = .3; //minimum segment duration
segMax = .7; //maximum segment duration
minVal = 10;
maxVal = 100;

end = 0;
j = 0;
while ( time >= end){
  j += 1;
  seedRandom(j,true);
  start = end;
  end += random(segMin,segMax);
}
endVal =  random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
startVal =  random(minVal,maxVal);
ease(time,start,end,startVal,endVal)

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points