Activity › Forums › Adobe After Effects › Random position thingies
-
Random position thingies
Posted by Moog Gravett on March 30, 2006 at 5:47 pmHi folks,
I have a quick question (hopefully…
I want to take a comp of an Illustrator graphic, and have a number of duplicates appear at random positions (and sizes) within another comp over time.
Any nice clean ways of doing this??
cheers cats
moog xx
Moog Gravett replied 20 years, 1 month ago 2 Members · 2 Replies -
2 Replies
-
Mike Clasby
March 31, 2006 at 1:33 amIt sounds like you want the layers to appear at random sizes at random positions and hold that for awhile, then change again, if so here’s some expressions. If you want the layers to change size while on the move see the bottom of the post for Dan’s excellent site.
Just put the illustrator file into the comp you want it to appear in, then add these expressions’ the first one for position, the second for scale:
holdTime = .5; //time to hold each position (seconds)
minVal = [0.1*thisComp.width, 0.1*thisComp.height];
maxVal = [0.9*thisComp.width, 0.9*thisComp.height];seed = Math.floor(time/holdTime);
seedRandom(seed,true);
random(minVal,maxVal)————————————————————-
holdTime = .5; //time to hold each position (seconds)
minVal = 50;
maxVal = 200;seed = Math.floor(time/holdTime);
seedRandom(seed,true);
random(minVal,maxVal)
s = random(minVal,maxVal);
endVal = [s,s];————————————————————
Then just dup the layers (Ctrl D) to get as many as you want. The way its setup all the layers will change at the same time, if you want different times for each layer, change the “hold time”, I’d change the “hold time for both position and scale the same for a layer, unless you want the layer popping to a new size while still in the same position.
Also if the timing is still to much in sync, slide some of the layers, up or down the timeline, so they start at different times.
For scale you can also change the minimum and maximum sizes (in pixels).
These are modified a bit from Dan’s site, and maybe one of his many samples are more to your needs.
https://www.motionscript.com/mastering-expressions/random-1.html
-
Moog Gravett
March 31, 2006 at 8:37 ambrilliant! that sounds exactly what I need – thanks for your time, I’ll be giving that a go rrrreal soon 😀
moog
Reply to this Discussion! Login or Sign Up