Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

accumulation

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
accumulation
by Adrian Germain on Oct 31, 2009 at 5:33:18 pm

I 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.

Respond to this post   •   Return to posts index

Re: accumulation
by Dan Ebberts on Oct 31, 2009 at 8:14:32 pm

Your question is pretty vague. What are you trying to do exactly?

Dan



Respond to this post   •   Return to posts index

Re: accumulation
by Adrian Germain on Nov 2, 2009 at 1:57:19 pm

Ok. 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);
}




Respond to this post   •   Return to posts index


Re: accumulation
by Dan Ebberts on Nov 2, 2009 at 3:59:27 pm

Try this:

x = effect("Slider Control")("Slider").loopOut("offset");
value + [x,0]


Dan



Respond to this post   •   Return to posts index

Re: accumulation
by Adrian Germain on Nov 2, 2009 at 9:52:16 pm

Thanks Dan, this is what i was looking for.
I found later that you have post a very useful tutorial about Loop Expressions.



Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]