Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions interactive scale and position expression

  • interactive scale and position expression

    Posted by Jacques Levet on May 3, 2008 at 3:04 pm

    Hi, this is my very first post on the forum.
    I am working on a animation made of 100 layers arranged vertically. They are slices of images that are arranged to create a portrait (like a police composite sketch). Ideally I would like to figure out a way to make the layers interact with each other. When one of the slices (a picture with a mask or a matte applied to it) opens up to reveal the full image, the slices on either sides move and scale down as if they are being pushed aside. Is there a way to create an expression that would make this process possible? The matte or mask grows revealing the pic that the slice is made of while the other move and scale down in relation.Thank you in advance for your responses.

    Dan Ebberts replied 18 years ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    May 3, 2008 at 10:49 pm

    Yeah, tricky though. You’d have to use mattes because the expressions wouldn’t be able to determine the size of masks. Basically the expressions (scale and positon) would have to look at all the mattes, check if one (other than its own) is scaled up, and react accordingly – depending on whether the scaled matte is upstream or downstream. Some of the details would depend on your specific setup. A bit of work, but certainly possible.

    Dan

  • Jacques Levet

    May 5, 2008 at 4:04 pm

    Thank you Dan!
    I am trying to simplify the problem a little bit
    Ideally I would like the mattes (all 105 of them) to randomly scale up and down in height in relation to each other, so that the animation stays within the comps height. Would you have any suggestion on how to achieve these results?
    Thank you in advance
    Jacques

  • Dan Ebberts

    May 5, 2008 at 4:49 pm

    Since there is so much interaction between the differnt layers, I’d be tempted to manage everything within one master expression applied to a text layer (with visibility turned off). The expression would calculate the y scale of each layer and then “publish” the results as a comma-delimeted list of 105 values. A scale expression applied to each layer would read its own y scale, using .split(“,”) to break the string into an array, using its own layer index (minus one) as an index into the array and then use parseFloat to convert the string to a number.

    A fair amount of work, but probably easier that having the scale expression for each layer reacting to the scale of the other layers.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy