ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Adding decay that clamps at a certain value without altering subsequent animations

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Kalleheikki Kannisto
Re: Adding decay that clamps at a certain value without altering subsequent animations
on Mar 7, 2019 at 7:37:01 am

This is sort of from the top of my head, so might not be exactly right.

changepointframe == 0;
for (i = timeToFrames(time); i <= timeToFrames(inPoint); i--){
if (effect("Beat Count")("Slider").valueAtTime(i*thisComp.frameDuration)<cnt){
changepointframe = i;
break
}
}


What it is meant to do is look backwards from the current time frame by frame until the beat count slider goes smaller than the value of the variable cnt (which is the value of the slider at current time), and when it finds that point, it ends the loop, assigning that frame number to the variable changepointframe.

If you multiply with frame duration (changepointframe*thisComp.frameduration), it gives you the time where the decay should start.

Kalleheikki Kannisto
Senior Graphic Designer


Posts IndexRead Thread 


Current Message Thread:





© 2019 CreativeCOW.net All Rights Reserved
[TOP]