ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Can you displace size (like you can time displace)?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stephen ZippeCan you displace size (like you can time displace)?
by on Mar 16, 2015 at 3:27:03 pm

I try to figure out if I can use a gradient to displace the size of an object. I want that the black is 100% of the size and the white is 0% of the original size. Is that even possible to do?

Thank you for your help,
Stephen


Return to posts index

Michael SzalapskiRe: Can you displace size (like you can time displace)?
by on Mar 16, 2015 at 5:51:24 pm

You can use the Displacement Map effect to push pixels around. It wouldn't be a simple black to white gradient though. You would need to use multiple color channels to push the pixels the way you need them to go.

However, it would be much easier to put your image in a precomp and animate it moving upward (or whatever) and apply a distortion effect (like Mesh Warp or Bezier Warp) to the precomp so that as your layer moves up, it gets smaller.

- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')

No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.


Return to posts index

Kevin CampRe: Can you displace size (like you can time displace)?
by on Mar 16, 2015 at 8:53:33 pm

there is a function called sampleImage() that can take the pixel values from another layer and use them in an expression... so you could use that to effect scale.

try something like this as an expression for the scale property:

gradient = thisComp.layer("My Gradient");
lightness = rgbToHsl(gradient.sampleImage(position, radius = [.5, .5], postEffect = true, t = time))[2];
value * (1 - lightness)


you'll just need to change "My Gradient" in the first line to the name of your gradient layer.

also, the expression could get thrown off if the layer is parented to another layer, or either are 3d layers.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index


Stephen ZippeRe: Can you displace size (like you can time displace)?
by on Mar 17, 2015 at 12:50:08 pm

Thank you Michael and Kevin.
Appreciate your help and advice.
Stephen


Return to posts index

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