ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Transform multiple layers randomly with one control?

FAQ   •   VIEW ALL
 Transform multiple layers randomly with one control? on May 2, 2014 at 12:38:14 am

Basically, I'm wondering if there's an expression or script that would allow me to transform multiple layers randomly with one control--much the way Wiggle Transform will do for groups in a shape layer--so I could have a lot of elements explode out in different directions and with different rotations, and then have them snap back into their original formation, without having to individually animate keyframes. Kind of similar to what a randomize function can achieve in C4D. Kinda.

Thanks!

 Re: Transform multiple layers randomly with one control?on May 2, 2014 at 2:30:07 am

It sounds like it's possible via expressions. I'd ask on the AE Expressions forum:

You'll get a more authoritative & speedier answer there.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA

 Re: Transform multiple layers randomly with one control?on May 2, 2014 at 10:59:25 amLast Edited By John Cuevas on May 2, 2014 at 10:59:56 am

These two scripts can be used to assign random start positions.

Randomizer

Distribute Layers

Johnny Cuevas, Editor
Thinkck.com

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.

 Re: Transform multiple layers randomly with one control?on May 2, 2014 at 1:28:45 pm

Here's my method. Use an expression on each transform control with the following basic formula:

underlying value + (unique random offset * shared control)

The shared control impacts the amount of unique random offset each transform gets. When it's 0, no transforms are made and it remains at its original underlying value.

7435_singlecontrolrandompositionrotationcs6.aep.zip

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events

 Re: Transform multiple layers randomly with one control?on May 5, 2014 at 1:25:01 pm

I'd use something like this, then precomp it, and use a time remap. This will use the initial value as an end point, and assign a random start point.

moveDuration = 1;
wiggleAmp = 100;
wiggleFreq = 3;

seedRandom(index,true);
w = wiggle(wiggleFreq,wiggleAmp)-value;
startPos = random([thisComp.width,thisComp.height]);
ease(time,inPoint,inPoint+moveDur,startPos + w,value)

"|_ (°_0) _|"

Sincerely,

George

http://www.vimeo.com/georgegoodman