Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions anchor point, position, scale

  • anchor point, position, scale

    Posted by Amit Zinman on October 29, 2008 at 10:09 am
    position expression:
    ;seedRandom(index,true);
    ry=thisComp.layer("controller").effect("randomize y")("Slider")
    rx=thisComp.layer("controller").effect("randomize x")("Slider")
    switch (index%4) {
    case 0:
      y = random(transform.position[1],transform.position[1]+ry);
      x = random(transform.position[0],transform.position[0]+rx);
    case 1:
      y = random(transform.position[1],transform.position[1]-ry);
      x = random(transform.position[0],transform.position[0]+rx);
    case 2:
      y = random(transform.position[1],transform.position[1]+ry);
      x = random(transform.position[0],transform.position[0]-rx);
    case 3:
      y = random(transform.position[1],transform.position[1]-ry);
      x = random(transform.position[0],transform.position[0]-rx);
    
    
    }
    x,y
    ease(time, inPoint,outPoint, [x-100,y, (index/2)], [200+x,y,(index/2)]) 
    
    
    scale expression:
    fi =thisComp.layer("controller").effect("fade in")("Slider")
    fo =thisComp.layer("controller").effect("fade out")("Slider")
    si = thisComp.layer("controller").effect("size in")("Slider")
    so = thisComp.layer("controller").effect("size out")("Slider")
    sf = thisComp.layer("controller").effect("size fade out")("Slider")
    if (time < (inPoint+fi)) {
    s = ease(time,0,fi,0,si) 
    }
    else if (time >= fi && time <  (outPoint -fo)) {
      s = ease (time,fi, outPoint - fo,si,so)
    }
    
    else {
      s = ease(time,outPoint-fo,outPoint,so,sf) 
    }
    [s,s]

    Hi,
    I am animating a bunch text layers. I am trying to simulate 3d without actually using 3d layers, and instead use code to change scale and opacity as well as position.
    However, for some reason, x position keeps shifting to the right or left, depending on the anchorpoint. If I switch the position expression off and position the anchorpoint in the middle of the layer everything works well.
    Can I use an expression to keep the anchor point at the right place?

    Amit

    Amit Zinman replied 17 years, 6 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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