Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions My expression and approach is Ack Basswards

  • My expression and approach is Ack Basswards

    Posted by George Goodman on December 10, 2013 at 10:11 pm

    I fought with the most manual approach to this expression as I could to come up with for usable results. I know it’s a really dumb way to do it though. I would love it if someone could straighten me out with this.

    I have a layers that is wiggling it’s y position. It has a a circle shape layer as a shadow below it. As the y position increases in value (goes down) I want the x scale of the circle layer to decrease.

    It would probably be better to specify value ranges somehow? I don’t know, but I realize I took the wrong approach.

    Thanks in advance,

    George

    ypos=thisComp.layer("FolderNULL").transform.position[1]
    xscale=transform.scale[0]
    yscale=transform.scale[1];

    [xscale/(ypos/500),yscale]

    George Goodman replied 12 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    December 11, 2013 at 1:33 am

    Maybe something like this:

    ypos=thisComp.layer(“FolderNULL”).transform.position[1];

    startY = 0;
    endY – 500;
    startScale = [0,0];
    endScale = [100,100];
    linear(yPos,startY,endY,startScale,endScale);

    The numbers won’t be right, but the idea might work.

    Dan

  • George Goodman

    December 11, 2013 at 5:41 pm

    Thanks Dan!

    This was the expression I was trying to recall. I knew I needed to map values, but I couldn’t remember it for the life of me.

    I posted the expression I ended up using below. The starting y position of the layer was 562 (pre-expression) and the wiggle was 75 – so I subtracted and added those values from the original value. Was there an easier (or better for the sake of changing) way to do this using “value”?

    I had to map my values such that the startScale was larger than the endScale since I wanted the shadow to shrink as the item got lower to the ground.

    ypos=thisComp.layer("FolderNULL").transform.position[1];

    startY = 562-75;
    endY = 562+75;
    startScale = [140,100];
    endScale = [100,100];
    linear(ypos,startY,endY,startScale,endScale);

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