ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Proper use of clamp() with valueAtTime()?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Michal Okrajek
Proper use of clamp() with valueAtTime()?
on Feb 18, 2017 at 12:36:15 am

Hi everyone,

Sorry for bothering you with such a silly question. However, I've spent all day trying to figure it out with no success.

I'm a beginner when it comes to expressions (but working hard to learn it, it's not easy and every confusing :P

At the moment I'm working on quite complex animation and I thought it would be a great opportunity to apply some expressions to make it look much nicer, link different layers and their properties together to avoid messing around with millions of keyframes, but most importantly learn and evolve my skills.

So, better cut to the chase (picture below is just my mockup so I can test the expression, timing etc), but will help you understand what is my problem.

I'd like to stagger the animations using valueAtTime, I found very neat expression at Dan Ebberts' website (Thanks Dan :)) and it works wonderful. However, my problem is, that I don't want the second shape to follow leader shape all the way, but stop at it's target position (moving in Y axis). I was experimenting with clamp() method, with no results.

Bottom line is, I'm trying to limit the expression output to ie. 1422px. I think clamp() method would be perfect for it, but I'm not capable of figuring it out.

Thanks in advance.

d = delay*thisComp.frameDuration;
thisComp.layer(index + 1).position.valueAtTime(time - d);

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved