Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions iTunes Coverflow Expression and x-position easing

  • iTunes Coverflow Expression and x-position easing

    Posted by David Gudelius on January 7, 2008 at 11:27 am

    Hi there,

    I am blatanly new to After Effects expressions and scripting in general, and I’ve got a really tricky issue for me.
    I downloaded the great expression provided by “dinner” here:

    https://forums.creativecow.net/readpost/227/7142

    It all worked fine after translating the “Slider Control”- and “Slider”-terms to the correct german translation… what a nonsense, by the way.
    Basically, the xPos of a solid is controlled by a slider in an upper comp, and here is the expression:


    x=comp(“REFLECT_COMP”).layer(“Null 1”).effect(“Slider Control”)(“Slider”);
    range=300; //range when Z begins
    center=thisComp.width*0.5; //center of comp on X axis
    distance=x-center;
    Zdist=400;

    if (x <= center ){ Zpos=ease(center+distance,center-range,center,value[2],value[2]-Zdist); }else{ Zpos=ease(center+distance,center,center+range,value[2]-Zdist,value[2]); } [x,value[1],Zpos]

    This is okay, but not perfect.
    What I plan to achive is something like this:

    You can see that the solids are close together at the outwards, and the solid in the middle stands quite alone.

    I guess I have to add some formula to the first line of the expression, perhaps based on the “center”-tag or whatever.
    But I don’t have any clue how to solve this non-linear x-positioning.
    Can anybody help me out?

    Thank you very much and please ignore my poor English. 🙂

    Cheers, zeiti

    Dan Ebberts replied 18 years, 4 months ago 2 Members · 3 Replies
  • 3 Replies
  • David Gudelius

    January 7, 2008 at 2:07 pm

    Does anybody know how I can “ease” the x-position with the slider?

    A small example:

    My comp length could be 800px, pivot point far left at 0px.
    At the center of the comp, I have an area of 300px called “xArea”.
    Now I want the solid being moved constantly by the slider from 0px till it reaches the xArea. When reaching the xArea, it should move FASTER to the center of the comp at 400px. Then it should slow down till it reaches the other side of the xArea, and from there it should move constantly again till the end of the comp at 800px.

    It is very hard to explain, but when you look at the picture and the linked posting I posted above, then you might get an idea what I mean.
    Hopefully. 🙂

  • David Gudelius

    January 8, 2008 at 12:05 pm

    Any clue? Anyone?
    It can’t be that difficult! Please!

  • Dan Ebberts

    January 8, 2008 at 5:19 pm

    What you’re describing isn’t an easy curve to generate. I’d suggest you create a solid, add a slider to it, keyframe the slider from 0 to 800, apply this expression to the solid’s Position property, and see if it’s close to what you need. You can stack more ease()’s if you need a sharper curve.

    s = effect(“Slider Control”)(“Slider”);
    x = ease(ease(ease(s,0,800,0,800),0,800,0,800),0,800,0,800);
    [x, value[1]]

    Dan

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