How to Adjust Word Spacing Using Expressions in After Effects

Sdílet
Vložit
  • čas přidán 8. 09. 2024

Komentáře • 43

  • @stevehanulec2542
    @stevehanulec2542 Před 2 lety +6

    Thanks Sergei! Super helpful as always. If anyone else wants to control space size, but have paragraph breaks, here's what i used for that. Basically you swap "\s" with "\u0020"
    txt = text.sourceText;
    txt.replace(/\u0020/g, "\u200a".repeat(effect("Word Spacing")("Slider")))

  • @enriquemunozjimenez744
    @enriquemunozjimenez744 Před 2 lety +2

    Hiya! amazing thanks a lot!
    Just one thing, I needed to change something that took me a while to figure it out!
    Project Settings -> Expressions and choose JavaScript

  • @bubanga
    @bubanga Před rokem

    I couldn't tell what kind of black magic this is! Thanks Sergei.

  • @joserizzo9906
    @joserizzo9906 Před 6 měsíci

    Very useful, and you make it very simple!

  • @dePokke
    @dePokke Před 3 lety

    Excellent! I've been struggling hard with expressions similiar to this and when I then watch your tutorials it all seems so simple. So afterwards I always smack myself for taking a much longer approach.. :)

    • @ukramedia
      @ukramedia  Před 3 lety

      Thank you for your kind words! I'm glad you found this useful.

  • @mathieudubost9730
    @mathieudubost9730 Před 5 měsíci

    Great thx

  • @LucasEduardoRibas
    @LucasEduardoRibas Před 3 lety +1

    Mind Blowing!

  • @forresearchpurpose-tq5pw

    thank you very much! I use this to add my morg file

  • @RockDJZ
    @RockDJZ Před 3 lety +1

    thank you!!

  • @msjstudioo
    @msjstudioo Před 3 lety

    Thank you for sharing such an amazing tip.

    • @ukramedia
      @ukramedia  Před 3 lety

      Thank you for your kind words, Muhammad! I appreciate it a lot!

  • @bush9686
    @bush9686 Před 3 lety

    Thanks. Really great one!

  • @welldonesui8741
    @welldonesui8741 Před 3 lety

    非常实用的小技巧

  • @ankitpatelofficial
    @ankitpatelofficial Před 2 lety

    thanks for amazing information, how to get the exact space value between two words?

  • @carlmad2662
    @carlmad2662 Před 3 lety

    oh !! these great super useful !!!
    I wonder if it is possible to do the same but only for tracking?

    • @carlmad2662
      @carlmad2662 Před 3 lety

      or something better still, the same to manipulate the tracking of each word (in case of having several layers of text) and that it was possible to use it as a preset. maybe with Smart control, which by the way I bought it recently and it's great !!!!

  • @bubanga
    @bubanga Před 2 lety

    That's what I need, thanks. Isn't it strange, there is no control section for word spacing in Character panel? Thanks anyway.

  • @itzheraldo
    @itzheraldo Před 2 lety +1

    you should've put the expression in the description to make it easier

  • @apixel.content
    @apixel.content Před 3 lety

    Awesome tips, is it possible to use expressions to change a word into bold or different weights of the font from the source text? Thank you!

    • @ukramedia
      @ukramedia  Před 3 lety +1

      Are you talking about a single word from the entire line of text? If so, I don't think it's possible.

    • @apixel.content
      @apixel.content Před 3 lety

      Yes, that is what I meant. Trying to create a mogrt with that option so an important word can be bold from a sentence. Thank you!

  • @stylishmania5545
    @stylishmania5545 Před 3 lety

    Hey bro , really big fan of yours, can u help me a little on this issue.please provide some info that how news or live channel changes text like headlines, players stats realtime of graphics that are animated or made in after affects.
    Thank you

    • @ukramedia
      @ukramedia  Před 3 lety

      Thank you for your kind words and your request! I'll see what I can do.

  • @thequizzchannel
    @thequizzchannel Před rokem

    Is there a good way of set up spacing for letters. Like i like to set up words in a grid.

  • @T_Armstrong
    @T_Armstrong Před 3 lety

    This is handy! Is there a similar version for vertical spacing between lines of text?

    • @dege.r
      @dege.r Před 3 lety +1

      I didn't try but maybe if you set a break line in the replace parameter it should be a good attempt. I think it's
      that is recognized as a new line

    • @T_Armstrong
      @T_Armstrong Před 3 lety +1

      @@dege.r Thanks. Mucked around with it but it doesn't seem to let you replace a line break. User error I'm sure :)

    • @dege.r
      @dege.r Před 3 lety +2

      @@T_Armstrong actually I think we can get this vertical spacing with the text animator "Animate 》Line Spacing". There's the controller with two values. Give it a try, maybe it's what you're looking for ;)

    • @T_Armstrong
      @T_Armstrong Před 3 lety +1

      @@dege.r Didnt even consider something so simple. No brainer. Thanks Daniel!

    • @ukramedia
      @ukramedia  Před 3 lety +3

      I would apply this expression to the souretext property of the text layer:
      lineSpacingSlider = effect("Line Spacing")("Slider").value;
      text.sourceText.style.setLeading(lineSpacingSlider)

  • @prembasky
    @prembasky Před 3 lety

    That is good

  • @nikhilrastogi7599
    @nikhilrastogi7599 Před 3 lety

    Amazzzzzzzzzzzzinggggggggggggggggggggg

  • @mikelmonleon4932
    @mikelmonleon4932 Před 9 měsíci

    There anything smaller than u200A? the animation is not very smooth

  • @chemora
    @chemora Před 2 lety

    It seems I am unable to have differing font sizes in one text layer and still use this method. Any advice?

  • @Picard102
    @Picard102 Před 2 lety

    How do I add these blank spaces to the end of a line of text?

  • @hurrypol
    @hurrypol Před 3 lety +1

    i had a problem. " REPEAT IS NOT A A FUNCTION" cc2019 and cc2020

    • @ukramedia
      @ukramedia  Před 3 lety +1

      Make sure you use the latest JavaScript engine. Go to File -> Project Settings -> Expressions -> Expressions Engine -> and make sure it is set to JavaScript. I hope this helps. Thanks!

    • @hurrypol
      @hurrypol Před 3 lety +1

      @@ukramedia right !!!! Thanks

    • @itsallaboutyou7907
      @itsallaboutyou7907 Před 3 lety +1

      @@ukramedia I had the same problem and your tip worked thanks