Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to know the value of the result of an expression?

  • How to know the value of the result of an expression?

    Posted by Tiago Cav on April 6, 2015 at 1:02 am

    I made a expression “wiggle” that was placed on solid opacity. Then the “wiggle” will create random values for opacity. Only I want to have this random “wiggle value” in the form of expression. To create a condition if / else.
    I want every time the “wiggle” make solid opacity equal to or less than 9%, the opacity be modified to 10% opacity.
    It would be something like this:

    wiggle (1,150)
    if (“wiggle value result”<=9) {
    opacity=”10″;
    }

    Tiago Cav replied 11 years, 1 month ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    April 6, 2015 at 1:57 pm

    This would be one way:

    Math.max(wiggle(1,150),10)

    Dan

  • Tiago Cav

    April 6, 2015 at 6:55 pm

    Amazing! Very simple for who knows.
    Thank You so Much!

  • Tiago Cav

    April 9, 2015 at 11:47 pm

    Only a little question. Is possible use Math.max and Math.min in the same Wiggle?
    Thanks.

  • Dan Ebberts

    April 9, 2015 at 11:57 pm

    For a range between 10 and 120, for example, it would be like this:

    Math.min(Math.max(wiggle(1,150),10),120)

    but you could also do it this way:

    clamp(wiggle(1,150),10,120)

    Dan

  • Tiago Cav

    April 10, 2015 at 12:02 am

    Amazing.
    Thanks!

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