Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expression Question

  • Expression Question

    Posted by Bob Archer on May 23, 2007 at 4:13 pm

    I’m animating a sunrise, and I’m using an expression on a four color gradient to connect the position of one of the gradients (the bright color to serve as a glow) to the center of the sun.

    Currently the sun is coming from the lower left of frame and arching into the lower right. The issue I am having is the sun I made is fairly large and in order to benefit from the gradient point’s spread, I would like to make the expression so it’s referencing the center of the sun, but adding a few points up from the center of the sun.

    I was thinking of using vector math to add to the x and y in the expression, but I can’t figure it out to where it’s written correctly.

    Here’s what I have right now: thisComp.layer(“sun.ai”).transform.position

    Hopefully this explanation makes sense and thanks in advance for your help.

    Bob Archer replied 19 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Darby Edelen

    May 23, 2007 at 4:17 pm

    You can just add a vector to the position of the sun:

    thisComp.layer("sun.ai").transform.position + [0,10]

    This will add 0 pixels to the x value and 10 pixels to the y value. If your sun is a 3D layer (which it probably isn’t or you’d have even more issues using a 2D effect to reference it) you will need to add [0, 10, 0] to the position.

    Darby Edelen
    DVD Menu Artist
    Left Coast Digital
    Aptos, CA

  • Bob Archer

    May 23, 2007 at 4:30 pm

    Thanks for the quick response. I knew it was going to be something easy. I forgot all about just adding to the position points. When it comes to expressions, I tend to overthink things a bit.

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