Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Control Layer changing shape layer scale

  • Control Layer changing shape layer scale

    Posted by Mike Ben on December 13, 2013 at 4:53 am

    I’ve got a bunch of shape layers that I want to ripple on based on the background colour, using the background as a control layer.

    So like whatever the position of each shape layer is, its scale will depend on the colour of the other layer, black to white.

    Is this possible? I found an expression on a youtube tutorial by ECAbrams, which is great, however the scale animates differently going from left to right than right to left…which confused the heck outa me. (https://youtu.be/4OQN2mHQuD0)

    Thanks!

    Here’s the expression that was used in the video:

    sourceLayer = thisComp.layer("Transition Control 2");
    sampleSize = [1,1];
    samplePoint = transform.position;
    colour= sourceLayer.sampleImage(sampleSize,sampl­ePoint);
    x=colour[0]*100;
    [x,x]

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    George Goodman replied 12 years, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • George Goodman

    December 16, 2013 at 4:53 am

    Not sure what is confusing you.

    Try thinking about it like this – In your control precomp, whatever is 100% black will be a scale of 0 and whatever is 100% white will be a scale of 100. 50% grey is a 50% scale and so on and so forth.

    “|_ (°_0) _|”

    Sincerely,

    George

  • Mike Ben

    December 16, 2013 at 5:02 am

    I understand that, that’s not what I’m asking. When the control layer moves to the right (i think) all the shape layers grow or shrink almost at the same time, whereas the other direction they cascade. Which is weird and I’m not sure why it does that.

  • George Goodman

    December 16, 2013 at 3:01 pm

    Are you using the linear wipe as in the tutorial? If so, how did you change the direction? Did you just reverse the angle of the wipe?

    Are you using 3 solids like the tutorial? If so, try changing it to 2 (white and black) with a large feather or take that 80% grey he used down to a 50%.

    You said “moving” – you aren’t actually moving the position of any of the layers are you? It assumes black if there is no color information (as in a solid not covering the sample area) and if it hits a sudden color change, that could be responsible for a sudden shift

    I can’t really tell you what’s going on unless you upload a project file.

    “|_ (°_0) _|”

    Sincerely,

    George

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