• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Change image position based on text lenght on After Effects

New Here ,
Jun 01, 2021 Jun 01, 2021

Copy link to clipboard

Copied

I'm new to After Effects, I'll like to create a mogrt to used it on Premiere Pro.

On the Comp I have an image and a text, the text is linked to the image so I have animated the image to slowly appear on screen stays a while the go back again an disappears...

The issue is how do I program so when the image appears goes to the correct position, if the text is longer have to go to a higher X position, if it's shorter to a lower X position.....

Here is my comp so far....after-effects.jpg

TOPICS
Scripting

Views

816

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2021 Jun 01, 2021

Copy link to clipboard

Copied

With my (paid) extension Pins & Boxes, you could create a pin at the location of the text where the image should be (like the bottom center or right edge, for example) and then simply parent the background image to this pin. When the text changes, the pin updates its position and the parented image follows it.
Note that when you create it with Pins & Boxes, the clients who use your template DON'T need to have Pins & Boxes installed. So it is no problem to use the extensions to create mogrts which work everywhere.

Without Pins & Boxes, you could write your own expressions which measure the size of the text. Google for the sourceRectAtTime() expression if you want to try that - put this requires some level of programming experience.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2021 Jun 01, 2021

Copy link to clipboard

Copied

LATEST

You can rely on the sourceRectAtTime() expression method to define the top, left, height, and width of a text layer at any point in the animation. Then those values can be used to position your graphic. By far the easiest solution would be to pay for a solution as Mathias suggested. You could also dig through the tutorials on soureRectAtTime(), but most of them are pretty lousy. If you have a few days I might get my new tutorial series on text animation published. It will show you everything you need to do what you are describing. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines