Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Kalleheikki Kannisto

    October 18, 2015 at 6:31 pm

    Use this for the iris position:

    origin_x=576;// rest position X value, center point of eye
    origin_y=390;// rest position Y value
    eye_height = 120; // vertical radius or eyeball
    eye_width =80; // horizontal radius of eyeball
    offset_mult = .25; // decrease in eye movement
    eye_proportion =eye_height/eye_width;
    x0=thisComp.layer("Null 1").transform.position[0]-origin_x;//your null reference here
    y0=thisComp.layer("Null 1").transform.position[1]-origin_y;//your null reference here
    distance0 = Math.sqrt(x0*x0+y0*y0)*offset_mult;
    distance = Math.min(distance0,eye_width);
    if (distance0>eye_width){
    distance_mult = distance/distance0;
    }else{
    distance_mult = 1
    }

    x=origin_x+distance_mult*x0*offset_mult;
    y=origin_y+distance_mult*y0*offset_mult*eye_proportion;

    [x,y]

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