2 Replies Latest reply on Jun 11, 2013 9:03 AM by Rick Gerard

    Altering pick-whip values so they aren't 1:1

    cmubrew2

      Just wondering how to tie one value (for example scale) to another (for opacity) but make it so it's not a 1:1 relationship where 50% scale always = 50% opacity.

       

      Say for example, if I wanted opacity to always be 10% above whatever was set to scale.  While I'm not very good at writing expressions manually, I've been relying on the pick-whip tool to create these kinds of relationships and would now like to know the easiest way to "off-set" them by a value.

        • 1. Re: Altering pick-whip values so they aren't 1:1
          Todd_Kopriva Level 8

          Use the pickwhip and then edit the expression to add your offset. For example, in the case of wanting "opacity to always be 10% above whatever was set to scale", you'd just multiply the default expression created by the pickwhip by 1.1, using the * (multiply) operator.

           

          See "Expression basics"

          • 2. Re: Altering pick-whip values so they aren't 1:1
            Rick Gerard Adobe Community Professional & MVP

            All the pickwhip does is copy values. You can apply any math operator to that value. It's important to remember that you're creating an array when any value has more than one property.

             

            You can also any of the math tools built into AE Expression Library which is accessed in the timeline. For example you can take a value of 1 to 100 and make that scale from 0 to 20 by using an expression like this:

             

            pw = thisComp.layer("layer 1").transform.opacity;

            v = linear(pw, 0, 100, 0, 20)

             

            pw is the value you get from the pickwhip pointing to Layer 1's opacity value.

            v is the new value which is a linear interpolation of the values between 0 and 100 from layer one to a new value between 0 and 20. IOW when layer 1 is at 50 the value of v will be 10.