Animate Numbers in After Effects - How to add commas, decimals & symbols
HTML-код
- Опубликовано: 12 окт 2023
- This simple counter effect is great for telling a visual story when numbers are displayed on screen. So in this after effects tutorial I'll be showing you exactly how achieve this same effect and even how to create your own preset to save a tonne of time!!
Just follow along and unlock a new effect...
The expression you need:
num = value;
function addCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
addCommas(num)
Big shout out to @ukramedia and @JustinOdisho for laying the foundations on this one.
Especially to ukramedia for his awesome tutorial here: • How to Add Automatic C...
But I found that in order to fully get the most out this effect (like changing how many decimal points you want or adding symbols) I had to do more research and trial and error.
But, it's your lucky day because you can skip all of that and have everything you need straight away to create this awesome effect!
Please note: The links below are affiliate links. If you purchase a product or service through them I may receive a commission. This helps me run this channel.
💡 My Gear:
New Studio Mic: amzn.to/3RuoDGD
Main Light - Aputure 120D II: amzn.to/41WUUrT
Colored Light (Big) - Aputure p60c: amzn.to/3Aq19Zg
Colored Light (Small)- Aputure MC: amzn.to/3otwmIk
Main Camera: amzn.to/3oBUKHX
Main Lens: amzn.to/43PkvEG
Wireless Microphone: amzn.to/3V8FyOD - Хобби
no matter how many times I watch this video, I always find myself coming back
Lmao fr..can't ever remember the expression lool
Your AE tutorials are some of the best out there, keep up the great work bro you deserve way more subscribers and views. Stay with it man 🙌🏼
Protect this man at all costs.
Thank you so much 🙏
You are an inspiration man! The way your videos are crafted, the pacing, your delivery, the music, It made for such a great learning experience.
You actually explain everything perfectly and even tell us how to add text within the code. This was exactly what I have been searching for, a simplistic countdown for the next 40 days. Thank you so much for your help
Mate, You are a lifesaver. This is the most simplest, on point, easiest to understand video I saw regarding this. Thank you 3000! ❤
Amazing content man, happy that there are people like you helping fellow creators like myself 👍
Who is this Guy actually ? The best teacher ever, no one of the best he is so humble 😁
Thank you man.
You literally answered all the questions.
You saved my life dude, thanks, the only video that mentions the point instead of comma!
You're honestly the MAN for this!
Blessings to you sir! This was an amazing video! Thank you!
Saving as a preset is a life saver hack bro, this saves a lot of time. Thank you so much for creating these awesome videos, plz keep making such cool videos.
Hi @AliEdits345 do you know of any tutorial I can watch in order to learn how to save this as a preset? I find myself coming back to this video anytime I want to animate a complex number counter in After Effects 😂😂
This is such a great video, you are truly a lifesaver.
So helpful I was looking for this exact effect for so long.
THIS IS THE BEST TUTORIAL! on this subject that I've seen, Thanks man
I struggled with this effect for a while, so I wanted to make one that delivers everything you/ I needed. Thanks for the kind words :)
100% completely agree
Thank you so much for the tutorial🙌
great video! highlights everything that you possibly need to know, keep it up
This guy is definitely a hero
This was awesome. Thanks for making it simple!
Thank so much. This video was very helpful for me
Great tutorial ... Thank u.. i learned to make own preset
Thank u this was of great value!
Great video with really valuable information. Thanks!
Thank you so much! Been looking for a way to make this effect for a long time now!
You're very welcome :)
You're only one video away. this one got me super motivated ... thanks man
It's so true :) You just need that one. Thank you so much for the super!!
Thank you, sir, This is a good Tutorial!
Perfect, thank you so much!
Awesome tutorial - subscribed!
best tutorial i've ever seen
Its very cool! Thank You!
you are a life saver man, Subscribed
thank you! this is what I need!
You are the best. Going to use this on my maps animation lol!
Keep up the good content man, we appreciate it!
Thanks!!
I'm looking forward like this in another software, that is Davinci and Capcut
Thank you man it works
man!!! you just saved a soul🔥🔥
The angle!! The angle parameter! Yes thank you so much for this!
tysm i seriously apprecaite it
Amazing🔥. Thanks🙏
great value bro ! please kaap it up!
Bro, you're awesome!
Thank you for figuring this out bro! Cheers! 🥂
All good man :)
Thanks I was looking for it ! We want more cool ae effect tutorial 😊
More on the way!
Best tutorial out there for this effect hands down, thanks a lot!! Can you make a tutorial on how to blend your numbers/text/anything with your video? Like the examples you have on the video here, that will help a lot! Keep the great videos quality. Subscribed
you are the best!!! tks a lot!
Thank you so much... this is a game changer
You’re very welcome! Love this effect so much myself
A big Thanks to you 🙏
U r the Motivation Man..
Keep up the hard work brother 🙌
Always! :D
simple and very helpful, thanks
You're welcome 😊
THIS IS SO SIIICK Thank you
Great stuff as always.
Thank you!
YOU ARE THE BEST MY FRIEND
Hey Bro! Greetings from Brazil! I loved your tutorial! It's a very important content. Is the best tutorial about this that I found. Thanks very much for doing it.
You’re so welcome! & thanks for your kind words :)
@@Validationbro can you drop the sfx used in the timer
Best advice ever🎉
Perfect, tanks!
trust me.. this is everything 🥰😇
I don't have a video in progress that needs this, but I know it's inevitable so I'm gonna get this preset ready immediately :D
Love from india ❤ you earned a subscriber
What a G! We're only one video away brother. Cheers.
Amazing Bro.. 🤗
In very easy step, u did it👌
Love from Pakistan 🇵🇰
dude i just did it thanks
Great! Man thanks
Thank u so much, im newbie !!!
very gooood tut❤
Thank you legend.
I was looking for this.. amazing and easy, super like and share
So glad to hear this :)
Very good explanation❤
Thank you :)
Really Love Your Content ,
Thank you!
man you are great
Thanks man
what's that shutter sound effect that you have used in this video?
thanks for creating such amazing video ❤
omg thank you, this saved me
No problem, it’s something that I’ve always struggled with so happy to share
Thanks ❤
very helpfull thanks
thank you!!!
Thank you !
You’re very welcome!
This is amazing. Just watching to see whether this can be adapted for Apple Motion at the moment!
Thank you! Yeah, not sure with apple motion or other software at the moment. Hopefully there is a solution
Yow! Are you reading my mind? HAHAHA i've been looking for this tutorial and mg in envato and motion array. Thanks a lot. Been looking for 2 days now.
I did indeed read your mind haha
@@Validation That's twice in a row haha. First ali abdaal tutorial and now this.
Nice Trick bro ❤
Great content
You are a G bro
thanks a lot
Very helpful thank you so much! What's the sound effect in the first clip of the video? Can't find it anywhere
Thanks so much bro,,,....
You’re very welcome!
wooooow it worked thanks
Awesome! I'm glad it did :))
Great video! I used some of your tricks from the Ali video on my last short!
That's awesome man I'll be sure to check them out :)
Super helpful! Thanks so much for the clear explanation! That said- have you ever thought to add placeholder zeros into the counter? If so how would you do that without messing up all the other lovely bits of code? (For example the number would read 000,045 or some such and count up from there?)
GRACIAS CRACK!!!
im using it
Freaking amazing
great video
Amazing content
Thank you!
To make the commas work with numbers that have 4 or more decimals you can edit the expression like so:
num = effect("Angle Control")("Angle").value.toFixed(4);
function addCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
num = addCommas(num.toString().split('.')[0]) + "." + num.toString().split('.')[1];
"" + num + "";
This will only add commas to the whole numbers and the decimals will stay as they are, text in front and behind can be added inside of the quotation marks on the last line.
num = " "+ effect("Angle Control")("Angle").value.toFixed(0) +"";
function addCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
addCommas(num)
Final Text!
Yep, just make sure you add an angle slider to your layer and you're right to go :) Thanks for this comment
thanks!
Thank you, this was really helpful. Do you know how can I add a editable number like this into a mogrt for premier users?
Hey There!
Thank you so much.
Hey :) no problem!
GENIUS
thanks