Activity › Forums › Adobe After Effects Expressions › accumulation
-
accumulation
Posted by Adrian Germain on October 31, 2009 at 5:33 pmI am still trying to figure out how to add the value from looping keyframes to the position of a layer. It’s something related to the accumulation expression but i am still not getting the correct result.
Can anyone help?
Thanks.Adrian Germain replied 16 years, 6 months ago 2 Members · 4 Replies -
4 Replies
-
Dan Ebberts
October 31, 2009 at 8:14 pmYour question is pretty vague. What are you trying to do exactly?
Dan
-
Adrian Germain
November 2, 2009 at 1:57 pmOk. I have 3 keyframes with a loop expression . The value goes from 0(key1) to 100(key2) and it holds till the third keyframe.
what i want is to add this value to position of the null. i mean, each time the loop is beginning it adds the value to the position value at that moment(valueAtTime).So finnaly i will have 0-100, hold, 100-200, hold…and so on.I know expressions don’t have memory so that’s why i think it’s about accumulation.
I was playing with this expression but it is adding each frame value to the previous one so when i have the hold keyframe it will add 100 on each frame.Hope this time i was more clear.
Thanks.accum = 0;
f = Math.round(time/thisComp.frameDuration);
for (i = 0; i <= f; i++){
t = i*thisComp.frameDuration;
accum += slider efect.valueAtTime(t);
}
-
Dan Ebberts
November 2, 2009 at 3:59 pmTry this:
x = effect(“Slider Control”)(“Slider”).loopOut(“offset”);
value + [x,0]Dan
-
Adrian Germain
November 2, 2009 at 9:52 pmThanks Dan, this is what i was looking for.
I found later that you have post a very useful tutorial about Loop Expressions.
Reply to this Discussion! Login or Sign Up