My name is Rylaan Gimby. I am new media designer living in Canada. This blog is about my work, music, writing, and life.
ARCHIVES RSS / ATOM CATEGORIES
I was creating a video at work, and I wanted to have a number count in after effects. Upon using the number effect, I realized that the max integer you can display is 30000 (OVER 9000!!!!!). Since I needed 2,149,650 (which is also OVER 9000!!!) that wasn’t going to cut it. I found a great tutorial by Rick Gerard , which I will share, now.
The effect works by creating a blank text layer, which you then control with two effect sliders, one controlling the amount, and the other being used as a multiplier if you need numbers over 1,000,000, as sliders can only go up to that.
1. Create a Text Layer
2. Select Effects > Expression Controls > Slider Control
3. Name the Slider “value”
4. Select Effects > Expression Controls > Slider Control
5. Name that slider “multiplier”
6. Alt-Click on the SourceText and paste this into the expressions field
s = effect(“value”)(“Slider”);
m = effect(“multiplier”)(“Slider”); //use for numbers greater than 1 million
v = s*m; //value of counterfunction digits(Val, Digits)
{var n = Val.toString(); while (n.length < Digits) n = ‘0’ + n; return n;}h = Math.floor(v);
t = Math.floor(h / 1000);
m = Math.floor(t / 1000);
b = Math.floor(m / 1000);hd = digits(h-t * 1000, 3);
td = digits(t-m * 1000, 3);
md = digits(m-b * 1000, 3);if (v < 1000) {h} else if (v < 1000000) {t + “,” + hd} else if (v < 1000000000) {m + “,” + td + “,” + hd} else {b + “,” + md + “,” + td + “,” + hd}
7. Done. Set the multiplier slider to 1 and use the value slider to get numbers from 1 to 1 million! Or use both sliders for MULTIPLICATION ACTION!!!!!
Commenting is closed for this article.
All content copyright Rylaan Gimby
Karam Al-Ghossein
09/09/08 04:25 AMThanks a lot!!!
Was looking for that since ages…
Love it and very appreaciated by my boss too.
best regards
Karam