View Full Version : Xpresso Counter ( How to make ? )
KsiKsu 10-19-2007, 09:44 AM How can i make an expresso counter that counts up to 100 independent of the frame he starts on to count?
Frame x :event > counter on ( counts to 100 )
what would be the best appeal?
|
|
How do you want to define the timespan in which the counter shall go from 0 to 100?
The easiest way is to use a rangemapper node
Cheers
Björn
KsiKsu
10-19-2007, 10:04 AM
every frame 1 count up
1 count up /frame
JamesMK
10-19-2007, 10:34 AM
Try the attached example. Just set the Start Frame and Max Count user data values in the AM with the Xpresso tag selected. Result shown in Current Count and a result node in the Xpresso editor.
I added some clamping and modulo to prevent negative values and to allow wrap-around when the max count is exceeded.
.
KsiKsu
10-19-2007, 12:39 PM
How do you want to define the timespan in which the counter shall go from 0 to 100?
The easiest way is to use a rangemapper node
Cheers
Björn
Your version with the rangemapepr would be extremely interesting shrek,,, but how would you do it? Can u use the rangemapper to count every frame 1 value up to 100
JamesMk....
thx james very nice from you.
your solution depends on setting the starting time on a selected frame before
but how can i make this expression depend on the frame when i activate it
something like, activating > reading frame when it was activated > beginning count from this frame on
?
thanks
JamesMK
10-19-2007, 01:01 PM
That would be a little more complicated. I would suggest looking into the Memory and FlipFlop nodes and see what you can come up with.
Otherwise, unless it's some prohibitively complex setup you need to use this for, you could simply keyframe the start frame value as you progress through the animation.
.
KsiKsu
10-19-2007, 01:24 PM
ok i will have a try, it would be just very interesting to know how to read the current time ( frame) only once.
Because normally the Time operator refreshes every frame.
Check this example (http://www.bonkers.de/forums/xpcounter.c4d). Since you only need a 1:1 frame counter the rangemapper is not needed, but for the enable logic some more nodes are needed.
Cheers
Björn
KsiKsu
10-19-2007, 02:14 PM
thank you
i will work me through this both experssions and comment later what i ve learned ;)
thanks guys
CGTalk Moderation
10-19-2007, 02:14 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.