SourceRectAtTime() Expression- Adobe After Effects tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ธ.ค. 2024

ความคิดเห็น • 381

  • @squallrulz0685
    @squallrulz0685 8 ปีที่แล้ว +1

    I've been watching videos about expressions for days and this is arguably the best explanation I've found. Thank you. *bows

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว +1

      glad it's helpful. I find most tutorial tell you what to do but beyond that it's just a recipe.

    • @squallrulz0685
      @squallrulz0685 8 ปีที่แล้ว +1

      Well I'm gonna binge watch all of your videos. You're a great teacher. So thanks from across the internet.

  • @GraceandWisdom
    @GraceandWisdom 8 ปีที่แล้ว +1

    Evan, this has to be the most comprehensive understanding of Expressions in After Effects! Thank you! After your explanation of how expressions are formed I have a clearer understanding of the language.

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว +1

      Thanks great to hear. And like any language, make sure you practice often. Cheers and best of luck.

  • @timeijs12
    @timeijs12 6 ปีที่แล้ว +1

    When you think you're watching a regular screencap tutorial and all of a sudden there's fancy infographics and animations..
    Great tutorial man, you've earned my sub :)

    • @ECAbrams
      @ECAbrams  6 ปีที่แล้ว

      you should see my one on math.sin ;)

  • @etaymatzliah8121
    @etaymatzliah8121 8 ปีที่แล้ว +26

    For anyone who's having issue with aligning the text with the box, I was able to fix it. not sure if it works flawlessly but it works fine for me.
    use this expression on the Text layer Anchor point:
    R = thisLayer.sourceRectAtTime(time);
    L = R.left;
    T = R.top;
    [L,T]
    The code above will make sure that the text's anchor point will always be in the Upper left corner
    Then make sure that box layer anchor point and text layer anchor point are the at the same point
    Hope it helped you, If it did please like this comment so everyone will see

    • @maroonhorizon
      @maroonhorizon 7 ปีที่แล้ว

      That one didn't work for me. It corrected the y position, but the x starts late. Where is the anchor point for your shape layer?

    • @alivingcactus
      @alivingcactus 7 ปีที่แล้ว +1

      I LOVE YOU!

    • @davidp.6108
      @davidp.6108 7 ปีที่แล้ว

      Hi, thank you! Do you also know how to connect the anchor point to the lower right corner?

    • @davidp.6108
      @davidp.6108 7 ปีที่แล้ว

      Got it, just add width and height

    • @guidolois
      @guidolois 7 ปีที่แล้ว

      How would this work?

  • @catalinamejia8871
    @catalinamejia8871 7 ปีที่แล้ว

    As a Graphic Designer I am starting to make a living with Motion Graphics too, and you are one of my favourites. You teach just the things you actually need out there. Great Work! :D

  • @ajsison444
    @ajsison444 8 หลายเดือนก่อน

    Coming from 2024, the time-s.inPoint is EXACTLY what I needed. My animation would break when I'd move the layer forward. Thank you!

  • @jordanleewillox8615
    @jordanleewillox8615 8 ปีที่แล้ว

    This is frickin' fantastic. I have been waiting for years to figure out how to do this. I'm not sure how it slipped by me. Thank you, sir!

  • @Paul2
    @Paul2 9 ปีที่แล้ว

    I love the way you make your videos. Examples of the effect first, and even creativity with that! Subscribed.

  • @nateido
    @nateido 10 ปีที่แล้ว

    Oh my God this video is amazing. I love it. You just took it to the next level here. I love the explanatory parts.

  • @Taroles
    @Taroles 3 ปีที่แล้ว

    16:50 OMG I've been looking for how to solve this problem for the last 3 hours, you saved me Evan thank you so much

  • @ChrisFroyd
    @ChrisFroyd 10 ปีที่แล้ว

    Incredibly helpful. The mograph tut in the middle was awesome and informative as well. Expressions like this are what I'm trying to improve on.
    Cheers

  • @thomasbalzuhn1147
    @thomasbalzuhn1147 10 ปีที่แล้ว

    That explanation animation in between is awesome. (Maybe you could show how something like this is done...)
    Keep them videos coming in 2015, you are a great teacher :D!

  • @EndureEnt
    @EndureEnt 6 ปีที่แล้ว

    The object transition at @11:42 was beautiful!

  • @jorgepradoungodevelasco8390
    @jorgepradoungodevelasco8390 7 ปีที่แล้ว +1

    Un tutorial muy interesante. Me ha sido de mucha utilidad. Gracias.

  • @CJJC42
    @CJJC42 9 ปีที่แล้ว

    You were on 99,999 subs so I had to subscribe even before I started watching your videos and without a doubt after watching two or three I would be subscribing anyway!

  • @matshu76
    @matshu76 10 ปีที่แล้ว

    Glad your back dude...... you have been missed

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว +1

      Glad to be back.

  • @TheFinalRevelation1
    @TheFinalRevelation1 6 ปีที่แล้ว +1

    Great tutorial. I actually am forced to learn the guts of this thing because I want to build a custom animation or an hour long srt (subtitle) file. Yes in hours. Thus far I have been building raw png sequence @ 60fps and 4k images using C#. The file size and processing power required is immense. I hope I can use expressions to minimize that. I need custom fade in and fade out and a custom zoom for text.

  • @toongum
    @toongum 9 ปีที่แล้ว

    OMG You BACK!!! BACK AGAIN!!! I don't even watch the video, screw it! :D

  • @tomgoffnett5624
    @tomgoffnett5624 9 ปีที่แล้ว

    Great video (production)! Look forward to browsing your channel and watching more. You are very easy to understand. Thank you!

  • @CommandLineHero
    @CommandLineHero 9 ปีที่แล้ว

    Long time no see dude. Excellent video!

  • @SeainWillingham
    @SeainWillingham 10 ปีที่แล้ว

    Excellent insight into expressions!

  • @oscand9512
    @oscand9512 9 ปีที่แล้ว

    Thanks Evan for all your useful tuts.
    I just want to share a tip I found tell me what do you think?
    Expression to write on the shape layer size:
    var mytext = thisComp.layer("text");
    [mytext.sourceRectAtTime(time-mytext.inPoint).width, mytext.sourceRectAtTime(time-mytext.inPoint).height];
    Expression to write on the shape layer position:
    var mytextY = thisComp.layer("text").sourceRectAtTime(time,true).top;
    var mytextX = thisComp.layer("text").sourceRectAtTime(time,true).left;
    var boxsize = thisLayer("Contents")(1)("Contents")(1)("Size");
    [mytextX+boxsize[0]/2, mytextY+boxsize[1]/2];
    Expression to write on the transform layer position:
    [0,0,0];
    Then parent shape layer to text layer.
    Everything is working perfect even though you change the text layer anchorPoint, position, paragraph setting and animate it.
    Hope it's useful.

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      +os cand why do you need to put an expression on the position to put it at [0,0,0]? That has the same result of just setting the value of that property to 0,0,0 right?

    • @oscand9512
      @oscand9512 9 ปีที่แล้ว

      +ECAbrams to make sure transform position is at [0,0,0] no matter the value.

    • @Rygorius
      @Rygorius 9 ปีที่แล้ว

      Hi +os cand - could you explain what you're doing in the Expression to write on the shape layer position: I can see you're defining X + Y as the top and left of the text box, but I'm a bit lost after that! Thanks!

    • @oscand9512
      @oscand9512 9 ปีที่แล้ว

      +Rygorius It is just a way to resize the box according to the text size, animation etc

    • @phsvideo8711
      @phsvideo8711 8 ปีที่แล้ว

      +os cand I've copied and pasted your expressions into a comp of my own and because I don't know enough about expressions, I've gotten an error for the position expression. I'm not sure if any of the names need to be changed for my own layer names?

  • @milonguita9
    @milonguita9 3 ปีที่แล้ว

    Hey, thanks for the tutorial. I´m wondering if there´s a way to get the left and right positions, to link some objet to the shape or to the text width, so in different texts, we can get a different position for this secondary animation..

  • @f2media567
    @f2media567 9 ปีที่แล้ว

    Great tutorial. Question- is there a way to add a little bit of extra space around the text so that the edge of the rectangle isn't so tight around text. A way to automatically generate some breathing room around it?

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      sure. You have an expression that is returning you a length, so if you want it longer add some number to that length. Also you can add some numbers to the anchor point. Or add some numbers to the stroke of the rectangle. The short answer is math.

    • @timothymurray8027
      @timothymurray8027 6 ปีที่แล้ว

      what expression do you use and where would you put it? after width with something like +5?

  • @felipegalindez3231
    @felipegalindez3231 7 ปีที่แล้ว

    Dude, your tutorials are awesome. Been strugling with a linear expression to do the same shit on an editable l3 for premiere, but the curve interpolation it's quite restricted using that kind of exp. (just linear, ease, easein, easeout). Of course i'll need to reconstruct all the comp from scratch, but i think this solved that limitation. Thanks a lot dude!

  • @TVDramaHome
    @TVDramaHome 4 ปีที่แล้ว

    work perfectly, if I have two lines of text one is aligned right and one is aligned left, what should I do?

  • @RahulAgrawal21
    @RahulAgrawal21 10 ปีที่แล้ว

    Thanks for coming back

  • @kyleritchie862
    @kyleritchie862 7 ปีที่แล้ว +2

    I want the box to start out a certain size/height and then expand horizontally with the text...would there be any statement that could do this? Something that would tell it "start out this size" + "UNTIL the text is about to go outside the box"

  • @donegan50
    @donegan50 7 ปีที่แล้ว

    This was a tricky one, but I'm pretty new to using expressions so I guess it was useful.

  • @JimboHamster
    @JimboHamster 9 ปีที่แล้ว

    i cant remember i was in your which tutorial, you set to all layers rotate expression , somethig "index . .+30." whatever, in short , your 1st layer 0 degree, second layer 30degree, third layer 60degree and etc. which expression was it? and how to apply

  • @MrTrekado
    @MrTrekado 10 ปีที่แล้ว

    I Love you man
    You always have a Smart and Creative Info Thank youuuuuuuu

  • @mehdiheidari4958
    @mehdiheidari4958 3 ปีที่แล้ว

    it was great! thank you, I have a question: how do i make the box as large as the text smoothly without jumping, when i keyframe the text layer and write a larger text?

  • @talwag
    @talwag 6 ปีที่แล้ว

    Super helpful. Taught me a lot!
    Thanks

  • @gabevf
    @gabevf 7 ปีที่แล้ว

    dude. fantastic tutorial. very funny, too. thank you

  • @philippelevesque3947
    @philippelevesque3947 5 ปีที่แล้ว

    Works perfectly when paragraph is left align, what if I need to align it right?

  • @enjoyyourtime
    @enjoyyourtime 5 ปีที่แล้ว

    Can you do the same with shape created from vector shape (for example paint stoke shape). I've managed to do it partially. Problem I've encountered is that the longer the name, the wider the sides on the BG shape. it doesn't scale proportionally ?

  • @etaymatzliah8121
    @etaymatzliah8121 8 ปีที่แล้ว

    This was so helpful. thank you very much!

  • @bcwhit06
    @bcwhit06 10 ปีที่แล้ว +1

    Hey Evan, I've been binge watching your tutorials for a bit now as I've just been getting started with AE and motion graphics these last few weeks.
    I wanted to purpose some better language definitions for a more ubiquitous usage consistent with general computer science and programming regarding things you refer to as "properties", and such. Btw, your graphical explanation was awesome and my intention here is not to pick apart your words but rather attempt to provide more informed language and consistency.
    The usage of the period to access properties or functions of objects is called dot-notation syntax, and is common to many programming languages, including (apparently) AE's scripting language.
    AE's scripting language, when compared to things like actionscript, java and javascript, appears to be very similar in regards to accessing properties and calling functions. So with that in mind here are some loose definitions that may help reconcile this with programming terms:
    Property (or attribute): A value (or object reference) that is known at the time which you look at it. Good examples of these in the video would be things like `width` and `height`.
    Function: A function is something that needs to be "called" or executed. This execution takes place when you follow a function's name with parentheses. Functions return some calculated value or object reference. Some functions can take arguments (as you mentioned, thumbs up) which may modify what is returned. So in this video the `sourceRectAtTime` is an example of a function; this particular function seems to have default arguments which means that the arguments are optional, but they are used to calculate the return non-the-less.
    Also, there is a distinct difference between "brackets" and "parentheses". As mentioned before, parentheses are used to call functions where as brackets are the notation used either access an array at a given index (in some languages also access hashes / dictionaries) or to define an array literal. In the case where you're doing something like `thisComp.layer("somelayer").position[0]` you're using brackets to access the value at index 0 (array indexes begin at 0 rather than 1). In the case where you return the value of your expression with `[x, y]` you're defining an array literal and because it's the last thing in the expression it is what is returned as the result.
    Again, not tryin to be a stickler, just thought this might be helpful. Thanks for the high quality content and keep it coming!

  • @MariyaPylayev
    @MariyaPylayev 7 ปีที่แล้ว +2

    How do you add margins that apply evenly all around? I tried adding padding to the x and y but it only extends in two directions, if that makes sense. I assume this is because of the anchor point

    • @michaelohare390
      @michaelohare390 7 ปีที่แล้ว +3

      Add a stroke, its a shape layer.

  • @jerichoumali9241
    @jerichoumali9241 9 ปีที่แล้ว

    You are awesome keep doing stuff like this please!

  • @atropper
    @atropper 5 ปีที่แล้ว

    one of your best

  • @jeanphilippendri4879
    @jeanphilippendri4879 ปีที่แล้ว

    Hello, I want to know precisely, the différents actions and relations between width, height, top and left in sourceRectAtTime expression

    • @ECAbrams
      @ECAbrams  ปีที่แล้ว

      width and height are, as their names suggest, returning the horizontal and vertical size of the text layer. Left is measuring the distance from the baseline to the left most boundary of the layer. Top does similar but from the baseline to the topmost boundary. They will return the value at the time specific and can be used to compute relative locations on a text layer. Does that help?

  • @DomBurgess
    @DomBurgess 6 ปีที่แล้ว

    Hmmm...this doesn't appear to be working for me. It puts the anchor point at the top (in fact, just above) the boundary of the text box. It doesn't change when I resize text either. Help! :)

  • @guidolois
    @guidolois 7 ปีที่แล้ว

    You're my hero. Got a question tho, I'm using this to subtitle a video, so I'm gonna be having several different keyframes in the text layer, all centered up. This expression is beautiful but whenever I try to apply it to several different lines of text it will adjust the size properly but the box just runs around everywhere. Any thoughts? Thank you so much!

  • @TheAfterMovie
    @TheAfterMovie 10 ปีที่แล้ว

    Nice tutorial, i loved the graphic explanation. Apart from that, what if you scaled the text from the top left instead of scaling from the character tab?.

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว

      Didn't we do that. Bottom line is there are many ways to skin this cat. All with fun little caveats. Play around with it and I'm sure everyone will find a solution that works for them.

  • @stevethurow1559
    @stevethurow1559 8 ปีที่แล้ว

    Great tutorial, amazing how a little code can save a lot of work. I was wondering if there is a way to use an if/else statement to compare two text layers and use the width of the wider layer? Say a lower third with a 1. name and then a 2. title below it. I have done your tutorial on one layer with no problems and adapted it to the following in the hopes that it would work but alas no joy.
    s1=thisComp.layer("^Subject");
    s2=thisComp.layer("^Title");
    x=if (s1.sourceRectAtTime(time-s.inPoint,true)>s2.sourceRectAtTime(time-s.inPoint,true)){s1.sourceRectAtTime(time-s.inPoint,true).width+30}
    else
    {s2.sourceRectAtTime(time-s.inPoint,true).width+30};
    y=225;
    [x,y]
    Thanks,
    Steve

  • @eophilip4351
    @eophilip4351 4 ปีที่แล้ว

    Great tutorial. Watched the whole thing and had a few laughs/giggles. Thanks : )
    Question: How would I go about this when the source text is being fetched from a CSV/JSON? I get all kinds of weird offsets on the shape layer :( Adding +70 for Position sorts it out for my set font size, but scaling the font up turns everything into a mess again.
    Edit: Never mind. I wrongly used the Property pickwhip instead of the Expression pickwhip to link to the text line :)

  • @hananafif165
    @hananafif165 4 ปีที่แล้ว

    how to do shape position if u want to align right those shape?

  • @Berkeflix
    @Berkeflix 10 ปีที่แล้ว

    Off-topic but I saw a typo in your outro. "Ask suff".
    But thanks for the video. You've helped me alot!

  • @DUMBCAT86
    @DUMBCAT86 7 ปีที่แล้ว +4

    Amazing for creating templates for my editing team to use in Premiere. Can you explain how I could adjust the expression so the text/bar can reveal in center and right-justified formats? Thank you!!

  • @stewartfurini
    @stewartfurini 7 ปีที่แล้ว

    Coming late to this but thanks for a great tutorial and explanation. Cheers!

  • @rhut10
    @rhut10 9 ปีที่แล้ว

    i greatly appreciate everything you do, thank you sir!

  • @AsherIsbrucker
    @AsherIsbrucker 8 ปีที่แล้ว +4

    Hey Evan, great tutorial. One question: I'm using this as a Live Text template for Premiere, but when I edit the text in Premiere, the box doesn't resize to fit the new Premiere text, it remains the original size of the source text in Ae. Any ideas on how to fix this?

    • @ffaabb79
      @ffaabb79 8 ปีที่แล้ว

      Did you find a way ? wondering the same question

    • @sharpywilliam4513
      @sharpywilliam4513 7 ปีที่แล้ว

      Try instead, on Premiere, right click your clip > replace with AE composition > and edit your text directly in AE instead, it shouldn't give you troubles, plus its more reliable. You edit what ever text you need in AE, save it, and automatically you'll have it ready in Pr.

  • @deniscoq1395
    @deniscoq1395 5 ปีที่แล้ว

    Thanks for this great tuto! it works perfectly with a rectangle.
    I used the same expression with a line but the line is always longer than the text (although proportional )
    Do you have an idea why it does so ?

  • @scotchmist_
    @scotchmist_ 5 ปีที่แล้ว

    Can I say to AE by expression to highlight the exact word in the text layer if a have a bunch of? Maybe this shape layer should be related somehow to the source text?

  • @RonaldCortez
    @RonaldCortez 9 ปีที่แล้ว

    Hey Evan! Great tutorial!
    But, is there a way to have the text right aligned? And have the box behind grow right to left?

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      sure, why not? Make the text right aligned in the paragraph pallet. Make the needed changes to the maths in the expression or just flip the layer? Does that track?

    • @nmwassenberg7943
      @nmwassenberg7943 9 ปีที่แล้ว

      ECAbrams What about center-aligned? I have several project that needs centered text and not having to resize all the boxes for each of the 200 shape layers for each project would be stellar.

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      NM Wassenberg so centre aligned things are equidistant from the anchor point? Can you think of something that might cause shape layers to have their bounds be equidistant from the anchor point?

    • @yijin3556
      @yijin3556 3 ปีที่แล้ว

      @@nmwassenberg7943
      s = TheComp.Layer("")
      x = s.sourceRectAtTime().width;
      [x, value[1]]
      try this

  • @Lombo991
    @Lombo991 10 ปีที่แล้ว

    Great video! Even if I'm Italian and my english is not that great, I understood almost everything you said about expressions, and my previous knowledge about was… NONE. :P
    But I have a question :)
    What if I would like, for example, to make the rectangle 10px higher and wider than the text? Just a little border…
    Where should I put, in the expression, that extra 10px?

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว +1

      So you want the height to be +10 pixels? I would put a +10 on whichever variable governs the height when you type out the expression.

  • @pmcgb
    @pmcgb 9 ปีที่แล้ว

    Thank you for this tutorial, sorry if you explained this and I am just dumb, but is there a way to add some buffer area on the rectangle around the edges of the text?

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      you mean like adding some number to the expression like +25 or something? Or maybe adding a stroke ot the solid? How do either of those solutions sounds to you?

    • @pmcgb
      @pmcgb 9 ปีที่แล้ว

      ECAbrams They sound good, thank you!

    • @pmcgb
      @pmcgb 9 ปีที่แล้ว

      ECAbrams Any thoughts on linking both a title and subtitle?

  • @jordanleewillox8615
    @jordanleewillox8615 8 ปีที่แล้ว +4

    Did you ever solve the ascender/descender & floating anchor point issue?

    • @etaymatzliah8121
      @etaymatzliah8121 8 ปีที่แล้ว

      Did you? im having the same issue. if anyone was able to fix it please reply here

    • @JakeBartlett
      @JakeBartlett 7 ปีที่แล้ว +1

      Parent the text box to the text layer.
      Separate dimensions on the text box position.
      Add expressions to X & Y properties:
      For X "thisComp.layer("Your Text Layer").sourceRectAtTime().left;"
      For Y "thisComp.layer("Your Text Layer").sourceRectAtTime().top;"
      So long as the text layer is parented to the box, it'll always move where it needs to in order to stay aligned with the ascenders and descenders.

    • @JakeBartlett
      @JakeBartlett 7 ปีที่แล้ว +2

      Or:
      Leave the text box unparented
      Add expression to the Position property of the Tranform Controls for the Rectangle Group within your shape layer:
      var s = thisComp.layer("Your Text Layer");
      var l = s.sourceRectAtTime().left;
      var t = s.sourceRectAtTime().top;
      [l,t];

  • @isaac10231
    @isaac10231 10 ปีที่แล้ว

    YAY YOU'RE BACK

  • @KuneMaster
    @KuneMaster 10 ปีที่แล้ว

    Awesome tutorial thx... how would you make the expression so the height starts at the maximum, so its not popping down when the letter p comes on? I've tried to check the outPoint, but that only works when the text is not animating out again.

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว

      Well if its not the in point. And its not the out point. How about a time that is half way between the two?

    • @KuneMaster
      @KuneMaster 10 ปีที่แล้ว

      ECAbrams Yeah sure I can just check it idependantly on each animation. But i thought there might be a way to use this as a preset so I can animate it how ever I want not knowing when the biggest height is occurring in time.

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว

      Well if you know for example that the halfway point of the layer will always be at full on then you can just do the average of the in and put points. To find the max of the dimensions irrespective of time requires more coding than I can get the energy to do at this hour.

    • @KuneMaster
      @KuneMaster 10 ปีที่แล้ว

      OK.. thx anyway :)

  • @FlavioTrillo
    @FlavioTrillo 9 ปีที่แล้ว +2

    "Oh my god, I'm going to poop!" great tutorial, love the explanations of the expression done in animations. That really clarified some stuff for me!

  • @82maor
    @82maor 6 ปีที่แล้ว

    Hi, I'm trying to understand the properties of sourceRectAtTime() of "top" and "left" as mentioned on their latest script guide. is it the position of the rect? their values are often negative....

    • @ECAbrams
      @ECAbrams  6 ปีที่แล้ว

      Top and left are the distance from the baseline (the origin of the text) to the Top of the layer or the Left of the layer. That's about it. The number can be negative because it's describing a distance relative to that baseline. Height and width are positive because they describe the width and height, which is positive unless the thing doesn't have width or height.

  • @bluedreamcreative4561
    @bluedreamcreative4561 8 ปีที่แล้ว

    amazing tutorial man

  • @DatFunnyPerson
    @DatFunnyPerson 5 ปีที่แล้ว

    What if you are going for a centered text? Not bound to the left?

  • @pksmb1120
    @pksmb1120 8 ปีที่แล้ว +2

    This video describes the exact opposite of what I want to do. I want to have my text resize automatically to a predetermined bounding box and I'm simply struggling to understand the logic behind this expression. It's little things like this that I wished AE could simply implement as a tick box sometimes.
    I barely passed algebra in both high school and college so if you could please explain in either another video or to this comment on how to achieve said desired effect that would be of great help.

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว +1

      So this expression just returns the height and width of a text box that's about it. Just think of it like position or scale or any other property, but it's a property you can't access in the same way. If you want your text to resize, are you looking for it to scale? or just have the text box get bigger?

    • @pksmb1120
      @pksmb1120 8 ปีที่แล้ว +2

      ECAbrams I'm just wanting the text to scale down once it reaches the boundary of the text box. I think I'd have to have a video to show me how to achieve this. I'm a very visual learner and just explaining alone does little to help. Thanks for the reply.

    • @alexspildooren
      @alexspildooren 8 ปีที่แล้ว +1

      Any luck yet? would love to know how to do this.

    • @kevinhogan7814
      @kevinhogan7814 6 ปีที่แล้ว

      Did you solve this? It should be easy to pick-whip a box's horizontal size to the scale of a text layer. Then you just need to constrain the vertical size of the box so that it remains proportional.

  • @idan_ronen
    @idan_ronen 9 ปีที่แล้ว

    Hi Evan
    I'm on CS6 and hear youmention that I need a newer version. I guess it isn't likely to happen anytime soon.
    Can you please come up with an expression to us the CS6ers, or having a project file ready to download for CS6?
    Thnx

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      ***** there is another tutorial about that.

  • @Dan7aylor
    @Dan7aylor 10 ปีที่แล้ว

    Great tutorial as always, looks like I've got some reading up to do!
    Slightly off topic, but can I ask what font you use in your outro segment? (the bold serif font)

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว

      Its technically a slab serif font. Called Bree serif.

    • @Dan7aylor
      @Dan7aylor 10 ปีที่แล้ว

      The more you know! Thanks again!

  • @neilgs2638
    @neilgs2638 10 ปีที่แล้ว

    Good tutorial -- as always. I would like to request a tutorial: how to do a Voice Over in AE. Since we can't record directly in AE, I have to use either Premier Pro or Audition. I work mostly in AE, and I want to be able to record a voice over in either Au or Pr (which would be easier?), and then go back into AE to sync action better (or make changes). I want to then be able to re-record (in Pr or Au) and make changes in AE numerous times -- going back-and-forth -- until I get the result I want. I watched your tut on AE to Pr, but I can't figure out which method would not create the "endless loop" you described ( that would baffle Dr Who). thanx, Neil

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว

      I may. Thanks for the suggestion.

    • @neilgs2638
      @neilgs2638 9 ปีที่แล้ว

      ECAbrams I have 5-10 min comps in AE with just graphics, text, E3D, etc. (no video) that I want to do Voice Overs on. I think I found a work-around: If I send it to Pr, it makes a Sequence, and I can add Audio. The question is: how do I get just the Audio (wav) into AE, and then delete the Pr sequence (that I didn't alter) so it doesn't loop. Wouldn't that give me a VO in AE? And I could then freely change my graphics to better fit the audio file. And after those changes I could send it to Pr, create a new sequence, add or change the VO, creating a new wav file. And send just the audio wav to AE, and delete the sequence, over-and-over, until I get what I want (without creating loops b/c I delete the Pr sequence every time)? If that sounds reasonable, my question is: how do I send just the audio wave file back to AE before I delete the Pr sequence? Thank you very much, Neil

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      Neil GS If you want to export audio only from Premiere you can export things as a wav or some such. That's an option I suppose. Or just copy, tab to Ae, and paste. Have you tried that? All in this seems like a really time consuming method. I recommend people plan to avoid such a back and forth in their day.

    • @neilgs2638
      @neilgs2638 9 ปีที่แล้ว

      ECAbrams Copy n Paste works!!!!! I save file in AE, then open it in Pr, do VO, then Copy/Paste audio back into AE, (close Pr) and I have a VO in AE!! And then I can slightly alter the graphics to better sync with my best recording! Thanks for all your help!! Neil
      PS. When I am in AE and try to use Dynamic Link "New Premier Pro Sequence" a new file opens in Pr, but it has no content. Any suggestions?

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      Neil GS Why would a new Premiere Pro Sequence have content in it? It's new. IT should be empty if it's new.

  • @OkayYaraman
    @OkayYaraman 8 ปีที่แล้ว

    This tutorial is great! Thanks so much! Just one question: is there a way to anchor the text box to any corner of the screen while keeping the text justified left and staying inside the action safe area? So if you have the box in the lower right corner for example, the text shifts to the left as you type and moves upward instead of down when you hit return?

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      well in the text window you can specify if you want things to be justified left or right. But since we are able to read the height and width of the layer. And we know the position something would have to be to be inside the action safe. The rest is just math that you need to apply to the position and possibly anchor point of the layer. Your specific goal for the position, justification and versatility will greatly impact how much math you need to do though.

  • @cripwalkisfun
    @cripwalkisfun 9 ปีที่แล้ว

    Hi evan, have been using this in the past and it works really well. Have noticed now with the last few updates for after fx, the sourceRectAtTime does not recognise when you keyframe the value of the scale of the text characters anymore ._. yet when manually changing the value with no keyframe it works as normal... any ideas for a work around that doesn't involve key-framing every letter in the source text on the text layer? Have tried using opacity already to create the same effect as using scale but that does not work either

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      +yeah_alex Sorry, in what way are you changing the scale? Are you just altering the scale property of the layer or are you animating the scale in a text animator?

    • @cripwalkisfun
      @cripwalkisfun 9 ปีที่แล้ว

      +ECAbrams Inside the text animator. I worked out what was going on in the end, the original in point of the text layer has to stay on the timeline, you can't cut it off halfway up the timeline else the shape layer will start out of sync. not sure if it was always like this :0

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      +yeah_alex i imagine so. i read no release notes about a change

  • @robertcoker4433
    @robertcoker4433 10 ปีที่แล้ว

    A new video!!! By the gods can it be?

  • @ppractical
    @ppractical 10 ปีที่แล้ว

    Thanks for the tutorial it was very useful My question is that how could I do the following : the shape layer shows up first with the exact width and height needed for the text that would come after the shape layer has shown up. The way I put lower thirds on videos is that the shapes appear first then the text animates in. Thanks.

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว

      you should look into the "time" part of the argument to shore that up and use that to shift the "when" of the animation. Or use keyframes and just use the expression to get a baseline animating things that modify that baseline.

  • @BazDZN
    @BazDZN 7 ปีที่แล้ว

    Hope you're all having a good day. I'm looking for an expression and hoping you can help! I've got two text layers that are shown side-by-side in the comp; one for the first name, second for the surname. I want the surname to automatically move left/right depending on the length of the first name keeping the distance the same between the two.

    • @ECAbrams
      @ECAbrams  7 ปีที่แล้ว

      So you want to change the position of one layer based on the width of another, plus some more? Basically, you would start with the value your position is at and just add the width of the other text to the horizontal. Does that do it?

  • @ttvd94
    @ttvd94 6 ปีที่แล้ว

    Really time saving. Thank you

  • @all-edit4369
    @all-edit4369 2 ปีที่แล้ว

    quick question: if need to limit to a shape background? how can i do it?

    • @ECAbrams
      @ECAbrams  2 ปีที่แล้ว

      If the shape can be expressed as some dimension, we just need to covert the math. I would recommend linking into shape layer parametric shapes to start. If it needs to be a path shape, like we make with the pen tool, you'll need to do a conversion using scale.

  • @throbbingG
    @throbbingG 9 ปีที่แล้ว

    how do you do the snap shape to text thing on a Mac?

  • @RomboutVersluijs
    @RomboutVersluijs 8 ปีที่แล้ว

    Hi Ivan, this script helped a lot making a dynamic comment field in a mov using the markers as input. This way i could make the field scale according to the size, super great!
    Is it possible to let a textfield enlarge upwards instead of top>down. This way i can put the textfield in the bottom and if its more than X number of lines it enlarges upwards

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Rombout Versluijs using this method you get shapes that are the same size no matter how the thing enlarges. It's just a matter of dynamically linking the position and anchor points to always put the solid in the centre of the text I think no?

    • @RomboutVersluijs
      @RomboutVersluijs 8 ปีที่แล้ว

      Well i meant the textfield always adds text downwards. What i was looking for is that it will go upwards. Probably this cant be done with textfield it self. But perhaps i can have it have a fixed position from the bottom so it will move upwards each line it adds to the height. Hope you understand my crappy explanation...

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Rombout Versluijs well is we can know the height, which this expression gives us, then we can add a change in height (or subtract it) from the vertical position no? So as a thing gets taller expanding down it can move up. Does that make sense?

    • @RomboutVersluijs
      @RomboutVersluijs 8 ปีที่แล้ว

      Yes, with flash i would have code height - clipHeight - 10px. This would than check each time what the height is.
      But can I add a second position syntax?

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Rombout Versluijs you would add it to the position property. If you want to alter a property, but the expression on that property.

  • @dindeldo2
    @dindeldo2 4 ปีที่แล้ว

    i know this is old. but when you make the new comp, you have black selected as background colour, and when you go into the new comp, the background ist transparent. what sorcery is this?

    • @ECAbrams
      @ECAbrams  4 ปีที่แล้ว

      There's a little toggle button at the bottom of the comp window to change between seeing the black background or the actual nothingness it represents. If you have that toggled on, when you open a comp it'll still be on, at least at the time of recording.

  • @abdullahalkatheri1239
    @abdullahalkatheri1239 5 ปีที่แล้ว

    this is so useful , thanks bro

  • @carlosiespinozab
    @carlosiespinozab 8 ปีที่แล้ว

    Hi there, I have to make text templates for TV and the text has to stay within safe margins all time so I would need to make the text resize if it goes over that area. Is there any way to do that with expressions and this method?
    Cheers, good tut, I'm already using this boxing method for my texts but I would need a max field before text would have to get smaller.

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Carlos Espinoza That's a good question. I think you're best bet would be to make the text relative to the safe margins and maybe try some if/then expressions. But I don't think it can detect if a layer is entering a certain space.

    • @carlosiespinozab
      @carlosiespinozab 8 ปีที่แล้ว

      Hey! I actually made it work and didn't see your answer.
      Indeed I ended up using if/then expressions. I just made a solid the size of the safe margins and made the text shrink in size if its box exceeded that solid.
      Your tut helped me a lot tho. Thanks man!

  • @aleksaharovsky
    @aleksaharovsky 5 ปีที่แล้ว

    Dude, you’re hilarious 😂 thanks for the great tut 🤘

  • @CurdledShark8
    @CurdledShark8 9 ปีที่แล้ว

    How do I sink audio with a layers size, position, etc?

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      +CurdledShark8 by linking the together with an expression on the size, or position that is linked to a layer of the converted audio? Have you see the bass shake tutorial I did on here?

    • @CurdledShark8
      @CurdledShark8 9 ปีที่แล้ว

      Thanks, ill watch the tutorial.

  • @saionjisan
    @saionjisan 8 ปีที่แล้ว

    one question....why do you need to substract the inPoint from the time? what exactly is inPoint and outPoint?

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว +1

      We do that so the effect happens relative to the inPoint of the layer. The inPoint and outPoint are the time, in seconds, that the layer starts on the timeline.

    • @saionjisan
      @saionjisan 8 ปีที่แล้ว

      ohhh...then layer starts on inPoint and finishes on outPoint?

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      Yes. That's what those mean. Or rather you should think of it that inPoint will return the value for when the layer starts and outPoint will return the value for when the layer ends. They're placeholders for those properties that can be used in calculations.

    • @saionjisan
      @saionjisan 8 ปีที่แล้ว

      oooooooooohhhhhhhh :D thank you for the explanation and you're time! :D You've been very helpful n.n

  • @xinyueyang1962
    @xinyueyang1962 6 ปีที่แล้ว

    you are a great person

  • @timothymurray8027
    @timothymurray8027 6 ปีที่แล้ว

    This is really cool but how do you pad the box around the text. Kinda crappy that Evan's examples have padding around the text in the intro but after watching this for 22 mins. (which is very helpful at many points throughout) he never get's around to explaining that part of the expression. If even he doesn't want the text touching the box, why does he want ours to?

    • @ECAbrams
      @ECAbrams  6 ปีที่แล้ว

      At 22 minutes the tutorial was long enough. If you want padding, just add the amount to each part of the size. [x+padding,y+padding]. Then some more math to keep it all aligned. It's really too much for one overly verbose tutorial.

    • @timothymurray8027
      @timothymurray8027 6 ปีที่แล้ว +1

      Where do you add it and what's "some more math to keep it all aligned" mean? I'd watch another 1hour to get that info.

  • @codylong
    @codylong 9 ปีที่แล้ว

    How would this work with right aligned text? This is a lifesaver but it seems like it only functions well working left to right because that's the direction the rectangle changes.

    • @codylong
      @codylong 9 ปีที่แล้ว

      +Cody Long Nvm, already figured it out... Linking the rectangle's position to the size was what was screwing me up. Simply changing the value of ".size/2" to a negative makes the the resizing move in the opposite direction. NOT linking the rectangle at all seems to work for Center Aligned text as well...

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว +1

      +Cody Long now you're on the trolly.

    • @phsvideo8711
      @phsvideo8711 8 ปีที่แล้ว

      +Cody Long can you explain what you mean by not linking the rectangle? Did you end up moving the anchor point of either the rectangle or text to achieve this?

  • @The_world_is_not_worthy_of_Him
    @The_world_is_not_worthy_of_Him 9 ปีที่แล้ว

    Hey, Evan, do you think you could make a tutorial (in adobe AE's cs4 and up) to change the skin color of people?

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      Raging Gamer maybe? What colour do you want to change from and to? It is quite difficult to make such a change look even remotely natural.

    • @The_world_is_not_worthy_of_Him
      @The_world_is_not_worthy_of_Him 9 ปีที่แล้ว

      ECAbrams From a natural skin tone, such as white or tan, to something completely different. Like red or purple.

    • @ECAbrams
      @ECAbrams  9 ปีที่แล้ว

      Raging Gamer ah, that's much simpler. The more abstract the effect the more easily it can be done. I'll look into it.

    • @The_world_is_not_worthy_of_Him
      @The_world_is_not_worthy_of_Him 9 ปีที่แล้ว

      ECAbrams Alright. :) And thanks.

  • @musaab549
    @musaab549 9 ปีที่แล้ว

    u say the projects are free to download, how can i download stuff for free from gumroad or paypal? i cant find any download button!
    - really GREAT tutorials, thank you.

  • @eww7270
    @eww7270 8 ปีที่แล้ว

    Is there a way to have a new box be created automatically? Like if I hit enter and created a new line of text within the same text layer, is there a way to have a new box be created and behave the same way?

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Evan Worsham If you make a new line of text in the same text box then you'll be changing the height of the text box and resizing the linked shape layer right? Since using this method you have the shape layer reading the vertical and horizontal size of the shape layer and translating that into its own height and width. So if you want separate and distinct rectangles you would need to have separate and distinct text layers so that the height and width information can be read. Does that make sense?

    • @eww7270
      @eww7270 8 ปีที่แล้ว

      +ECAbrams yes that makes sense. I guess I was just hoping. I need to make a template for my coworkers who don't use after effects that much, but still need to make content. Each line of text must have a separate box around it. I can create a mask to make it appear like the is a break in the box in between lines, and adjust the leading of the text accordingly. However, if one line is longer than the one below it, the box will look extra long on the shorter line of text. Would there be a way to have a mask follow just outside the left side of each line of text?
      I know this is complicated, just trying to figure this thing out. :/

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Evan Worsham to have a mask do that would indeed be complex and may not even be possible. When you make templates you need to consider limiting the technical scope or limiting the inputs from the user. So for example if a template cannot be made to fit with descenders from text then usually you want to force all caps so that's not a problem you have to design around. In your case the issue might be mitigated by having many text layers with matching boxes right? So if your client or co-worker in this case wants to have 3 lines they would type into a layer for line one, another layer for line 2, and a third layer for line 3. The boxes resize and all is well. Then you could, if you wanted to, perhaps have the positions of those things change depending on the average height of all 3 putting it in the centre. But again it all depends on the goals of the piece and the limitations you are willing to impose on the end user.

  • @ashleybaron
    @ashleybaron 8 ปีที่แล้ว

    I followed along exactly how you did and when I get to where I can change the name of the text, I get an expression error saying- layer named "text" is missing or does not exist. It may have been renamed, moved or deleted. What did I do wrong?

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Ashley Baron well, is there a layer names "text" for it to look at?

    • @ashleybaron
      @ashleybaron 8 ปีที่แล้ว

      +ECAbrams where you typed 'whtever' I just typed 'text' so the layer name is 'text' above the shape layer. I used the picwhip from the rectangle size to the layer 'text'. Everything seems to work how it's supposed to until I go to change the text and I get that error every time. thanks for the quick reply!

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Ashley Baron well, when you change the text in the text layer, does it change the name of that layer? The expression is telling you it can't find a thing with the same you've told it to look for. So is that thing perhaps not called the same thing after you update the text?

    • @ashleybaron
      @ashleybaron 8 ปีที่แล้ว

      +ECAbrams yes, as I change the text, the name of the layer changes as well, however, the name doesn't change in the expression like it does for you... I went back and tried from the beginning AGAIN lol and last time I pick whipped from the Rect size to the text position rather than just to the text layer in general... And now it seems to work! I thought that since I was deleting the 'transform.position' from the expression anyways that pick whipping to the whole layer wouldn't make a difference, but apparently it does! thanks for your replies

  • @anotherytacctno2
    @anotherytacctno2 6 ปีที่แล้ว

    hey, in terms of not repeating things, why not have the whole "sourceRectAtTime(time-s.inPoint)" consolidated into the "s" variable? then your 2nd and 3rd line would just be "x=s.width; y=s.height"

    • @ECAbrams
      @ECAbrams  6 ปีที่แล้ว +1

      It can really confuse beginners to present it that way. But if it works for you, go nuts.

  • @citpw
    @citpw 8 ปีที่แล้ว

    When I duplicate the later, say for another clip within one composition, it doesn't work too. Do you know how to re-use them as footage title?

    • @ECAbrams
      @ECAbrams  8 ปีที่แล้ว

      +Citra Purnawijaya you would need to make sure the things are all linked to the right things. So if I have text layer A and shape layer A, I would need to duplicate both to make Text layer B and shape layer B. BUT It is vital you ensure that the B layers actually are linked together in the way you expect.

    • @citpw
      @citpw 8 ปีที่แล้ว

      Thank you for your reply. Yes I thought so too. I will have a look into it. Cheers

  • @thedinardi
    @thedinardi 5 ปีที่แล้ว

    Anyone know how to do this but with a logo comp as the source? I want a shape that resizes depending on the logo I drop in. Thanks

    • @ECAbrams
      @ECAbrams  5 ปีที่แล้ว +1

      you could use.width for example to get the width of a layer. So things like layer.width or layer.height are available to you.

    • @thedinardi
      @thedinardi 5 ปีที่แล้ว

      @@ECAbrams thanks for the quick response but I'm still not getting it.
      So would the expression just be.
      s=thisComp.layer("Logo Main");
      x=s.width;
      y=s.height;
      [x,y]
      This does make it scale to the full comp size but when I key frame the scale of the logo comp it doesn't scale with it.

    • @ECAbrams
      @ECAbrams  5 ปีที่แล้ว

      @@thedinardi So, it's important to know that .width is not reading the scale. It's reading the width. So if a logo is 100*200 pixels, even if you scale it, the width is still 100. That value hasn't changed even if you scale a layer. So, you need to alter width using the scale to get where you want to be. And since the scale is represented as a number rather than a percent you need to do some math in there as well.

    • @thedinardi
      @thedinardi 5 ปีที่แล้ว

      @@ECAbrams Hmmm ok thanks. I'll try to do some more digging and see if I can figure it out.

  • @kaaze7
    @kaaze7 6 ปีที่แล้ว

    what if i just want to use it with a single line? Just a stroke. And the lengh of the text define the size of the stroke. I cant make it work :(

    • @ECAbrams
      @ECAbrams  6 ปีที่แล้ว

      So you want it to be a path? Like two points? is that it?

  • @Blocks0
    @Blocks0 10 ปีที่แล้ว +3

    Yes! Our After Effects lord and savior ECAbrams has finally brought us a new tutorial! Oh wait, it's a tutorial on expressions. Goddamn it! xD

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว +2

      They can't all be winners. But expressions are a core part of the AE experience that people constantly ask about so there might be something worth knowing in here.

    • @Blocks0
      @Blocks0 10 ปีที่แล้ว

      ECAbrams Yep. ;)

    • @TyronePerry
      @TyronePerry 7 ปีที่แล้ว

      I'm working on a project that's a training course, that uses a text template that gets used over 200 times. Being able to have things tied with expressions to the size of the text box is insanely helpful

  • @digdugbigbug
    @digdugbigbug 9 ปีที่แล้ว

    that's really great helpful! thx!

  • @edfoster792
    @edfoster792 10 ปีที่แล้ว

    Excellent, thank you!

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว

      You are welcome.

  • @MrAhmadAtaya
    @MrAhmadAtaya 10 ปีที่แล้ว

    did you tried this on premiere? as you can change the text in premiere?

    • @ECAbrams
      @ECAbrams  10 ปีที่แล้ว +1

      I did, and you can.

    • @MrAhmadAtaya
      @MrAhmadAtaya 10 ปีที่แล้ว

      ECAbrams thanks, i know i'm ,lazy ass

  • @guternoob
    @guternoob 6 ปีที่แล้ว

    You are the best so ez thanks :D