Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Layers opacity dependent on each other

  • Steve Sierra

    February 15, 2018 at 4:57 pm

    Here goes :

    Let’s say you have 4 mouth shapes.
    You create a shape or a solid which will be your rig. name it “RIG”
    Create 4 text layers, each one with a mouth shape.
    Distribute them along the x axis of your comp.
    Now we divide your comp in the number of mouth shapes you have (4 in our case so if your comp width is 1920px, than each mouth shape “zone” will be of 480px).
    In each mouth shape opacity prop, you have to put an expression like this :

    for 1st mouth shape :

    var rigXPos = thisComp.layer(“RIG”).transform.position[0];
    if(rigXPos >= 0 && rigXPos < 480){100}else{0};

    for the second :

    var rigXPos = thisComp.layer(“RIG”).transform.position[0];
    if(rigXPos >= 480 && rigXPos < 960){100}else{0};

    for the third :

    var rigXPos = thisComp.layer(“RIG”).transform.position[0];
    if(rigXPos >= 960 && rigXPos < 1440){100}else{0};

    and the last :

    var rigXPos = thisComp.layer(“RIG”).transform.position[0];
    if(rigXPos >= 1440 && rigXPos < 1920){100}else{0};

    Make sure your keys are set on hold and you should be good to go !

    Cheers 😉

  • Albert Kowalski

    March 2, 2018 at 12:08 pm

    Thank you! I had different stuff to do, but now I will definately check your code 🙂

Page 2 of 2

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