Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Text in direction to the center comp

  • Text in direction to the center comp

    Posted by Gus Favoreto on April 10, 2019 at 6:36 pm

    Hey guys,

    I don’t know even how to start this expression.
    I have a circle in the middle of the comp and a text in the left, along with the circle horizontally. When I move the circle to the left, the text should you around the circle, like to maintain the text in the center, but the text need stay connected to the circle. make sense? And when goes to the right the text just stay in the left since the idea is keep the direction to the center is correct in this case.

    I hope that make sense,
    Thank you so much in advance!
    Gus

    Gus Favoreto replied 7 years, 3 months ago 3 Members · 6 Replies
  • 6 Replies
  • Kalleheikki Kannisto

    April 11, 2019 at 7:51 am

    Do you mean like this?

    I don’t think there any (easy) way to do that with an expression. I would animate a path and use text on path for this.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Tomas Bumbulevičius

    April 11, 2019 at 3:58 pm

    If what Kalleheikki shown is correct guess, and if it’s as below, then it should be an easy approach.

    What you need to do to achieve this:
    1. On the text layer, draw an open path, which starts under the text / is inside the center of the comp and continues into a circle’s borders.
    2. Reveal text properties and select mask inside the Path Options.
    3. Link First Margin with circle’s X position and readjust its starting point. You might want to multiply the position value by 2 or 3 to speed up the path slide.

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Gus Favoreto

    April 11, 2019 at 8:09 pm

    Hey guys, thank you for your posts.
    But actually what I am aim is this exepmle here, I did with null to rotate the text and positioning manually to be near to the circle.

    Thank you guys!
    Gus

  • Tomas Bumbulevičius

    April 12, 2019 at 8:25 am

    Gus, if thats the case, then here is how I would do it:

    1. Place text layer where you want it to be and move its anchorpoint to the center of circle shape.
    2. Add expression below to the rotation of text:
    xPos = thisComp.layer("circle").transform.position[0];
    linear(xPos, 0, thisComp.width, 0, 360)

    This will make rotation 360 degrees based on X position.

    3. Create null layer and place it in the center of your text. Add expression to rotation of null:
    -thisComp.layer("text").transform.rotation

    This will invert rotation from interpolation and keep text layer in its original rotation.

    4. Parent text to null, and null to circle.

    Now whenever circle moves, text will follow. I am sure there is a better way to do it by setting anchorpoint to follow, but this is the simplest imo.

    Find out more:
    After Effects Tutorials: motion design, expressions, scripting.

  • Kalleheikki Kannisto

    April 12, 2019 at 8:37 am

    Alright, so the description of the effect would be something like “the text is attached to the circle at a fixed distance and smoothly following the motion of the circle, while tending towards the center of the comp.”

    What complicates the matter slightly is that the text starts out not being towards the middle in the beginning, so this may need to be handled by using a null for the “center” that the text tends towards, as you can then animate the center (null) from the left edge to the comp center in the beginning.

    I would start with Dan’s auto-orient expression here: https://forums.adobe.com/thread/1178515

    Calculating the orientation from the circle to the “center” null would give you the rotation angle for the text in relation to the circle. So you could have a null in the center of the circle and the text at a given distance attached to the null and rotate the null based on the auto-orientation expression. And then rotate the text itself by the same amount but in negative direction to keep it horizontal.

    Smoothing the result will require a loop to average the values over a given time span.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Gus Favoreto

    April 14, 2019 at 5:10 am

    Thank you guys!

    Soon I finalize the project I will post here ho ti goes!

    Thanks,
    Gus

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy