Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

Brownian Motion / "Random Walk"

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
Brian SmithBrownian Motion / "Random Walk"
by on Apr 23, 2012 at 10:47:29 pm

Hey All,

I have a client requesting me to do a simple animation replicating the concept of Brownian Motion. This is going to into a University where they actually study it, so it has to be quite accurate. The reference movie they sent me can be found here.

It looks simple enough, and I've actually come quite close using Particular. You can see in my screenshot the result I currently have and how I got there. I have basically parented the Particular Emitter to a Null with a simple wiggle expression for the small moves. I then parented that Null to a second Null that gives me the larger moves around the comp. My problem at the moment is that the "Larger Movement Null" is constrained to just 300 units from the comp center. I would like to constrain it to the overall comp size and say that it can't move more than say 50 pixels at a time. I want it to be able to move all over the comp, but constrain it to smaller moves to do so if that makes sense. In the reference video, the emitter never seems to move more than maybe 20 or 30 pixels at a time.

I hope this makes sense. Please let me know if you need clarification.

Thanks everyone!
-Brian

seedRandom(thisComp.layer("Large Mover Controls").effect("Random Seed")("Slider"));
//wiggle(.1,300)

wiggle(.1, 300, octaves = thisComp.layer("Large Mover Controls").effect("Octaves")("Slider"), amp_mult =thisComp.layer("Large Mover Controls").effect("Amp Mult")("Slider"), t = time)


Return to posts index
Reply   Like  

Brian SmithRe: Brownian Motion / "Random Walk"
by on Apr 23, 2012 at 11:35:57 pm

Okay, I wish I would have found this first.

I took this and placed it in, and this gets me what I need for constraining the emitter to the comp size perfectly! Now how might I constrain the distance that it travels between "segMin" and "segMax" ?

Thanks! (and sorry again for not finding this sooner.)

segMin = .2; //minimum segment duration
segMax = .6; //maximum segment duration
minVal = [0.1*thisComp.width, 0.1*thisComp.height];
maxVal = [0.9*thisComp.width, 0.9*thisComp.height];

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)


Return to posts index
Reply   Like  
+1

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]