After Effects Number Generator is an expression based text preset to generate counters in various format – timecode, time, frames, custom (with a slider), time between two markers – with some options – layer or comp related time, prefix, suffix, decimals and countdown. Unlike the built in effect by using the preset you're still be able to edit and animate any property of a standard text layer and maintaining all the formatting options as well.
It has several controls, by mixing them you can generate numbers and counters so many different ways:

Custom numbers – Control and animate the numbers with a slider
Layer Related – Time related to the layer as opposed to the default time related to the composition
Markers – Time between two markers of the text layer where the effects is applied
Time – Time in seconds (if no layer or markers option is selected it’ll display the comp time)
Timecode – Display the time as timecode
Frames – Display the time in frames
Decimals – Choose how many decimals to display (0 for integer, 1 for 0.1, 2 for 0.01, and so on)
Minimum digits long – Choose how many digits the number has to display
Countdown – Reverse the values. It works with time, timecode and frames
Thousand commas – Generate a comma on the thousands value.
Prefix – It uses the layer name as prefix so you can put whatever you want before your numbers (for example to have $1,000.00 you rename the layer to '$')
Suffix – As with Prefix it uses the layer name as suffix (for example to display and animate a percentage value rename the layer '%')

The code is not really clean but it seems to work just fine, happy days.
Have a play with it.
*This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
By using davidbenedetti.it, you automatically agree and accept this website terms and conditions in full.
Changelog:
Version 1.0 – First Release
Version 1.1 (Current) – On request I added the “Minimum digits long” option. Now it's possible to generate and animate numbers like 001 to 010 as opposed to 1 to 10.

Credits:
Inspired by, and based on, Universal Counter by Dan Hebberts at Motionscript.com, my expression learning centre.
The Minimum digits long option of Versions 1.1 is thanks to Brad Chmielewski for his expression.

Notes:
If this preset it’s not enough and you feel comfortable to manipulate expressions you may want to check Quba Michalski blog where he released an expression that has similar functionality of this preset.

Back to Top