SourceRectAtTime() Revisited - Adobe After Effects tutorial

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • We take another closer look at the SourceRectAtTime expression. Usually used to make boxes the same size as text layers, many of you asked for more control over what kind of text alignment could be used. Well this is the long answer I couldn't just type at you in the comments. This tutorial uses MATH and EXPRESSIONS. You have been warned.
    If you have any questions just let me know in the comments.
    Download this project file:
    evanabrams.com/...
    Connect on the Internets
    www.EvanAbrams.com
    ecabrams
    www.Facebook.com/EvanCAbrams/
    EvanCAbrams
    Suggest a tutorial topic: docs.google.co...
    Google+
    plus.google.co...

КОМЕНТАРІ • 174

  • @qzbnyv
    @qzbnyv 5 років тому

    The animated bit from around 10:45 to 13:30 in the original sourceRectAtTime() video inspired me to make animations for other educational material. Found it a great way to break up a traditional slide recording or screen recording.

  • @danilo_z
    @danilo_z 5 років тому +1

    What the heck, I am currently working on a video for a client and needed just that. And as I looked on UA-cam I found this video you JUST uploaded. Thanks man!

    • @ECAbrams
      @ECAbrams  5 років тому

      It's a wild universe like that... or my metadata game is stronger than I thought :)

    • @danilo_z
      @danilo_z 5 років тому

      ECAbrams Universe: “aw, cmon, he’s struggling to find an answer to his problem. We could show him a thousand articles and boring forum posts about that. Or we could place Evan’s Video he just uploaded a minute ago exactly in front of his silly face” me: *clicks* “SWEET GOD THAT’S EXACTLY WHAT I WAS LOOKING FOR!”

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

    this is what i call LEGENDARY

  • @angelvazquez5538
    @angelvazquez5538 5 років тому +1

    I didn´t know how do that, thank you so much, that is very useful. You are my mentor in javascript. I use this with spreadsheet data to make schedule and lower third and another things in after effects more easily.

  • @bollingbollz9379
    @bollingbollz9379 5 років тому +3

    You rect this tutorial, dude!

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

    Thank you for this tutorial! All your tutorials are so helpful.

  • @brienhopkins
    @brienhopkins 5 років тому +5

    Thanks, Evan. This is super helpful. If the text goes onto multiple lines, is there a way to make it all stay vertically centered AND keep consistent baselines?

  • @MotionMethods
    @MotionMethods 5 років тому +1

    Awesome tutorial! I like what you did with the updated channel artwork! 🔥

    • @ECAbrams
      @ECAbrams  5 років тому

      Thanks. Trying to clean it up around here. Now if I can just get a channel trailer done it'll be all branded up.

  • @CatalinGulan
    @CatalinGulan 5 років тому

    Great and very complete tutorial! Thank you very much for sharing , Evan!

  • @nematurd
    @nematurd 5 років тому

    Great tutorial. I figured out that if you "precomp" the whole thing, you can drop it anywhere in time and avoid the "time-InPoint" issue from the first video when animating the type. I will prevent that issue with the rectangle being scaled before the text animates if you move it along in the timeline. I may be doing it a lazy way, but it means I use less code, and have more control.

    • @ECAbrams
      @ECAbrams  5 років тому +1

      I don't know if there is a "lazy" way when automation is the goal.

    • @nematurd
      @nematurd 5 років тому

      @@ECAbrams True. Thank you. Now i feel better about my workflow.This is a great tutorial, and the possibilities are endless. I've actually created this as a template so I can simply import the ready-made "boxed text" into any project and edit it to suit the job. Nice one, double thumbs up.

  • @jat0777
    @jat0777 5 років тому

    Really cool video tutorial. Many thanks. Can't wait to give this a go.

  • @JeremiahRose
    @JeremiahRose 4 роки тому +1

    Good work, thank you.

  • @CesarAugustoTejada
    @CesarAugustoTejada 4 роки тому

    This tutorial is amazing. I'm a beginner and I'm trying to understand more about expressions. I like the logical things jeje. With this tutorial I was trying to take a step beyond and add another text box to make a Lower Third with name and subtitle but at some point I broke the expression. Maybe in another tutorial you can explain how to add a second text box that reacts proportionally. That could be awesome and I will appreciate a lot.

  • @billdowling8428
    @billdowling8428 5 років тому

    As usual, excellent tutorial.

  • @Arso98
    @Arso98 5 років тому

    Awesome tutorial, thank you much

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

    thanks dude, this prefect.. and this really helped me to make bubble chat treatment..

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

    Hello. Great video. Can you please make another video where you can include info how to deal with ascenders and descenders?

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

      I might do. Unfortunately I don't know if there is a very satisfying conclusion to that tale.

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

    Thank you!
    You are awesome!

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

    This is SUPER helpful. I just need to box to stay one size with height. The lowercase j's and i's make the box jump and I am trying to avoid this. Any thoughts?

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

    You are a life-saver! Any recommendations for keeping the box to a fixed height so that descenders (and ascenders) don't increase the height of the box when they appear?

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

      The common wisdom is, unfortunately, to replace the height with a static value. If we wanted to read the potential maximum of the layer, accounting for the tallest above and lowest below the baseline, we would need to have those included in the content of the text box, but then hidden, if that makes sense?

  • @AmerMiftari
    @AmerMiftari 5 років тому

    You are really good with this, thank you :)

    • @ECAbrams
      @ECAbrams  5 років тому

      Thanks for saying so. you're very welcome.

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

    6:34 "All of your text in a box to the left" 😂

  • @lucaslourenco8234
    @lucaslourenco8234 4 роки тому

    Thanks, Evan!

  • @LetTheWritersWrite
    @LetTheWritersWrite 4 роки тому +1

    Thanks for this. Now, would you be able to note the difference between your method and another common one where instead of messing with anchor points, you just simply do some math in the shape's position. I can't wrap my head around what the difference is or why you do it this way instead.

  • @GregLinhares
    @GregLinhares 4 роки тому +1

    Thank you so much for yet another absolutely incredible tutorial Evan!
    Here's an interesting and extremely challenging variation of this topic that I'm currently trying to solve.
    What about applying this dynamically expanding box behind 2 strings of source text, 1 upper and 1 lower (think lower thirds with a First & Last Name on above in one font/style/size) and a "Title/Department and/or Region" directly below it in a slightly smaller font/style/size. Often, a Name might be shorter or longer than a Title/Department/Region (and/or vice versa). How might one apply this technique while using expressions to evaluate which string of source text is the longest in order to have the one box scale in response to one string or the other depending on which is longest while adding specific padding values to the left, right, top and bottom? (There's always additional padding on the left and/or right side in order to accommodate the title safe zones for text.)
    It would be so amazing to build a dynamic lower third template like this that could be exported via the Essential Graphics panel as a CC Library motion graphics template! I've been trying to figure this one out for quite awhile now, yet it's quite a mind bender. It might not even be possible, but I'm always imagining being able to create a single, animated lower thirds comp that can also be dynamically flipped to fly out from the left or right side with text left/right aligned to match.
    If you have any ideas on how solve the dual text string issue, it sure would be a great new add on to your catalog :-) Certainly, there must be others out there too who are trying to figure this out. Almost all lower thirds have at least two lines of text with different font/styles/sizes that often vary in length. Thanks again for all you do Evan! Your tutorials are always deeply appreciated and admired! Cheers!

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

      I get this question often enough, so I should probably just make a tutorial about it. I'll put it on the list. But the core of it comes down to using if/else statements to choose which layer the text box evaluates for the length. That's about it.
      If (a>b) {a} else {b}
      Now this gets more interesting when we get into 2 text boxes. Which is the biggest of a b or c and how do we evaluate that? Could be a fun one to show off I think.

    • @GregLinhares
      @GregLinhares 4 роки тому

      @@ECAbrams Thanks Evan! Yes. This has been quite a challenge, mostly because After Effects does allow for a single text box to contain differently styled text on each line, yet does not respect those different styles, (font/style/color/size) in the motion graphic template for Premiere. It simply collapses to the first row text style for all rows braking the lower third design intent. That's why it seems that two independent source text elements might be the only solution. 100% understand the if/else logic behind this, still just just a newbie learning how to write customized expressions at the moment. ;-)

  • @nickmedina3359
    @nickmedina3359 5 років тому

    i would love to see your take on making cinematic titles in after effects. That would be Cool.

  • @zachallred839
    @zachallred839 4 роки тому +1

    Thanks for the video Evan! Can you explain how you would link the position of a second box to the height of the first box so that if the first box got taller, the second box would automatically move to stay aligned with the bottom of the first box?

    • @ECAbrams
      @ECAbrams  4 роки тому +1

      certainly. You would first want to parent this reacting box to the first box. Then use the position of the reacting box to look at the height of the first controlling box. Does that make sense?

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

    Hi Evan
    I would like to make the source text of a single text layer change over time, using hold keyframes (to make closed captions). But when the text changes, the background box (to my horror) does not instantly resize itself to fit the new size of text. Can't understand why - it's driving me mad - would very much appreciate any thoughts or advice. Thanks!
    PS thanks for all the fab / super-helpful tutorials :)

  • @honeydude2519
    @honeydude2519 5 років тому

    Thank you!

  • @soo_you3379
    @soo_you3379 5 років тому

    Thank you a loooooooooooot!~~~~~~~~~

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

    hi, thank you for this detailed lesson. I am faced with a problem that I do not understand how to solve. the thing in my project is to bind one text to another so that the two of them change correctly while changing the location of one layer of text through properties "Paragraph".

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

      Sorry, what's the problem you're running into?

  • @Arsacre
    @Arsacre 5 років тому +1

    Your Fan 👋

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

    Hey, great tutorial as usual! One Q for you--do you know a way to generate background bars behind each individual word, with the spaces being blank? Sort of like if you highlighted each word?

  • @cessers
    @cessers 5 років тому +2

    8:08 "Just like Pit Bull did with his lifestyle..." *snort!*

  • @loremipsum720
    @loremipsum720 4 роки тому

    All your tutorials, ALWAYS, have been awesome. THis particular one has save my butt lately. I just have a question I hope somebody can at least direct me to a solution.
    I would like to give different padding sizes to the left and the right of the box. Control each of them independently. Any ideas?

    • @ECAbrams
      @ECAbrams  4 роки тому +1

      instead of thinking of it like making one side larger or smaller than the other. It might help to think about shifting the positing of the shape layer relative to the text instead.

    • @loremipsum720
      @loremipsum720 4 роки тому

      @@ECAbrams yes!!!! Thanks so much!

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

    Great tips ! How do you make two different text size set to be responsize to one shape layer like you do in 0:21?

  • @timothymcconville
    @timothymcconville 4 роки тому

    Great tutorial!! Is it possible to use SouceRectAtTime() on the path of a shape layer? I'm trying to animate a line that traces the top of the box path and the down the right side. To use this same expression would save me tons of time. Thanks.

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

    Thanks for the great tutorial as usual! Quick question: how would you go about it if you wanted to make two lines of text and resize the font to make sure both lines are always the same width?
    LINE1
    LINE2
    But if we changed the content of LINE 1, the font size would follow suit? In the eg bellow "NEWLINE1" would scale down, or "LINE2" would scale up.
    NEWLINE1
    LINE2
    I can do it by matching the layer size of two different text layers with sourceRectAtTime, and connect their positions with expressions. But I'm trying to reduce the amount of layers in this particular project, so hopefully there's a clever way to do it with some lines of code inside the same text layer!
    Does that make sense? Any insight is appreciated!

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

      I think I follow. Step 1 is to set up our desired states. So maybe we use scale, maybe we use the font size in the .style of text. But however we do it, we need to talk to the same property on each and have them compare the lengths of the layers. That means you'll be starting with an if/else statement. In regular terms it would be: if Line1 (this layer) is longer do {nothing} and if not do {something else}. That way only when a the layer is NOT the longer will it change.
      The next thing to do is read the layer's length, and the longer layer's length, and use maths to get the scale to conform one to meet the other.
      I hope that gets you started in the right direction.

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

      I had to do this once to make hundreds of title cards with text all scaled to the same width, I don't have the code but here is the basic logic!
      Say you want your text lines to all be displayed 1000px wide in frame.
      You get the SourceRectAtTime of "LINE1" and find it to be 600px wide.
      You get the SourceRectAtTime of "NEWLINE1" and find it to be 1200px wide.
      Divide 1000 / 600 = 1.666, this is the scale ratio for "LINE1"
      Divide 1000 / 1200 = 0.833 this is the scale ratio for "NEWLINE1"
      Now scale "LINE1", which by default is 600px wide, by 1.666. Result, it is now 1000px wide! *
      Now scale "NEWLINE1", which by default is 1200px wide, by 0.833. Result, it is now 1000px wide! *
      *If you follow my math you'll get 999.6, but that's because of the limited decimal places I'm showing here. A real AE script will probably get closer to actually 1000px value.

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

      Thank you so much for taking the time to show the logic to me! I figure a similar way around it, but this is cleaner, and I'll sure make the change!

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

    Thanks for great tutorials! But still I have a question. It all works great for AE, but as soon as I want to make a template for Premiere Pro (often clients need that), how can I keep different font option? So I can use bold and italic or just different fonts. Because when I export essential graphics I have only one font left in Premiere despite all settings (editable styles, size etc) or if I break my text into two text layers, I loose my frame resizing thing :(

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

      So the issue is you want multiple styles for one text layer is that correct? Like some of it is bold, and another line is italic, and maybe another line is 10pt while another word is 60 pt? Is that the idea?

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

      @@ECAbrams yes please, this is the exact issue I am having currently. Thanks!!

  • @IsionIndustries
    @IsionIndustries 5 років тому

    I love this tutorial! One question: How would I keep the anchor point in the center left point? If I change the x=Left+Width/2 to /1 then that centers the anchor point on the center right point.

    • @ECAbrams
      @ECAbrams  5 років тому +1

      I think you just need x=Left. That should get you there no?

    • @IsionIndustries
      @IsionIndustries 5 років тому +1

      @@ECAbrams thank you sir. That worked. You are a genius

  • @c.d.clifford7451
    @c.d.clifford7451 4 роки тому

    Hey Evan, great tutorial as always! Question: is it possible to make the rectangle have different widths for different lines of text? Just like with a standard closed caption.

    • @ECAbrams
      @ECAbrams  4 роки тому +1

      One rectangle can only have one width. You would need two rectangles for that trick to work. You could rig up something that looks at the lines individually perhaps.

  • @dvdtube100
    @dvdtube100 4 роки тому +1

    Great tutorial!! I need help on an "if or else" of the text box for the lower 3rd. Let's say we have a box is same size as the text layer (Names), how can we make the box the same size as a 2nd layer (Job Title) that is longer than the Name layer? Any help is greatly appreciated.

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

      Let's say we have two variables
      A = Length of the name
      B= Length of the title
      then we can make C whichever one is longest with the logic
      if (A>B) {C=A} else {C=B}
      Then you use C as the length of the box.
      Hope that helps.

    • @dvdtube100
      @dvdtube100 4 роки тому

      Thank you for the quick reply. I'm new with expressions and not really know what I'm doing. This is what I have, and of course, it isn't working. I have a total of 4 layers. Control (Slider), Job Title, First & Last Names and Background.
      N=thisComp.layer("First & Last Names");
      X=N.sourceRectAtTime().width;
      Y=N.sourceRectAtTime().height;
      P=thisComp.layer("Control").effect("Slider Control")("Slider");
      [X,Y]+[P,P]
      T=thisComp.layer("Job Title");
      X=T.sourceRectAtTime().width;
      Y=T.sourceRectAtTime().height;
      P=thisComp.layer("Control").effect("Slider Control")("Slider");
      [X,Y]+[P,P]
      C=thisLayer.size(Background);
      If(N>T){C=N} else {C=T}

    • @ECAbrams
      @ECAbrams  4 роки тому +1

      @@dvdtube100 Is all of this on one property? I'm not certain what you've constructed here. Maybe it's best if you email me something. UA-cam Comments might not be the best venue for this kind of thing.

    • @dvdtube100
      @dvdtube100 4 роки тому

      info@evanabrams.com?

  • @Tom10
    @Tom10 5 років тому

    Hey, what actually happens at 6:23? As you select shape layer, hover on the anchor point mark and then: it instantly zooms, selection changes to the text layer. Was it just an edit or some unspoken magic hotkey? But rather than that - finally its updated, yayy!

    • @ECAbrams
      @ECAbrams  5 років тому +2

      Probably just an edit. I don't know of a hotkey that does that. Sometimes I need to cut out bad takes or even worse jokes.

    • @Tom10
      @Tom10 5 років тому

      ECAbrams bad jokes - its impossible! Don’t dare leaving jokes aside from us !!! 😂✌🏻

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

    Great tutorial - How do you auto resize the background to the maximum width of two or more separate text layers?

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

      We could use something like Math.max() for this. Imagine we called each of those text layers lengths A, B, and C. If we put those into Math.max(A,B,C) the result would be the largest of all those variables. So it would always return whichever the largest of all 3 was. Does that help get you started?

  • @chfilm
    @chfilm 4 роки тому +1

    Great stuff, thank you! Is there a way to have two sliders, one for the X padding, and one for the Y padding? Or at least to customize the amount of X padding somehow statically?

    • @robdgarfinkel
      @robdgarfinkel 4 роки тому

      Yes:
      src=thisComp.layer("TEXT 1").sourceRectAtTime();
      textWidth=src.width;
      textHeight=src.height;
      paddingLeftRight=thisComp.layer("CTRL").effect("Box Outline Padding Left/Right")("Slider");
      paddingTopBottom=thisComp.layer("CTRL").effect("Box Outline Padding Top/Bottom")("Slider");
      xPos=textWidth+padding+paddingLeftRight;
      yPos=textHeight+padding+paddingTopBottom;
      [xPos,yPos];

  • @brainuser312
    @brainuser312 4 роки тому +1

    Hi! It's really a great trick. However, what if I need to animate position then? It works with the scale, but doesn't work with position, it stays still...

    • @ECAbrams
      @ECAbrams  4 роки тому

      Ah yes, so you want to animate the position of he text with the text animators right? Is that the issue?

    • @brainuser312
      @brainuser312 4 роки тому

      @@ECAbrams Yeah, in fact I would like not to change the position of the particular layer (thisLayer.transform.position), in order I could move the text anywhere on the screen, and animate the position of the text instead (using text animators)... Is it possible somehow? And, I suppose, it is sometimes really helpful to lock the anchor points of the layers, because it makes them more organized, and prevents from being confused when creating interaction between layers based on their positions.

    • @atropper
      @atropper 4 роки тому

      @@ECAbrams yes, want to use the opacity animator, tricky?

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

    Great tutorial - Still having an issue with commas resizing the box - any way to avoid?

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

      you would like the box to ignore, commas?

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

      @@ECAbrams Yes! thx

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

      @@chrismattle8789 I'm not sure I understand. So, just commas or anything that drops below the baseline? Like a p or q or g? Are those also causing things you don't want to see happen?

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

      @@ECAbrams Hey - thanks for your time. Yes, you make a good point, the problem results from the use of any descending character.

    • @A.Elbereth.Gilthoniel
      @A.Elbereth.Gilthoniel 3 роки тому

      @@ECAbrams Yes, I also need this expression to act like the source text always has some "q/p/y"-like character. For now I just add "p" at the end of the line and fill it with the background colour. As you can imagine, it isn't an optimal solution.

  • @eduardoasta
    @eduardoasta 5 років тому

    Hey! I've followed your tutorial and it works fine. But, if I move my layers a couple of frames ahead, something weird happens: the animation seems to jump ahead. Or, it seems more abrupt. It cuts some frames. Do you know what is happening?

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

    thank you for your tutorial! and what if i need to link another shape to the border of text box? so that it follows the typing text, is it possible?

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

      certainly. I would start by parenting the shape to your text layer and use the sourceRectAtTime() to push it where you want it to be on the position of that shape layer.

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

    Guys, is there any fast way you could just throw an effect/'animation preset' on your text layer and it will create a solid within the SAME text dimensions so you could use it as a matte - to reveal the text below it? Similar to "Effect Matte" script?

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

      Like the set matte effect maybe? Or create a mask that is the same size as the shape layer? Is that the idea?

  • @dePokke
    @dePokke 4 роки тому

    Question: how can one compare a 'sourceRectAtTime().width' by adding new words to the 'sourceText' but only up until a certain maximum of width is reached?
    After this a second line should begin to fill up with the remaining words, thus basically splitting 'a line of text' onto several different text layers.
    Checking the SourceRectAtTime().width while adding (word[x]) to that same sourceText seems to be impossible and a bad idea as it crashes After Effects...
    I really thought this was easy, but I find the absence of global parameters a problem.
    So what I'm considering next is to add a new comp with, say, 20 textboxes with identical text format and fill those up with one, two, three ... twenty words so that the original textbox can go and check these one by one and and then pick the one thats right underneath the maximum width.
    Surely there must be a more elegant way to solve this? I'm hoping that someone here can help me? What am I missing? Thanks!

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

    This is great! But I find that when I type letters the box jumps up and down depending on whether there are ascenders/descenders or not. I'm guessing the y value is changing because the height of the text is changing and then repositioning itself so it's central? Is there anyway to stop this?

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

      This one is a complex trouble. Esentially you would need to conditionally ignore ascender's and descenders from the source text. I don't think I ever landed on a method. You might search through Creative Cow to see if someone of the forums got a reliable solution on it.

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

      @@ECAbrams Cool, no worries. I tried to set the height of the rectangle to match the x-height of the text but can never get it to work properly. I'll keep looking for a solution :)

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

      I did some looking and a solution might actually be found in some newer options that have come along since this tutorial. We can get and set text style parameters with expressions such as leading now. So we have access to much more data on a text layer that might prove useful. Check out the adobe help file and blogs for more!

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

      @@ECAbrams thank you for looking into it and for the tip about the Adobe blog!

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

      ua-cam.com/video/4XCvAmqbr7s/v-deo.html&ab_channel=ManueldoesMotion

  • @ronandl
    @ronandl 4 роки тому

    Great Tutorial! Thank you Evan!!! ,
    One question. I've implemented your technique and its helping to keep text layers in my template aligned to a typography grid once localised into different languages and versioned for different type faces. The problem I'm facing is that if I change the the point size, the anchor point of the bounding box stays at the position of the original text layer's baseline. How can I make the box anchor point update to the new baseline of the larger/smaller point-size?
    Cheers,
    R

    • @ECAbrams
      @ECAbrams  4 роки тому

      I'll have to try to recreate the issue. Are you able to email me over the work file? Maybe it's something we can look at on our Friday shows.

    • @ronandl
      @ronandl 4 роки тому

      @@ECAbrams Thanks for the speedy reply!! Sure thing, I can email you a stripped down version of the project. Via the contact on your site?

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

    How about if I want to do a line of text _above_ a horizontal line? Maybe I'm ramping some text up from "behind" the line and I want the line to resize with the text?
    Even worse, I want to do the name of a person ramping up above the line and their title ramping down under the line like one of those cool, lower thirds type doodads?

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

      So you want the text to resize to the line? Or the line to resize to the text?
      Since the sourceRectAtTime() object can return us the height, width, top, and left, those are all the values we need to place things relative to the the text, or move the text relative to its own size. I would need to spend more time working this specific problem. But it is certainly possible to achieve these ideas with the tools at hand.

  • @thomasnooren1714
    @thomasnooren1714 5 років тому

    Hi! I was wondering how you did the animations at the end of the video. Since the size of the box is locked you wouldn't be able to make it squash and stretch like that, right? Is there a way to make an expression stop working at a certain time?

    • @ECAbrams
      @ECAbrams  5 років тому +2

      Well, the size is set, and we can't use the layer's scale, so I use the scale of the rectangle group. Shape layers give us so many nested options like that.

  • @ClaireWhiteheadIrl
    @ClaireWhiteheadIrl 4 роки тому

    I tried this, had problems, then downloaded your template but I'm still having problems, the sample in your example is only two words, and it breaks as soon as I try to lengthen it.
    I keep having a problem where before the text animates in the background box starts somewhere else with a different anchor point.

  • @champovilla
    @champovilla 7 місяців тому

    how to force monospace with expression ?

  • @marthjel
    @marthjel 5 років тому

    Hi there! Super duper great stuff. I ran into a problem though. Everything works fine. However, when I change between center aligned and left aligned for instance, I can see the values changing in the Anchor Points as in the video, but the text animates from the center regarless of which text align I've choosen. Any idéas of what Im missing? Redid the whole expression code thrice and no difference!

    • @marthjel
      @marthjel 5 років тому

      The text alignment alternatives only work when i diable/remove the code from the text anchor point...

  • @cyejames
    @cyejames 5 років тому

    Hi Evan. I was wondering how you did the out animation you added to each of the boxes you showed in the intro and end of the Tut. Looks like scale maybe?? I tried it but im having the issue that the text gets scaled with the background since the text is linked to the background. Thanks in advance for any help.

    • @ECAbrams
      @ECAbrams  5 років тому +2

      It is scale, but it's the scale of the rectangle group.

    • @cyejames
      @cyejames 5 років тому

      @@ECAbrams Thanks for responding I was able to get it sorted.

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

    Am I an Idiot? I haven't been able to animate the letter without seeing them scaling, just like typing. Do you have any ideas? Thanks A lot for your Tut
    Update> I did it, in the range selector advanced features, just down the smoothness to 0

  • @AnhNguyen-bk1uz
    @AnhNguyen-bk1uz 4 роки тому +2

    Could you please point me to the earlier tutorial where you get to the beginning of this tutorial? The only one that I could find that related to SourceRectAtTime expression is this tutorial ua-cam.com/video/kI3yzx6CATg/v-deo.html and the expression is totally different in there.
    Thank you

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

    what if i wanted to get rid of that sudden bounce of the rectangle shape as it happens when a descender appears in the animation. Will getting rid of height property do that job?

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

      So height is reading the height from top to bottom of the box. If you got rid of it then the height would be zero... or whatever you put in its place. So, yes, replacing the dynamic height with a static number would solve this issue.

  • @vladyslavkrylevskyi4486
    @vladyslavkrylevskyi4486 5 років тому

    hey there! when you put at 8:50, you can lock the shape to the final size, but what if i want to lock the height to the final size and still have the width flexible, is there a way I can do this?

    • @ECAbrams
      @ECAbrams  5 років тому

      Sure, you would just need to set variables differently. We've done a method to simplify the typing, but you could just do all the variables as their longer strings and make each reference any point in time you like independent of each other. Does that make sense?

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

    Is there a code to skew the text horizontally in a text box as you type, it gets skinnier?

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

      Do you mean, having an inverse relationship to the width of the text box? You might use a linear() expression to remap values? Would that help?

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

    I'm not really sure what I'm doing wrong, when I try to scale the type down, it only scales the size of the letters and the height of the box, but the width of the box and the text box stay the same, the letters keeping their positions and not adjusting the distance from one another when they grow or shrink. I've checked the expressions like six times, but I'm sure its the same

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

      Are you scaling the letter or the font size? I'm not totally sure how to replicate what you're describing but maybe some more context would help? Can you copy/paste the expression you've used?

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

    I'm trying to create a .mogrt for myself and my colleagues (university video dept.) for a lower third with TWO layers of text that can be adjusted independently in Premiere. So, a person's name in one customizable font, and their title in another. I can export a single layer of text with an auto-sizing box and matte, but not two. Any help is greatly appreciated. The present workaround is sharing the .aep file with everyone. Not ideal.

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

      Jason, I was trying to do the same thing. This tutorial helped me: ua-cam.com/video/7Y01aMBr2Eo/v-deo.html

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

    Why scale seems the only text property that enables the shape layer to resize? I tried first with the effect typewriter, then with the text animator opacity and it wasn't working. Only scale worked.

    • @ECAbrams
      @ECAbrams  Рік тому +3

      The why is that using the scale property changes the actual bounding box of the layer. So, when we reference sourceRectAtTime, the Rect is the rectangle formed by the bounds of the layer. If you animated tracking or position you would see that bounding box change as well. Opacity does not change the size of the layer. And typewriter, which is using opacity, also does not change the sourceRect of the layer. I hope that helps.

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

      The Range Selector doesn't affect the size of the Text Layer. What would I do in your case? Keyframe the Source text letter by letter to emulate the typewritter effect, then do SourceRectAtTime

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

    Hi..
    Can I do Auoto trace with expression?

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

      Not that I know of. But, what are you looking to do exactly? Maybe there is a way to get you there.

  • @JunaidUrRehman
    @JunaidUrRehman 5 років тому

    I ran into a problem when animating the text using text animator .. I just animate the scale from 0 to 100 with range selector everything seems to work well until I moved both layers in the timeline the box doesn't follow animation start time of the text layer it always starts from frame 0 regardless of the layer placement in the timeline. Is there a way to force it to follow the animation time of the text layer?

    • @gabrielcarreira8456
      @gabrielcarreira8456 5 років тому +1

      SourceRectAtTime() is equal to SourceRectAtTime(time), so I think that in the () you can add a "+InPoint" like SourceRectAtTime(time+InPoint)

    • @Daniel-up8nf
      @Daniel-up8nf 5 років тому

      @@gabrielcarreira8456 (time-InPoint)

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

    Hi Evan / guys, I'm looking to auto-animate a single textbox for multiple text layers. For example, think of subtitles or several headlines that consist of plenty of text layers. How can a single box layer containing a 3-word-text-layer, auto-expand to the next text layer containing 7 words? and how can that one auto-reduce to the next text layer that contain 5 words? and so on... Will you take up this challange? or at least come up with a satisfactory idea? Thnx :)

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

      SourceRectAtTime looks specifically at a certain time. So, since there will be moments when a text box is one size, then a time when it's another size, you would just need this time value to change or be always referencing the size "now" using the word "time" in place of an actual number.
      With that in mind, how then do we animate when the source text is changing? Since the source text is using hold frames, we have something we can check and values we can animate between. So the time that we reference should be before and after any keyframe on the sourceText property by a given margin. You might use the ease() or linear() or some other function to move between these values.
      Does that get you started?

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

      @@ECAbrams I've throroughly looked it up, and even downloaded the project file. it just gets complex messing with the expressions unfortunately, and anyway the main purpose is auto animation. So I'm not sure my request was met. I think the challenge is to force AE "understanding" when multiple text boxes in different lengths swap from one to another. Check out the BLACK text box in this link starting from 2:26, do you think AE is capable of doing just that using no keyframes?
      ua-cam.com/video/07NB-Zdjowg/v-deo.html

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

      @@idan_ronen Yes, I do this Ae can do this. Ae uses Javascript for expressions. Obejcts and functions can point to any data inside the system. When a layer starts, what the time is, how long should a thing be. These are all knowable things. Maybe I will look into the specific solution for a later tutorial. But I can't promise a quick answer for your very specific request.

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

    Are there any tutorials on making the box fit to the longer line of text if you're using two lines of text? I've scoured the internet for hours without finding a solution...

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

      you'll need to use an if/else expression. If A is longer use A's length. If A is not longer, use B's length. Does that make sense?

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

      @@ECAbrams Yes, it makes sense in principle, but I can't get it to work. Do you have an example of how the expression would look, exactly?

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

      Discord

  • @imaby.k
    @imaby.k 2 роки тому

    I'm facing an issue, my text layer bounding box is not changing when I write in more text and its cropping the extra text untill i manually change adjust the text layer bounding box, ( here I'm not talking about the rectangle shape layer) and thus I am not able to use this effect, please help if you have any solution to this.

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

      Hey, a bit late , but your text is set up as paragraph text. If you take the type tool and just click on the screen once it to create a new text layer, it shouldn't have a bounding box. There's a way to right click with the type tool and convert it to point text, but I'm not seeing the function right now.

    • @imaby.k
      @imaby.k 2 роки тому

      @@williamtpenningtonart thanks a lot 😇

  • @user-bm3rc3os6d
    @user-bm3rc3os6d 3 роки тому

    Question! This completely stopped working as soon as I started animating the source text (I mean keyframing the text to change into different text). Any idea what i'm doing wrong? Can't figure it out :(

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

      It's all about the time. So if you're dropping keyframes around, remember that we'er altering the position based on how the box is at a certain time. So if that time is always "now", things will get strange as the box is literally changing. You'll need to make the time referenced a static time, like when all animation is resolved for example. Does that make sense?

    • @user-bm3rc3os6d
      @user-bm3rc3os6d 3 роки тому

      @@ECAbrams Thank you for getting back to me on this! When it comes to expressions my brain turns to mush pretty quickly but what you said did make sense and I appreciate it. I think i'm struggling most with finding the right SourceRecAtTime() expression for what i'm trying to do but thank you for pointing me in the right direction! 🙏

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

    I need some help, I am trying to creat captions with this expression, everything works great but, the problem is that when I use "source text" to alternate text; the thing is that when I have animated the scale it just works with the first keyframe. Do you know how may I make it works with source text keyframes?

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

      For sure. The arguments in the SourceRectAtTime() reference a time. So looking at: Layer.sourceRectAtTime(t = time, includeExtents = false) we can see that the first argument is about when the layer is being looked at. To that end, if you always wanted to look at the current time you should write "time", since that will recall the time that the current time indicator is at. If you put 0 it would always look at the time of 0 seconds. Does that make sense?

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

      @@ECAbrams Awesome, sure it makes sence, but what I am trying to do is: when I add a new key frame in "source text" and type a new text, and that text change, I would like that the "scale animation" start over and reveal the text without repeat infinetely times the scale keyframes from 0% to 100%, I am loking for this since like a month and I still I don't get it

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

      I see. So in another way of saying it, you want a keyframe on one property to trigger the animation of another. Dan Ebberts has great articles on triggering animation. Definitely search him out on motionscript.com. It’s all about evaluating if the cti has passed a keyframe. Or if the time is greater than the last closest keyframe. It’s a heady concept and Dan does it best on that site I think. I hope that helps get you started.

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

      @@ECAbrams Thanks a lot for your kindness and nice answers, I will take a look Dan's articles, I will let you know if I finally find the way to do it...

  • @cyejames
    @cyejames 5 років тому

    Is it possible to have a slider for the X axis and one for the Y? so I can set different value for them.

    • @ECAbrams
      @ECAbrams  5 років тому +1

      Absolutely. You can link up as many sliders as you need. It's just another variable to get in the mix.

    • @cyejames
      @cyejames 5 років тому

      @@ECAbrams Thanx for replying. I'm not really good with expressions and I'm basically a beginner. Can u show me what the expression for doing this would look like. Thanks in advance.

    • @maestro_designs
      @maestro_designs 5 років тому

      @@ECAbrams I Also would like to know how to do this. Can you let me know how you would do it???

    • @ECAbrams
      @ECAbrams  5 років тому +1

      @@maestro_designs you make two sliders and feed thing into each part of the final output individually. Like:
      A=slider1;
      B=slider2;
      [x+A,y+B]
      Does that make sense?

    • @cyejames
      @cyejames 5 років тому

      @@ECAbrams Hey.. I've spent close to an hour trying to figure this one out.. kind of beyond where I'm at in AE presently. I don't exactly like having my hands held but if you dont mind can you incoperate it into what Ive got so far?? Appreciate you bro.
      a=thisComp.layer("Text").sourceRectAtTime();
      Height=a.height;
      Width=a.width;
      p=effect("Padding")("ADBE Slider Control-0001");
      x=Width+p;
      y=Height+p;
      [x,y]

  • @theodillon9931
    @theodillon9931 5 років тому +2

    lmaooooo "just like pitbull did with his lifestyle"

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

    You mentioned that you can use "thisLayer" instead of the layer name. I tried that and I get an error. It does work if I have the layer name. Why is that? I'd rather use "thisLayer" because I have about 20 text boxes to do.
    ua-cam.com/video/In4miXUdxko/v-deo.html
    Update: I tried Index instead and it works. This always happens, I figure something out AFTER I ask the question!

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

      No worries. Glad it worked out.

  • @leon-set
    @leon-set 5 років тому

    Where do I go to best to learn about expressions? helpx.adobe or is there some like secret tip anyone has?

    • @MotionMethods
      @MotionMethods 5 років тому

      Dan Ebberts motionscript is a good starting point. It’s an oldie but a goodie.

    • @ECAbrams
      @ECAbrams  5 років тому +3

      I often look things up at expressions.aenhancers.com. It's a great dictionary of sorts with examples and explanations of the individual parts.

    • @michaelohare390
      @michaelohare390 5 років тому

      @@ECAbrams Thanks for sharing this with us, much obliged :)

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

    FYI, adding a "blur" text animator breaks the shape from animating along with the text. It will just stay the max size. I just spent three hours in hell to reach that conclusion. You're welcome :)

    • @diehardsmokehead
      @diehardsmokehead 7 місяців тому +1

      made me laugh but appreciate the comment man

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

    finally need to expand the capabilities of this brilliant trickery, and probably far too late to get any help :) because why be timely
    i'm trying to add a gradient ramp to my text but it varies in the amount of lines - sometimes 1, sometimes 5. is it possible to tie the "start of ramp" to always be at the top of the first line, and the "end of ramp" to always be at the bottom, no matter how many lines? here's what i adapted thus far. the start and end move together and i can't figure what the thing is that i'm missing
    //applied to start of ramp
    TXT = thisLayer.sourceRectAtTime();
    HT=TXT.height;
    WD=TXT.width;
    Left=TXT.left;
    Top=TXT.top;
    x=Left+WD;
    y=Top+HT;
    [x,y]
    //applied to end of ramp
    TXT = thisLayer.sourceRectAtTime();
    HT=TXT.height;
    WD=TXT.width;
    Left=TXT.left;
    Top=TXT.top;
    x=Left+WD;
    y=Top+HT*2;
    [x,y]
    thanks for any and all help

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

      So, the first thing to understand is how the gradient works with space. Where IS 0,0 for the gradient ramp effect? Confusingly, that would be the top left corner of the frame. So we need to convert where the top left corner of the text layer is. It might be easiest to just count from the baseline. Try something like this for the start:
      var L = thisLayer.sourceRectAtTime();
      var x = L.left;
      var y = L.top;
      position + [x,y]
      That should put the gradient's start position in the top left corner of the text layer regardless of where the text is, and how large it is.

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

      @@ECAbrams thank you sir. very much appreciate your input. it's behaving oddly when i add a second line - and center align that text - the "start" point moves down, and continues to move down (away from the top of the first line) with each subsequent line added, with each realignment of the block of text.
      for the "end" i changed [x,y] to [x,value[1]/2], which succeeded in moving y down, but notso that it attached to the baseline of the last line. what i'm not understanding is how SRAT calculates how to attach to a position that changes

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

      @@philipames8583 are you doing anything to the anchor point of this layer? Because that's going to change things.

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

      @@ECAbrams i am resetting the text to align to the center of the comp, so the anchor point is changing. I tried to prevent that with a Chris Williams snippet…
      [value[0], sourceRectAtTime().top + sourceRectAtTime().height/2]
      …which serves to keep the text centered on screen, whether one line or 10, but the start and end of the ramp still shifts. It seems I’m just not understanding whether the ramp points can be attached to definite yet changing positions on the ‘y’ axis.
      Trying to make gradient ramp behave like an accordion, to expand and contract like the bellows. everything suggests SRAT is the right way, but apprently not for me 😆

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

      i seem to have a fix. not sure how elegant it is, or how approved it would be, but
      //on start of ramp
      thisLayer.toComp([0, 0]) + thisProperty.value
      //on end of ramp
      thisLayer.toComp([value[0], thisLayer.sourceRectAtTime().top + value[1]]);
      thisLayer.toComp([value[0], thisLayer.sourceRectAtTime().top + thisLayer.sourceRectAtTime().height + value[1]]);
      i changed the 'y' position of start to -10, to keep it just under the top line, and -30 to the 'y' of end. and, for the moment, it's sticking to to the top and bottom of the text, no matter how many lines. thank you for challenging me to think beyond my capabilities