Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions An expression problem…

  • An expression problem…

    Posted by Erin Shelby on March 31, 2006 at 5:31 am

    The problem being…

    I have two layers, I want one layer’s rotation to be dependant to another layer. Layer 1 will only rotate from 0 to -80 (negative 80), and the thing is I want layer 2 (the affected layer) to rotate from 0 to 60, proportionally. Do you understand?

    So if Layer 1 is at -80, Layer 2 should be at 60. If Layer 1 is at -40, layer 2 should be at 30…

    I’m just not sure how to impliment this in expression land…

    Erin Shelby replied 20 years, 5 months ago 3 Members · 4 Replies
  • 4 Replies
  • Mylenium

    March 31, 2006 at 5:49 am

    Interpolation methods perhaps? You really need to read up on that stuff and dig into the generics a bit more (no offence). Try this:

    ref_rotation=thisComp.layer(“Layer 1”).rotation;
    my_rotation=linear(ref_rotation,-80,0,0,60);

    [my_rotation]

    Mylenium

    [Pour Myl

  • Erin Shelby

    March 31, 2006 at 6:20 am

    no offense taken! I’ve been using pick-whip most my time and have just figured out how complex this stuff can get. Thank yous!

  • Mike Clasby

    March 31, 2006 at 7:50 am

    I like you am learning how complex expressions can be, I suggest you get a hold of the Meyers Book, Volume2 (3rd edition) and the chapter on expressions (and the bonus chapter) is very enlightening. Much to digest. If you’d have known about linear interpolation (making one set of values proportional to another, you could have figured out your expression with pickwhipping and the “Expression Language Menu” (that little triangle next to the pickwhip).

    Linear Interpolation is just figuring out how to translate the -80 to 0 degree rotation of the one layer to the 0 to 60 degree rotation of the other layer.

    The linear interpolation from “Expression Language Menu” is:

    linear(t, tMin, tMax, value1, value2)

    then you’d highlight the “t” and pickwhip that to the rotation of the layer that rotates (the -80 to 0 layer, I used a White Solid) to get:

    linear(thisComp.layer(“White Solid 1”).rotation, tMin, tMax, value1, value2)

    then you plug in the values, -80 and 0 (t min, tmax, again the White Solid) and the 0 and 60 (value1, value2) to get your final expression:

    linear(thisComp.layer(“White Solid 1”).rotation, -80, 0, 0, 60)

    Get a copy of:

    Creating Motion Graphics with After Effects, Volume 2: Advanced Techniques

    by

    Trish and Chris Meyer

    Then you will be aware of what’s possible and maybe can inkle it out yourself.

  • Erin Shelby

    March 31, 2006 at 10:08 pm

    The “Expression Language Menu” has always scared me, but I think I am ready now to dive in and learn more about it. It is talked about much in this book? Or do you know of a website that goes over most of those Expressions?

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