Numbers counting up with commas, decimals [ULTIMATE GUIDE] - After Effects 2020 Update

Поділитися
Вставка
  • Опубліковано 6 жов 2024
  • A comprehensive look at how to create numbers counting up in After Effects and create a preset for it so you never have to make it again.
    In this lesson we also animate it with commas, decimal points and percentages as well as any other prefix you want to add.
    For numbers with commas
    s = "" + Math.round(effect(1)(1)[0]);
    s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
    For decimal points to 2 places
    s = "" + (effect(1)(1)[0]).toFixed(2);
    s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
    This will only work if the point controller (or your language equivalent) is the first effect in the effects stack.
    Want to help out the channel?
    Get The "Lyric Video Creator Kit" Here: www.lyricvideo...
    What's Included
    ✅ 60 Animated Presets
    ✅ Bonus Thicc Marker + 4k Neon pack
    ✅ Premiere Ready
    ✅ Full Tutorial
    No After Effects Skills Required
    Get it here!: www.lyricvideo...

КОМЕНТАРІ • 259

  • @rayg.m.7846
    @rayg.m.7846 Рік тому +1

    it's 2023 and I cannot thank you enough! the slider was giving me headaches. Point Control makes so much more sense. Thank you from a new sub!

    • @NickKhoo
      @NickKhoo  Рік тому

      Oh amazing. Glad I could help 🙏

  • @duncshinn
    @duncshinn 3 роки тому +6

    Amazing. I found tutorials for adding prefixes, suffixes, commas, and decimals, but none that let you do it all at the same time like this. Thanks so much, bro!

  • @maxmatassov5273
    @maxmatassov5273 2 роки тому +1

    For the german people:
    Da der Code auf Englisch ist, solltet ihr den Begriff "Point Control" neu zuordnen. Generell lautet der Effekt auf Deutsch "Einstellung für Punkte".
    1. Ihr macht alle Steps nach, wie es in dem Tutorial gezeigt wurde
    2. Sobald ihr den Code in den Source Text Bereich eingefügt habt, nutzt ihr das Lasso-Tool (das Symbol, welches neben dem Quelltext zu finden ist) und verbindet es zum "Effekt -> Einstellungen für Punkte -> Punkt"
    Thanks for the great tutorial, Nick!

    • @NickKhoo
      @NickKhoo  2 роки тому +1

      Love it. Thanks so much for translating

  • @tannerbrowningfilms
    @tannerbrowningfilms 5 місяців тому

    Having that cheat script posted has saved me more times than once... If only I could like this video as many times I've used it.

  • @mhmedia_wetellyourstories
    @mhmedia_wetellyourstories Рік тому

    OMG I've been struggling to find a solution for this, YOU HAVE SAVED MY PROJECT! THANK YOU SO MUCH!!!

  • @justicegoble3463
    @justicegoble3463 Рік тому

    just ran into the same problem of running into the limit of 1 Million, just happened to find yours so I'm stoked! Thanks for the help!

  • @yenhuiho9051
    @yenhuiho9051 Рік тому +1

    thanks! easier than other tutorials ! amazing !

  • @CGStirk
    @CGStirk 3 роки тому +5

    Sweet. I never thought about using a point control to get around the slider limitation! Also, some coding trivia:
    If you really wanted to have more than two decimals, you can use the following regex:
    s.replace(/\d(?=(\d{3})+\.)/g, '$&,')
    And if you needed commas for decimals, then you can set the locale like this:
    $.locale = "ru" // Russia for example
    Number(s).toLocaleString().replace(/\d(?=(\d{3})+\,)/g, '$&.')

    • @NickKhoo
      @NickKhoo  3 роки тому +1

      This is why I love you guys :)

    • @rosaliecgarcia
      @rosaliecgarcia 3 роки тому

      How to animate if the number that I want to achieve is something like this: 0.134641354163578?

  • @Rachelcenter1
    @Rachelcenter1 Рік тому

    THANK YOU!!!! AMAZING. REALLY APPRECIATE YOU POSTING THIS VIDEO. SO HELPFUL WHEN OTHER VIDEOS DONT COVER THE SLIDER CONTROL CAPPING AT 1 MILLION.

  • @juanjosearreola1640
    @juanjosearreola1640 Рік тому

    El mejor tutorial que haya visto, muy bien explicado, gracias por compartir tu conocimiento

  • @marcidukes15
    @marcidukes15 2 роки тому

    finally someone who explains it properly! thank you!

  • @windmarkcastle7305
    @windmarkcastle7305 2 роки тому

    Thanks a lot nick, now I can finish the project because of you! many thanks!

  • @harrietwasaspy
    @harrietwasaspy 2 роки тому

    best tutorial - point control is perfect. this is the way. not slider.

    • @NickKhoo
      @NickKhoo  2 роки тому

      Point Control gang! Aaaooo!

  • @marksuzuki-tsuji8200
    @marksuzuki-tsuji8200 3 роки тому +19

    In case someone has the same problem I was having: I needed a count from 0,00 to 0,89, with commas and 2 decimal places. I was only able to make it work with this:
    s = "" + effect("Point Control")("Point")[0].toFixed(2);
    s.replace(/\./g, ",");

    • @Skillfile
      @Skillfile 3 роки тому +1

      That is what ive been looking for hours! Thank you verry mutch

    • @sofiaenault6373
      @sofiaenault6373 2 роки тому

      still doesn't work for me :(
      it says: "Error at line 1 in property of layer 19 (NAME) in comp 'RECAP 2021'. couldn't turn result into numeric value

    • @marksuzuki-tsuji7845
      @marksuzuki-tsuji7845 2 роки тому

      @@sofiaenault6373 Paste your code here

    • @vmartme
      @vmartme 2 роки тому +1

      @@marksuzuki-tsuji7845 Awesome even cleaner code well done mate!
      Thank you so much :)

    • @FernandaFerreira-hv6yu
      @FernandaFerreira-hv6yu 2 роки тому +1

      Thank you so much!!

  • @justadrum
    @justadrum 2 роки тому

    Thank you! Just needed the counter above 1 milly...worked perfectly. Thank you!

  • @MrTextus
    @MrTextus 4 місяці тому

    So helpful! You're the man, thank you!!

  • @rccwagan
    @rccwagan Рік тому

    You just gained yourself a new subscriber. Thanks for this video, I've been using the slider control for a long time, didn't know there's an easy way to to this.

  • @AG_Places
    @AG_Places 2 роки тому

    Eres un genio... muchas gracias... estuve atorado con esto hasta encontrar este tutorial.

  • @haz96ai
    @haz96ai 11 місяців тому

    Thank you so much... this is the best tutorial video 🤩

  • @serena_collins
    @serena_collins 3 роки тому

    Yay! 🙌🏾 Success! After watching about 5 tutorials this one has helped me get that counting effect with the dollar sign!! Thank you so much!!

    • @NickKhoo
      @NickKhoo  3 роки тому

      Ah nice. Glad I could help!

    • @bsways
      @bsways 2 роки тому

      So how do you put a $ sign? Coz this video doesn’t explain that

  • @nogueirabrn
    @nogueirabrn 3 місяці тому

    great tutorial, thank you!

    • @NickKhoo
      @NickKhoo  3 місяці тому

      You’re welcome!

  • @anais703
    @anais703 Рік тому

    Amazing tutorial!! Thank you very much

  • @mickey1574
    @mickey1574 3 роки тому

    You legend, this worked so much better than the slider! Thank you!

  • @nomnompress
    @nomnompress 2 роки тому

    Worked like magic. Thanks Nick!

  • @SilentRONIN26
    @SilentRONIN26 Рік тому

    Thanks. This vid was exactly what i needed.

    • @NickKhoo
      @NickKhoo  Рік тому +1

      You’re very welcome 🔥

  • @NickKhoo
    @NickKhoo  3 роки тому +24

    Make sure to have the point controller as the first effect in your effects stack before pasting the code otherwise it won’t work!
    For numbers with commas
    s = "" + Math.round(effect(1)(1)[0]);
    s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
    For decimal points to 2 places
    s = "" + (effect(1)(1)[0]).toFixed(2);
    s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");

    • @sannevangemert1536
      @sannevangemert1536 3 роки тому +5

      I get a Error with the second code. I don't know why.

    • @OnlyHooligan
      @OnlyHooligan 3 роки тому +3

      Thanks for the tutorial!
      This worked for me with 2 point decimal precision without an error :)
      s = "" + effect("Point Control")("Point")[0].toFixed(2);
      s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");

    • @NickKhoo
      @NickKhoo  3 роки тому +2

      @@OnlyHooligan Yeah I realised right after I uploaded the tute that I could have put the whole thing into 1 formula! Glad you figured it out

    • @pravinmishra8080
      @pravinmishra8080 2 роки тому

      Thank You so much......

    • @Tyler-ko8dp
      @Tyler-ko8dp 2 роки тому

      I've got a single decimal point, but nothing moves up after the decimal point ...if that makes sense. It just goes 9.0, 10.0, 11.0, 12.0 and so on....I'm trying to get it to go 1.1, 1.2, 1.3 etc.

  • @juleslynn476
    @juleslynn476 2 роки тому

    Thank you thank you for posting this! You're a life saver!

    • @NickKhoo
      @NickKhoo  2 роки тому

      You’re very welcome

  • @aaronlukewilson
    @aaronlukewilson 2 роки тому

    This is exactly what I needed. Thanks so much!

  • @AlexanderGregoriou
    @AlexanderGregoriou Рік тому

    Mate thank you! So much value in this video much appreciated 🙏🏼

  • @muhammedhafzoglu5996
    @muhammedhafzoglu5996 2 роки тому

    thanks man! you saved my life!

  • @ultimetal
    @ultimetal 2 роки тому

    Fantastic work. HUGE help. Much appreciated. Apparently, I like two word sentences.

    • @NickKhoo
      @NickKhoo  2 роки тому

      Ha! You win comment of the day

  • @lobsterboy64
    @lobsterboy64 Рік тому

    Video was great. Thank you so much

  • @dianamendoza569
    @dianamendoza569 2 роки тому

    Thank you! you're my hero!

  • @digidianne3302
    @digidianne3302 2 роки тому

    You are absolute legend! I am your new subs

  • @tiagos5804
    @tiagos5804 9 місяців тому

    life saver, tyvm :D

    • @NickKhoo
      @NickKhoo  9 місяців тому

      Glad to help!

  • @christiankurnia782
    @christiankurnia782 Рік тому

    you deserve a nobel

  • @kamaur01
    @kamaur01 2 роки тому

    Nicely done. I always forget how to add the commas+. A good combo with this is the plugin Monospace to lower the bouncing back and forth.

    • @NickKhoo
      @NickKhoo  2 роки тому

      oooh I need to try that!

    • @kamaur01
      @kamaur01 2 роки тому

      @@NickKhoo I had to do this again and forgot to save it. This one I'm posting has the option for a prefix and a suffix along with decimal values.
      num = "$" + effect("counter")("Slider").value.toFixed(2) + "£";
      function addCommas(x) {
      return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
      }
      addCommas(num)
      I made the $ the prefix and the £ the suffix. On the same line, the (2) is the number of decimal spaces. All you need to do is add an expression slider on the text and call it counter. Hope this helps you

  • @Timer_Hare
    @Timer_Hare Рік тому

    Marvelous! Absolutely helpful!

  • @ManoelFlesch
    @ManoelFlesch Рік тому

    Saved me a lot of time, thank you! :)

  • @DCS190589
    @DCS190589 Рік тому

    thank you!! great video!!

  • @tihanypuerta756
    @tihanypuerta756 2 роки тому

    thank you man,you are a legend

  • @사냥꾼-d4y
    @사냥꾼-d4y 2 роки тому

    this is the perfect video
    thank you x 1000

  • @mukeshtp4951
    @mukeshtp4951 Рік тому

    You are amazing. Thank you for sharing good stuff.

  • @sergyxyz
    @sergyxyz Рік тому

    Thanks FOREVER!

    • @NickKhoo
      @NickKhoo  Рік тому

      Ha you’re very welcome

  • @jamesnnabeze687
    @jamesnnabeze687 Рік тому

    Bless you soul brother

    • @NickKhoo
      @NickKhoo  Рік тому

      I receive that blessing 🙏

  • @thisisreallife9026
    @thisisreallife9026 Рік тому

    best tut ever 4:08

  • @jamesparkes
    @jamesparkes 2 роки тому

    Amazing tutorial!! Thank you for making it so easy.

  • @CVI_JAKARTARAYA
    @CVI_JAKARTARAYA 2 роки тому

    this is going to be great!

  • @Denis-ie6uw
    @Denis-ie6uw Рік тому

    thank u for this guide. very useful 👍

  • @illustrated12
    @illustrated12 2 роки тому

    Great information! Thank you.

  • @CharlizeMatthee
    @CharlizeMatthee 3 роки тому

    You are a genius. Thank you.:)

  • @HonkyQuack
    @HonkyQuack Рік тому +1

    I bought after effects to edit video, and they expect me to learn a who ass programming language just to make some numbers move, L Adobe
    you however, are a hero my friend

    • @NickKhoo
      @NickKhoo  Рік тому

      Ha I’m glad I could help

  • @arginsky
    @arginsky Рік тому

    Perfect! Thanks so much!

  • @roll3y
    @roll3y 3 роки тому

    Dude you are a legend!

  • @wowsweardown
    @wowsweardown 2 роки тому

    legend! thank you

  • @maxportfolio1468
    @maxportfolio1468 2 роки тому

    Awesome. this really helped : )

  • @eleartcraft
    @eleartcraft 2 роки тому

    AMAZING!

  • @ОляПроцюк-ч5ш
    @ОляПроцюк-ч5ш 3 роки тому

    thank you so much for your tutorial!

  • @shannonsx4143
    @shannonsx4143 2 роки тому

    Love it - thanx !

  • @Eugene-f1i
    @Eugene-f1i 2 роки тому

    Great! Thx a lot, mate!

  • @Daddydiskart3
    @Daddydiskart3 3 роки тому

    You save my life haha thanks bro!

    • @NickKhoo
      @NickKhoo  3 роки тому

      Ha I dunno about that but you’re welcome :)

  • @gilumanski8175
    @gilumanski8175 Рік тому

    tnx

  • @protsiuk.vladyslav
    @protsiuk.vladyslav 2 роки тому

    Thank you so much

  • @madeintheeastke2276
    @madeintheeastke2276 2 роки тому

    Bro thanks so muuuch for this

  • @marianomontiel
    @marianomontiel 3 роки тому

    EXCELENT info and video! It deserves more views! I'd suggest you do some keyword optimization. I was quite lucky to find your video but many people might not be able to do so!

  • @nickkeze5831
    @nickkeze5831 2 роки тому

    amazing!! thanks bro! 😁

  • @iandvan8698
    @iandvan8698 2 роки тому

    OMG THANKS!

  • @JohnVincentLabatastory
    @JohnVincentLabatastory 3 роки тому

    This is very helpful!

    • @NickKhoo
      @NickKhoo  3 роки тому

      You’re very welcome!

  • @jenniferbuat
    @jenniferbuat 11 місяців тому

    This is absolutely amazing! Thank you! Would you know how to offset the numbers like a slot machine? If there is a way to do this that would be perfect!! Thanks!

    • @NickKhoo
      @NickKhoo  11 місяців тому

      Thank you! Can you link me an example of what you mean?

  • @jawlineseeker
    @jawlineseeker 3 роки тому

    thank youuuu it such a big help

    • @NickKhoo
      @NickKhoo  3 роки тому

      You’re very welcome!

  • @Sampltxt
    @Sampltxt 2 роки тому

    youre a god WOOOOOOOOOOOOO

  • @narendra643
    @narendra643 Рік тому

    thank you brother!

    • @NickKhoo
      @NickKhoo  Рік тому

      You’re very welcome !

  • @luisavalverde2351
    @luisavalverde2351 8 місяців тому

    There's no way I was going to figure that out by myself!

  • @akashgoswami52
    @akashgoswami52 2 роки тому

    thank you

  • @rossbuchanan1060
    @rossbuchanan1060 3 роки тому

    brilliant - thank you

    • @NickKhoo
      @NickKhoo  3 роки тому

      You’re very welcome!

  • @juyoon0607
    @juyoon0607 2 роки тому

    u da best!!!!! thx!

  • @mattesmeurer1609
    @mattesmeurer1609 4 місяці тому +1

    If someone wants to replace the points with commas e.g. for German notation:
    s = "" + (effect(1)(1)[0]).toFixed(2).toString().replace(".", ",");

  • @henrynorgrove2034
    @henrynorgrove2034 3 роки тому

    Thanks so much!

  • @colinjcjohnston
    @colinjcjohnston Рік тому

    I swear I've triple checked this code when adding a percentage.. and it aint working for me, I've used this previously and worked very well, any ideas?

  • @elliot_347
    @elliot_347 2 роки тому

    thank u i love you

    • @NickKhoo
      @NickKhoo  2 роки тому

      You’re very welcome

  • @robartillustration
    @robartillustration 11 місяців тому +1

    Hi Nick
    Not sure if I missed something in the video, but is there a way to make the decimal point in-between some text instead. My example would be I would like to show hours and minutes, So the full visual would be 34hrs40mins. We can add the mins to the end, but is there a way to get that hrs in the expression?
    Thanks in advance

    • @NickKhoo
      @NickKhoo  8 місяців тому +1

      This would require some re-coding. Standby

  • @stickapot3623
    @stickapot3623 2 роки тому

    THANK U

  • @KhalilCh
    @KhalilCh Рік тому

    Great and thank you, I have a question: what if I want to change the font size of the Word after or before like (%) or ($)

  • @wiehl442
    @wiehl442 2 роки тому

    Brilliant! Thank you. I would love to know how to effect the ("") or +"". Such as how to change colour or font size. Are there any code resources you could link or could you give us an example of code that would effect the these parameters.

  • @RahulKashyap-zd8ho
    @RahulKashyap-zd8ho 3 роки тому

    Thanks a lot

    • @NickKhoo
      @NickKhoo  3 роки тому

      You’re very welcome :)

  • @ahmadshukri3405
    @ahmadshukri3405 2 роки тому

    THANK YOUUUU!!!!

  • @Vijoodruid
    @Vijoodruid 2 роки тому

    Thanks a lot, you saved me a lot of time, i used to copy paste text next to the numbers and it was a nightmare. For some reasons, my text got pixelated once i applied the expression, has anyone else faced this problem? I tried changing the font, but it didnt help.

    • @NickKhoo
      @NickKhoo  2 роки тому

      That’s super weird. Never heard of that issue.

  • @vexvibez-3251
    @vexvibez-3251 2 роки тому

    Dziękuję!❤️

  • @HaniTiby
    @HaniTiby Рік тому

    awsome expression, thanks for sharing

  • @bobanzikic1993
    @bobanzikic1993 3 роки тому

    Thank you!!!!!!

  • @pcholtz
    @pcholtz 3 роки тому

    mvp!

  • @rogersilveira08
    @rogersilveira08 2 роки тому

    THX

  • @jessebout3093
    @jessebout3093 3 роки тому

    Great tutorial thanks! How would you go about adding a percentage symbol to this?

  • @GDoggProductions
    @GDoggProductions 2 роки тому

    Thank you for this tutorial! just what I was looking for!
    is there a way to make this into a MOGART so I can quickly edit values on Premiere pro ?

    • @NickKhoo
      @NickKhoo  2 роки тому +1

      Sadly I havent solved that yet...

  • @connornewell8041
    @connornewell8041 Рік тому

    What if I only want it to count by 100's? I"m counting from 500-6250 so I only want to count by 100's so it's not as fast

  • @zivapp
    @zivapp Рік тому

    great job! how would you make i pass 1milion that the slider does not support?

    • @NickKhoo
      @NickKhoo  Рік тому

      You can’t! You need to use the point slider. Or add a multiplier to your expression

  • @JUANPABLOTheSONE
    @JUANPABLOTheSONE 2 роки тому

    Honestly, a very useful tutorial to break the ice going into tNice tutorials software

    • @NickKhoo
      @NickKhoo  2 роки тому

      Glad to hear that!

  • @KiaKittyCat
    @KiaKittyCat 2 роки тому +4

    Great video! Is there a way to make the "$" text smaller than the rest of the text?

    • @kaguongojames1458
      @kaguongojames1458 8 місяців тому

      Did you find a way to make "$" smaller?

    • @KiaKittyCat
      @KiaKittyCat 8 місяців тому

      @@kaguongojames1458 unfortunately no 😢

  • @ritaholzner6829
    @ritaholzner6829 2 роки тому +1

    I have a problem with the code. The numbers jump back and forth like crazy, also into negative numbers (-8.000 for example)

    • @NickKhoo
      @NickKhoo  Рік тому

      very strange. How many keyframes you using

  • @ceciliamatteoni2138
    @ceciliamatteoni2138 2 роки тому

    This seems to be a very good tutorial! I get stuck though really early as I don't know how to "go to the comment section". How do you do that? Have been searching for a very long time now :)

    • @NickKhoo
      @NickKhoo  2 роки тому

      If you're on a desktop computer it should be the first comment at the bottom of the video. But in case you can't find it
      For numbers with commas
      s = "" + Math.round(effect("Point Control")("Point")[0]);
      s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
      For decimal points to 2 places
      s = "" + (effect("Point Control")("Point”)[0]).toFixed(2);
      s.replace(/\B(?=(\d{3})+(?!\d))/g, ",");