FORUMS: list search recent posts

automation of objects scaling or flipping

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Darius Kirschner
automation of objects scaling or flipping
on Jul 7, 2016 at 5:01:28 pm

I am trying to have the hexagons and squares either scale in and out or rotate to reveal footage behind them. Is there any quicker way or plugin that would help do this instead of keyframing each one.

Thank you very mcuh

Return to posts index

Kevin Camp
Re: automation of objects scaling or flipping
on Jul 7, 2016 at 9:27:08 pm

card wipe and card dance will break up a layer into a grid of 'cards' and flip and/or scale those cards.

if you are unfamiliar with either, card wipe is a little easier to manipulate without checking out some tutorials (though, you might want to look up a few).

the tricky part for your pattern is that you'll need to break up your octagon-square pattern into two layers (or pre-comps), one with just octagons and the other with just squares, apply card wipe to each and find a grid spacing/size the will lineup with both patterns.

after that it's pretty straight forward, you'll time up the transition completion property so that it looks like both layers are flipping off together.

card dance has more robust 'card' manipulation, but you'll control the card attributes with gradient maps, which (if you haven't used them before) have a bit of a learning curve.

if you like expressions, you can control layer properties like rotation and/or scale with a gradient layer/map and a sampleImage() expression.

assuming that your shape pattern i made of individual layers and each layer has it's anchor point in the center of it's shape, it wouldn't be too hard to set up.

first you'll want to create a layer to use as a your gradient map, so create a new comp, name it "Layer Map", add a comp-sized solid and for simplicity add the linear wipe effect, animate the transition from 0-100 and set the feather to 200 (or so).

So now you have a solid that wipes off the screen. drop that comp into the comp with your shapes and hide it (we'll direct the expression to it, but you won't need to see it).

select one of your shape layers twirldownd the properties to the scale property, select it and choose animation>add expression. In the expression field copy/paste the following:

map = thisComp.layer("Layer Map");
v = map.sampleImage(position, radius = [.5, .5])[3];
s = linear(v,0,1,0,100);

if you scrub through the timeline, that layer should scale down as the Layer Map wipes off.

to get that expression on the other octagons and squares, select the scale property that has the expression and choose edit>copy expression only. then select all the octagons and squares and choose edit>paste.

they should now all scale down as the layer map wipe off.

to explain the expression a bit, the first line just sets the layer that will act as the map.

the second line is sampling the alpha channel of the map at a single pixel at the point where the octagon or square is positioned. radius=[.5,.5] is one pixel, and the [3] is returning the alpha component of and RGBA layer, setting that to [0] would look at the red channel, for instance.

the third line is converting the value of the alpha channel (a value between 0 and 1) to a scale value (0 to 100)

and the last line just make the x and y scales the same value (s).

you can change the animation of the layer map any way you want it... you could change the angle of the linear wipe, or have a circular mask cut a hole in the solid and grow outward to fill the screen or a bunch of smaller layers fading away... and when you go back to the comp with your shapes, they should scale based off the new animation in the Layer Map comp.

Kevin Camp
Art Director

Return to posts index

Darius Kirschner
Re: automation of objects scaling or flipping
on Jul 14, 2016 at 2:55:02 pm

Hello Kevin,

Wow what a great response. This setup is great. I decided to use the expression route because I gives me the most freedom to created my own masks. One question I have..... The expression you gave me is great for the scaling. Is there an expression I could use to make the transition look like the card wipe. Where the individual pieces flip. Not sure if i would have to make every element 3d. Also I am guessing they would have to disappear at once they are 90 degree to the camera.
Not sure this is possible but just wanted to know.

Thank you,
Darius Kirschner

Return to posts index

Darius Kirschner
Re: automation of objects scaling or flipping
on Jul 19, 2016 at 6:15:22 pm

anyone have any ideas on how to make it spin in 3d space?

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved