ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Aligning Multiple Objects in Animation

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sasha ZelmanAligning Multiple Objects in Animation
by on Jun 18, 2012 at 1:10:37 pm

Is there a way to align elements dynamically, so the alignment happens during animation? For example I have a square from Illustrator and 4 circles from Photoshop. I would like the animation to start with these elements in random order and end with four circles aligned to four corners of the square.

Of course with so few elements I can do the whole thing with manual key framing, but this option becomes unacceptable when number of elements increase. Let's say I have 100 different polygons and I need to align 1000 different symbols to the point of polygon intersections...

Are there some expressions that assist with alignment?
Is there a way to align to individual pixels - Lets say I have random noise pattern that looks like star field... Is there a way to align some elements to each white pixel precisely? My experimentation results with density maps were unsatisfactory... since alignment was imprecise...


Return to posts index

Roland R. KahlenbergRe: Aligning Multiple Objects in Animation
by on Jun 18, 2012 at 3:13:01 pm

Hi Sasha, it's quite impossible to visualize what you are trying to achieve, based on your description. Perhaps a simplified (2-4 objects/layers) version of what you're trying to accomplish may help us to zero in on your issue and its solution.

Cheers
RoRK

Intensive AE & Mocha Training in Singapore and Malaysia
Adobe ACE/ACI (version 7) & Imagineer Systems Inc Approved Mocha Trainer


Return to posts index

Sasha ZelmanRe: Aligning Multiple Objects in Animation
by on Jun 18, 2012 at 7:18:15 pm

Sorry for the confusion... My question is rather general, since I am looking for conceptual answer rather than specific one, but I can certainly put it in rather specific form by simple example:

Given black raster layer with 10 randomly scattered white pixels is it possible to automatically align centers of 10 vector layers with the coordinates of these white pixels?


Return to posts index


Wim BruyninckxRe: Aligning Multiple Objects in Animation
by on Jun 18, 2012 at 3:47:18 pm

Hi Sasha,

maybe you can try this out:

1. I would position all your layers in a way you want them aligned
2. then i would add a null object layer ( in my example layer("Null 1").effect("RandomFactor") )with an expression effect > slider
3. on every layer i would paste the following code in the position value :

seedRandom(index,true);
rX = random(-200,200)/100 ;
rY = random(-200,200)/100 ;
[position[0]+thisComp.layer("Null 1").effect("RandomFactor")("Slider")*rX,position[1]+thisComp.layer("Null 1").effect("RandomFactor")("Slider")*rY]

which basically means : take your current position and add/subtract a percentage of a random value..
the percentage is controlled by the slider in the null object...

in the code above the random value range goes from -200 till +200 but you can change that if you want...

hope it helps,

Wim


Return to posts index

Sasha ZelmanRe: Aligning Multiple Objects in Animation
by on Jun 18, 2012 at 7:37:23 pm

I appreciate your answer, Wim. Somewhat similar solution occurred to me also - align first, then wiggle position of elements and key-frame the whole animation in reverse.A slider to control wiggle amplitude could make the whole process flexible enough for various scenarios.

But this whole approach is wrong for what I am trying to do: I have to start with random position values - some sort of noise, it is too time-consuming to manually align multiple elements to those random coordinates, so I am looking for built-in solution to align items to pixels or other items.

You see typically noise is used to DISPLACE EXISTING coordinates of elements and I am looking for a way to ACQUIRE NEW coordinates for elements, coordinates identical with coordinate values of brightest pixels of that noise.

Imagine that you have 100 star maps with thousands stars per map. Your task is to replace every star with new, better looking star graphic, but preserve the EXACT position of the original. Is there a way to do it fast in AE?


Return to posts index

Roland R. KahlenbergRe: Aligning Multiple Objects in Animation
by on Jun 18, 2012 at 10:03:09 pm

I believe that the sampleImage Expression method will be able to provide you with a solution. I suggest that you post your query at the COW's AE Expression Forums

Cheers
RoRK

Intensive AE & Mocha Training in Singapore and Malaysia
Adobe ACE/ACI (version 7) & Imagineer Systems Inc Approved Mocha Trainer


Return to posts index


Sasha ZelmanRe: Aligning Multiple Objects in Animation
by on Jun 19, 2012 at 12:44:50 am

Thank you for your suggestion. Will do.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]