SourceRectAtTime() Expression- Adobe After Effects tutorial

Поділитися
Вставка
  • Опубліковано 30 лип 2024
  • The new sourceRectAtTime() can get you the width and height of text and shape layers. It's new but it's good. If you have Ae CC 2014.2 (aka 13.2.0.0) then you can enjoy this. If you don't have that option open and you want to make solids resize to text you should check out an older tutorial on this site.
    This tutorial also talks for a long time about expressions in general, so if you're not into that... get out now!
    This is the expression we wrote on the size:
    s=thisComp.layer("Hello people");
    x=s.sourceRectAtTime(time-s.inPoint,true).width;
    y=s.sourceRectAtTime(time-s.inPoint,true).height;
    [x,y]
    This is the expression we wrote on the position:
    content("Rectangle 1").content("Rectangle Path 1").size/2
    If you have any questions just let me know in the comments.
    Download this project file:
    viaGumRoad: gumroad.com/l/vcTx
    via Evanabrams.com: evanabrams.com/sourcerectattim...
    Twitter
    / ecabrams
    Google+
    plus.google.com/+EvanAbrams/
    Facebook
    / 193708234045591
    Website
    Evanabrams.com
    Suggest a tutorial topic: docs.google.com/forms/d/13A2e...
  • Навчання та стиль

КОМЕНТАРІ • 382

  • @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.

  • @etaymatzliah8121
    @etaymatzliah8121 7 років тому +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?

    • @alivingcactus5174
      @alivingcactus5174 6 років тому +1

      I LOVE YOU!

    • @davidp.6108
      @davidp.6108 6 років тому

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

    • @davidp.6108
      @davidp.6108 6 років тому

      Got it, just add width and height

    • @guidolois
      @guidolois 6 років тому

      How would this work?

  • @catalinamejia8871
    @catalinamejia8871 6 років тому

    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

  • @Paul2
    @Paul2 9 років тому

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

  • @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.

  • @gaston.
    @gaston. 8 років тому

    Excellent EC!! Your are very clear & precise with your tutorials.. plus the added humor makes it a joy to watch. Also, thanks for the added info graphics.

  • @tomgoffnett5624
    @tomgoffnett5624 9 років тому

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

  • @jordanleewillox8615
    @jordanleewillox8615 7 років тому

    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!

  • @dukebox86
    @dukebox86 6 років тому +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!!

  • @nateido
    @nateido 9 років тому

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

  • @rhut10
    @rhut10 9 років тому

    i greatly appreciate everything you do, thank you sir!

  • @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"

  • @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.

  • @RahulAgrawal21
    @RahulAgrawal21 9 років тому

    Thanks for coming back

  • @ChrisFroyd
    @ChrisFroyd 9 років тому

    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

  • @timeijs12
    @timeijs12 5 років тому +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  5 років тому

      you should see my one on math.sin ;)

  • @ttvd94
    @ttvd94 6 років тому

    Really time saving. Thank you

  • @MrTrekado
    @MrTrekado 9 років тому

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

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

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

  • @stewartfurini
    @stewartfurini 6 років тому

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

  • @jerichoumali9241
    @jerichoumali9241 9 років тому

    You are awesome keep doing stuff like this please!

  • @CommandLineHero
    @CommandLineHero 9 років тому

    Long time no see dude. Excellent video!

  • @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!

  • @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.

  • @EndureEnt
    @EndureEnt 6 років тому

    The object transition at @11:42 was beautiful!

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

    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!

  • @SeainWillingham
    @SeainWillingham 9 років тому

    Excellent insight into expressions!

  • @toongum
    @toongum 9 років тому

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

  • @isaac10231
    @isaac10231 9 років тому

    YAY YOU'RE BACK

  • @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! :)

  • @BlairKelly
    @BlairKelly 8 років тому

    Fantastic. Thank you so much!

  • @etaymatzliah8121
    @etaymatzliah8121 7 років тому

    This was so helpful. thank you very much!

  • @felipegalindez3231
    @felipegalindez3231 6 років тому

    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!

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

    this is so useful , thanks bro

  • @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?

  • @talwag
    @talwag 6 років тому

    Super helpful. Taught me a lot!
    Thanks

  • @gabriel1812
    @gabriel1812 7 років тому

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

  • @digdugbigbug
    @digdugbigbug 9 років тому

    that's really great helpful! thx!

  • @matshu76
    @matshu76 9 років тому

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

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

      Glad to be back.

  • @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

  • @bluedreamcreative4561
    @bluedreamcreative4561 7 років тому

    amazing tutorial man

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

    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 ?

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

    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

  • @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?

  • @edfoster792
    @edfoster792 9 років тому

    Excellent, thank you!

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

      You are welcome.

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

    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?

  • @Fullaperturepro
    @Fullaperturepro 6 років тому

    Thanks Evan!

  • @jorgepradoungodevelasco8390
    @jorgepradoungodevelasco8390 6 років тому +1

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

  • @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.

  • @xinyueyang1962
    @xinyueyang1962 6 років тому

    you are a great person

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

    one of your best

  • @guternoob
    @guternoob 6 років тому

    You are the best so ez thanks :D

  • @thomasbalzuhn1147
    @thomasbalzuhn1147 9 років тому

    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!

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

    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..

  • @ppractical
    @ppractical 9 років тому

    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  9 років тому

      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.

  • @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

  • @guidolois
    @guidolois 6 років тому

    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!

  • @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.

  • @jordanleewillox8615
    @jordanleewillox8615 7 років тому +4

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

    • @etaymatzliah8121
      @etaymatzliah8121 7 років тому

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

    • @JakeBartlett
      @JakeBartlett 6 років тому +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 6 років тому +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];

  • @stevethurow1559
    @stevethurow1559 7 років тому

    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

  • @riansaputra8673
    @riansaputra8673 7 років тому

    that WHTEVER thing made me subscribed! LMAO!

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

    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 ?

  • @shimi346
    @shimi346 6 років тому

    Thanks Bro!

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

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

  • @throbbingG
    @throbbingG 9 років тому

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

  • @neuron4d121
    @neuron4d121 7 років тому

    I like you man
    thank you very much

  • @TomPijnappel
    @TomPijnappel 6 років тому

    Thank you for this tutorial. Can someone help me with the following? I'm working on a template for a record label. My main text layer is "Trackname". And then there is one more text layer which is "[ Remix ]". Everything has to be centered so: PositionX of "[ Remix]" should be 960+(width from Trackname/2). It kinda works but not perfect, what am I doing wrong?

    • @tompijnappel7368
      @tompijnappel7368 6 років тому

      I found a SOLUTION to this if anybody has the same problem. Just make 100% both text layers are scaled at 100%.

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

      What's the composition of these elements specifically? You have a variable "track name" and constant "[Remix]" on the same line? and that line needs to be in the centre of a composition? Or is it something else?

    • @tompijnappel7368
      @tompijnappel7368 6 років тому

      I'm trying to figure out an answer to this but it's too complicated to explain what's the case here.
      I have one text layer which has to be in the middle of the composition. That text layer is editable for the final user (music trackname). However, some tracks are remixes or there is another sub text right next to it. Keep in mind this is a different text layer because it's smaller than the main trackname text. The expression only works on that specific text layer. So if there is more extra 'remix' text right next to it, it should center the WHOLE thing (So two text layers) instead of center the main text and place the text next to it. This sounds like rocket science, I need to explain with a video haha.

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

    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 :)

  • @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?

  • @contact1araya
    @contact1araya 6 років тому

    I have cs6 and it pops out a Function Undefined function every time I try to use sourceRectAtTime, is there an alternative to accessing a layer's width?

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

      Not that I'm aware of off hand. But there may be some older work done on that archived at Creative Cow. It's certainly a problem that has plagued users for a while.

  • @Berkeflix
    @Berkeflix 9 років тому

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

  • @pksmb1120
    @pksmb1120 7 років тому +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  7 років тому +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 7 років тому +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 7 років тому +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.

  • @andreastaiano6426
    @andreastaiano6426 7 років тому

    Bravo!

  • @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!

  • @cripwalkisfun
    @cripwalkisfun 8 років тому

    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  8 років тому

      +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 8 років тому

      +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  8 років тому

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

  • @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.

  • @Blocks0
    @Blocks0 9 років тому +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  9 років тому +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 9 років тому

      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

  • @donegan50
    @donegan50 6 років тому

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

  • @MarcinRutkowski
    @MarcinRutkowski 7 років тому

    my expression looks like that: *x=thisLayer.sourceRectAtTime().width;
    x* and I got mesage that *sourceRectAtTime is undefined*, please help.

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

      does your version of Ae perhaps not have the SourceRectAtTime property? What version of Ae are you using?

    • @MarcinRutkowski
      @MarcinRutkowski 7 років тому

      Oh, it's new function... I have CS6

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

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

  • @Dan7aylor
    @Dan7aylor 9 років тому

    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  9 років тому

      Its technically a slab serif font. Called Bree serif.

    • @Dan7aylor
      @Dan7aylor 9 років тому

      The more you know! Thanks again!

  • @TheAfterMovie
    @TheAfterMovie 9 років тому

    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  9 років тому

      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.

  • @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!

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

    awesome :D

  • @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.

  • @Lombo991
    @Lombo991 9 років тому

    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  9 років тому +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?

  • @alexrcreamer
    @alexrcreamer 8 років тому

    How did you make the animation at the end of your video where it starts off with "Questions?" And then gets resized and moves to the left to reveal the "like what you see?"? Is that camera tricks?

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

      +This Guy not really "tricks". Just shape layers keyframed for position and size made 3d and we move the camera away as we bring elements in.

    • @alexrcreamer
      @alexrcreamer 8 років тому

      any chance you could do a video on something like that? it flows very smoothly.

  • @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 5 років тому

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

  • @icarusquack
    @icarusquack 9 років тому +2

    What should I be taking from this video if I don't have said version of AE?

    • @NoCategoryYT
      @NoCategoryYT 9 років тому

      That you dont have a legal version and should just be quiet lmfao dont wanna get caught..... allegedly

    • @pixydis
      @pixydis 9 років тому

      *****
      You do realize that some people may have actually bought Adobe software before Creative Cloud, right?

    • @NoCategoryYT
      @NoCategoryYT 9 років тому +1

      pixydis wait, so there arent updates for the software before cc? And no way to update?

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

      I was hoping people would learn something about expression structure and how to link properties and attributes beyond the scope of this one niche expression.

    • @icarusquack
      @icarusquack 9 років тому +1

      Thanks for the reply! It seems very similar to AE's own programming language in a since. I'm assuming by learning how to write expressions, one could theoretically make better effects more easily and more effectively. Or would it be about the same amount of work do you think?

  • @OneCheapEric
    @OneCheapEric 7 років тому

    16:30 If you're looking for ECAbrams expressing self doubt. This is super great.

  • @CP-ik1xu
    @CP-ik1xu 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.

    • @CP-ik1xu
      @CP-ik1xu 8 років тому

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

  • @bcwhit06
    @bcwhit06 9 років тому +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!

  • @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

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

    sourcerecattime works with the whole shape layer, is there a way that it can be applied to individual contents of a shape layer?. Also, rectangles have their width and height expressed in pixels....custom paths use scale percentages, is there a way of making this work with custom paths?

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

      I'm not sure of a way to get the size of part of a thing. SourceRectAtTime() as a thing is the size of a layer's bounds. So, I guess if you wanted to only know some of the elements you would have to disable those unwanted elements I suppose. I'm not seeing a quick and easy solution off hand though.
      As to the second question about what to do about path properties. Paths are defined by their points. If you want ready access to those, I recommend using the Points Follow Nulls script found under the window menu. That will get those points linked to individual things that you might move relative to a text layer's change in size perhaps.

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

      @@ECAbrams Thanks a lot, very helpful. I am obsessed with doing stuff within one shape layer with different groups, so I adapted your random positioning of layers in the Connect Dots tutorial tutorial to the groups in a single layer and it worked. I was afraid that things like index only identified the layer not a group in a layer ...so maybe SourceRectAtTime() might work at the Group level, but you are right...Points Follow Nulls is simpler

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

    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  5 років тому

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

  • @impy1980
    @impy1980 6 років тому

    Help - Love this, it's perfect, however, I want to add
    transform.position - [0, thisLayer.sourceRectAtTime().height-offset]
    to the text layer, so when I add a new line to the text, the text remains at the baseline (really wish AE had that as an alignment), and the text box "grows" up not down. However when I add this expression it "breaks" the sync between the text layer and shape layer, although the shape layer continues to expand as expected, it's never in line.
    Is there a solution?

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

      You may need to access the other parts of the sourceRectAtTime() such as .top and .left to really dial in what you're after. You may also want to massage the anchor point of the text layer to be dynamic as well.

    • @impy1980
      @impy1980 6 років тому

      Thanks for the reply, OK, I've sorted the dynamic anchor point, which now stays in the bottom left, regardless of how many lines of text I add. The Shape layer now is linked in terms of linear proportional growth, but still "grows" down, I assume, that's what you mean by using .top and .left, how would I use those without breaking the shape layer expression.

    • @impy1980
      @impy1980 6 років тому

      Not sure what I did, but the shape layer now grows and is synced to the text, exactly how I need it; however, new problem, every time I enter a new line, both text and shape layer shift upwards, until eventually they go off screen if enough lines are typed.

    • @impy1980
      @impy1980 6 років тому

      Totally baffled, I have now removed the dynamic anchor expression and the last issue is gone. Fingers crossed when I move it from the test comp into the work comp it all sticks. Again thanks for initially getting back to me.

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

      no worries, glad it's coming together.

  • @codylong
    @codylong 8 років тому

    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 8 років тому

      +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  8 років тому +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?

  • @robertcoker4433
    @robertcoker4433 9 років тому

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

  • @KuneMaster
    @KuneMaster 9 років тому

    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  9 років тому

      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 9 років тому

      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  9 років тому

      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 9 років тому

      OK.. thx anyway :)