Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Clamp behaviour confusing

  • Clamp behaviour confusing

    Posted by Nithish Kumar on April 28, 2020 at 7:52 am

    I have this white circle whose y position si clamped between two values.

    Let’s say the maximum y value downwards is 618. if I drag the ball to values beyond 618(let’s say 1000) by dragging the ball downwards in the viewport. The value goes beyond 618 when I keep dragging with mouse pressed but the value jumps back to 618 after I let go of the mouse which is expected. I am all clear till that.

    But when I start to move the ball in an upward direction, the circle delays for a bit and then only moves above. I guess the value beyond 618 is the cause of the delay. For eg. Let’s say I dragged it till 1000 in a downward direction and if start to move up, it delays for that 1000-618 pixels and then only starts to move up…So I get puzzled by clamps behaviour now

    Robert Müller replied 6 years ago 3 Members · 4 Replies
  • 4 Replies
  • Robert Müller

    April 28, 2020 at 10:12 am

    Hi, I think this is just the normal behaviour. You can set the value to something beyond your clamped space, but the expression will limit it to your defined border, in your case 618. But the referenced position would still be the value you entered/ move your circle to. If you would disable your expression while beyond 618 pixels you would see your ball jumping to this position.

  • Andrei Popa

    April 28, 2020 at 11:38 am

    There is the normal value, the one before applying the expression. That is 1k. The expression is run and applies a value over that one, the final that is showed. But the normal value is still 1k. The expression can’t change that.

    If you disable the expression, the ball goes to 1k. Expressions can’t change this normal value, they just apply stuff over it. Like a glove. So if your value is 1k, the expression shows 618. When you move it up, the expression checks again to see what the normal value is. So until that value goes under 618, the expression is run over that value, but without changing it. I don’t really know how to make this clearer.

    Expressions are like a colored glass. You see the things colored, but the glass does not change the color of the things, only the way you see it.

    Andrei
    My Envato portfolio.

  • Nithish Kumar

    April 28, 2020 at 12:47 pm

    Ok so is there any way to make it work like we normally expect………..?

  • Robert Müller

    April 29, 2020 at 10:12 am

    I think you might be able to archieve something like this using calculations with sine curves, but I think a keyframed aproach would be better. Or is there a condition that you cant use keyframes?

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