Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Opacity based on NULL position NOT working due to parenting

  • Opacity based on NULL position NOT working due to parenting

    Posted by Billy Woodward on February 1, 2019 at 8:43 pm

    Hey there – ran into a rather unsavory issue while trying to put together a simple MacOS Dock style animation. I have text layers that are parented to a null – that null has an expression affecting it’s scale, which in turn drives the text and another layer. My issue is that I’m trying to have the opacity of the text layer be driven separately by the separate ‘mouse layer’ null – only issue is that it does not work unless I unparent it from the other null. Any ideas?

    This is the expression I’m using to drive the opacity

    dMax = thisComp.layer("mouse layer").effect("OpacDistMAX")("Slider");
    dMin = thisComp.layer("mouse layer").effect("OpacDistMIN")("Slider");
    d = length(thisComp.layer("mouse layer").position,position)-parent.position;
    ease(d,dMin,dMax,thisComp.layer("mouse layer").effect("OpacityMAX")("Slider"),thisComp.layer("mouse layer").effect("OpacityMIN")("Slider"))

    Emre Anil replied 7 years, 3 months ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 2, 2019 at 12:58 am

    I’m confused. A layer’s opacity shouldn’t be affected by parenting. There must be something else going on…

    Dan

  • Emre Anil

    February 2, 2019 at 11:55 pm

    Try deleting “-parent.position” at the end of the 3rd row from your expression.

    You don’t need to subtract the parent’s position for the distance because the child’s position is always relative to the parent. So if you set child’s position to x: 0, y: 0 it’s gonna be on top of the parent..

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