After Effects Dynamic Anchor Point | Adobe After Effects Tutorial

Project file: www.dropbox.com/s/l1yhihrt9h3...
The Power of Shape Layers: www.udemy.com/course/power-of...
Hey everybody and welcome back to a very special episode of 7 Minute AE Tutorials where you learn tips, tricks, and shortcuts in 7 minutes or less. No BS, just AE. In this episode, I'm going to show you how to create a text box that automatically resizes itself based on the number of characters, words, and/or lines that are in your text layer. You'll also learn how to create a dynamic anchor point, which is huge. I literally use this expression every day to keep my anchor points centered, no matter how many characters, words, or lines I have on a text layer. These expressions can be saved as presets, so you don't have to memorize complicated expressions. I predict that these expressions will become a regular part of your everyday workflow.
COPY AND PASTE THE EXPRESSIONS BELOW:
On Text ANCHOR POINT:
layerBound = thisLayer.sourceRectAtTime(time);
T = layerBound.top;
L = layerBound.left;
W = layerBound.width;
H = layerBound.height;
[L+W/2,T+H/2]
- Highlight ANCHOR POINT and go to ANIMATION/SAVE ANIMATION PRESET, and save this to DOCUMENTS/ADOBE/AFTER EFFECTS (version)/USER PRESETS
- Add to a layer by clicking on the text layer, then go to your EFFECTS PANEL and search for the expression name you chose. Double click the expression and it will be added to your text layer.
On Rectangle Path SIZE of box:
s=((pickwhip the text layer))
w=s.sourceRectAtTime().width;
h=s.sourceRectAtTime().height;
[w,h]
- Add an OFFSET PATHS, which will default to a value of 10 and provide sufficient padding. Then, highlight CONTENTS (which will grab everything within the contents layer, including the OFFSET PATHS) and go to ANIMATION/SAVE ANIMATION PRESET, and save this to DOCUMENTS/ADOBE/AFTER EFFECTS (version)/USER PRESETS
- Add to a layer by clicking on an empty shape layer, then go to your EFFECTS PANEL and search for the expression name you chose. Double click the expression and it will be added to your shape layer. MAKE SURE to change the first line of this expression to match the name of the text layer to which it is being applied to.
NOTES:
- Apply SET MATTE to the Text Layer that is using the Shape Layer as the matte in order to animate the text into the Box.
- Be careful when parenting these layers to one another and be mindful of which options will allow you to get the desired effect. Tranform Property of the text layer will result in the box moving with the text if you are animating the text. Transform Scale of the box will affect the scaling of the text if you are animating the box. You can use Text Animator Position for the text, and Group or Shape controls for the box. Or you can apply a Transform effect to the text. However, applying Transform for Scale on the box will not get the desired effect.
- It's recommended that you add a NULL OBJECT and simply parent both the text box and text layer to that Null Object. If you're a nerd like me, rename the Null Object to TEXT CONTROLLER.
I hope this helped you out. Please comment, like, share, and subscribe. Make sure to click the bell so you're notified every time I upload a new video. I'd love to get your feedback about this course and any other topic you'd like to see covered. Don't forget to check out my new Udemy course, the Power of Shape Layers. It's a comprehensive course that literally covers every aspect of shape layers. Thanks for watching, everybody. I'll see you next time.

Пікірлер: 33

  • @nicolebry1120
    @nicolebry1120 Жыл бұрын

    Thank you so much for this tutorial, the result is exactly like a premium motion graphics template in adobe's store and you just saved me a little money by showing me how to do it myself and make it my own. I really appreciate it.

  • @7MinuteAETutorials

    @7MinuteAETutorials

    Жыл бұрын

    Thanks so much for the comment. This means a LOT.

  • @10buckschallenge21
    @10buckschallenge213 жыл бұрын

    I don't know how much appreciate this video. this video is best for making reaction box. deeply appreciated it.

  • @davearmstrong4456
    @davearmstrong44563 жыл бұрын

    Jeff, You are the most informative channel. I never watch any of your videos without learning a tip/trick in AE. Keep up the good work. I'm a devoted follower!

  • @7MinuteAETutorials

    @7MinuteAETutorials

    3 жыл бұрын

    thanks so much for the kind words. I really appreciate you watching.

  • @deepdig8502
    @deepdig85023 жыл бұрын

    Thanks for your work!

  • @bobbyjourdan7075
    @bobbyjourdan70753 жыл бұрын

    Extremely useful. Watched Jake's course on a similar topic but you give the essentials in 7 min. Great!

  • @7MinuteAETutorials

    @7MinuteAETutorials

    3 жыл бұрын

    Glad it was helpful! I came across the anchor point trick a while back and it seemed to go perfectly with text boxes. I'm glad this worked for you.

  • @CatalinGulan
    @CatalinGulan3 жыл бұрын

    Jeff, I am following your channel for, maybe 2 months, and I must say " I feel myself guilty" for not discovering it time ago..Amazing channel!...Big congrats for your entire work in here! 🧡

  • @7MinuteAETutorials

    @7MinuteAETutorials

    3 жыл бұрын

    Thank you so much!

  • @RobinVelderman
    @RobinVelderman2 жыл бұрын

    Great tips, thanks! Because in your example you always need to change to which layer the expression looks for sizing the shape layer, I tried using the layer index for that. I came up with the expression below. This works without modifying the expressions as long as your text layer is directly above your shape layer. To easily control the margins I added two Slider Controls. This is what I came up with for the shape layer path size: s=thisLayer.index-1; H=thisComp.layer(s).sourceRectAtTime().height; W=thisComp.layer(s).sourceRectAtTime().width; BorHOR=effect("Border HOR")("Slider"); BorVER=effect("Border VER")("Slider"); [W+BorHOR,H+BorVER];

  • @Ashu-Thingz
    @Ashu-Thingz3 жыл бұрын

    Super useful amazing

  • @makansulfiume808
    @makansulfiume8083 жыл бұрын

    Hi this video helps me a lot!, thank you Jeff, i hope you can explain more about the null controller you made at the end of the video. I have downloaded some of presets from other sites and it come with this "controller" line... i dont know how it works or what it is for. I hope you can explain more about this. Thank you very much! God bless you man.

  • @dominicdavistv
    @dominicdavistv2 жыл бұрын

    THank you for your help. This there a way to have the text left align and the box to animate from the left? in stead of from the center

  • @xradical89x
    @xradical89x3 жыл бұрын

    how do u animate the text so that it stays centered always but moves up or down when new words(lines) are added like when you're typing words in from keyboard?

  • @annanesterov7566
    @annanesterov75663 ай бұрын

    Great video! How would i modify the script if i needed the anchor point to stay centered along vertical axis only, keeping the alignment of the text to the left (or right) side?

  • @7MinuteAETutorials

    @7MinuteAETutorials

    3 ай бұрын

    In the time that this video was produced, After Effects how has a "lock anchor point" feature in Effects and Presets. Just search using the words in quotes, and you'll see it. You have a number of options for where you want to lock it. I hope this helps.

  • @TheDrMike25
    @TheDrMike25 Жыл бұрын

    Question: Is there a way to change the anchor point WITHOUT moving the layer? As in, something in the Position setting to counterbalance the anchorpoint moving? Its kinda hard to explain why I need this, but this is essentially the last thing I need to deliver a project x.x

  • @kimsanov
    @kimsanov3 жыл бұрын

    What’s difference between sourceRectAtTime() and sourceRectAtTime(time) ?

  • @BA-dw1ee
    @BA-dw1ee3 жыл бұрын

    or at different magnification ratios. When double clicked, turns to normal.

  • @jeorc
    @jeorc Жыл бұрын

    Thank you, Jeff. I have a similar situation but my text has upper and lower cases. The height of the rectangle changes to account for ascenders and descenders. Is there a way to do this? I've been googling for the past two hours and I haven't found a solution. I appreciate it if you know and can share an easy way to tweak the anchor point to account for that. Edit: I think it's just as simple as setting a fixed number for height instead of h= s.sourceRectAtTime().height; In case someone else is dealing with this, this seems to do it: s= thisComp.layer("Text"); w=s.sourceRectAtTime().width; h=55; [w,h] Feel free to input any fixed value where it says 55. That is there just for reference. I was looking to add more lines of code to the anchor point and it turned out what I needed was less. lol Thank you.

  • @7MinuteAETutorials

    @7MinuteAETutorials

    Жыл бұрын

    Glad you figured it out! Sorry I didn't get to your comment in time.

  • @jeorc

    @jeorc

    Жыл бұрын

    @@7MinuteAETutorials On the contrary, thank you for providing the Jumpstart. I'm learning a ton from your videos. Thanks Jeff.

  • @7MinuteAETutorials

    @7MinuteAETutorials

    Жыл бұрын

    @@jeorc Thanks for this comment. It really means a lot!

  • @ajeet1994
    @ajeet19943 жыл бұрын

    I want rounded.... Rectangle..cant it be easily done by adding round corner and set some values... could it not be dynamic ?

  • @7MinuteAETutorials

    @7MinuteAETutorials

    3 жыл бұрын

    Increase Roundness to your Rectangle Path. When you save the preset by choosing CONTENTS, it will copy that Roundess value to the preset.

  • @BA-dw1ee
    @BA-dw1ee3 жыл бұрын

    At certain sizes characters turn into numerals. Is anybody experiencing this?

  • @87murthy
    @87murthy3 жыл бұрын

    Hi Jeff! Can we do this on Premiere Pro as well?

  • @7MinuteAETutorials

    @7MinuteAETutorials

    3 жыл бұрын

    This could be exported as an Essential Graphic and used in Premiere

  • @87murthy

    @87murthy

    3 жыл бұрын

    @@7MinuteAETutorials Thanks Jeff👍

  • @vincentsequeira3723
    @vincentsequeira37233 жыл бұрын

    there are spaces in between, should we use the spaces too? thanks SIR.

  • @7MinuteAETutorials

    @7MinuteAETutorials

    3 жыл бұрын

    I recommend that you copy and paste it from the description - I took it right from the layer so I know that works

  • @vincentsequeira3723

    @vincentsequeira3723

    3 жыл бұрын

    @@7MinuteAETutorials thanks Sir.