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

HELP! Motion Graphic Template "text to shape"

Community Beginner ,
Apr 15, 2022 Apr 15, 2022

Copy link to clipboard

Copied

ExpertZone5CCC_0-1650010681017.png

Hi, I need to create a MOGRT for a client with text that changes shape within this trapezoid outline.

Considering that the text can stretch in length, I can't figure out how to make the shape (trapezoid) stretch only in the middle part and not distort the angles.

Also, I'll need to add more trapezoids near to this one, which should start where this shape ends. So, when this one extends, these should stay the same distance apart. Thank you.

TOPICS
Expressions , How to , Scripting

Views

230

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 ,
Apr 15, 2022 Apr 15, 2022

Copy link to clipboard

Copied

You can create the box using the Auto Resizing Background Shape iExpression.

You can turn the simple box into a trapezoid by using the shear parameter

 

 

Note that to create the mogrt you need a license of iExpressions, but the mogrt itself (and the Ae Project) then works also on machines where iExpressions is not installed.

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 ,
Apr 15, 2022 Apr 15, 2022

Copy link to clipboard

Copied

Alterntively, you can also use our extension Pins & Boxes - in particular if the shape needs to be behind multiple objects:

1. create 4 pins at the corners of the text

2. create a trapezoid path and use the "Nulls From Paths.jsx" script that is included in Ae to create 4 null layers at the 4 vertices of the path (choose the option that the path follows the nulls, such that moving the nulls moves the path vertices).

3. parent the 4 nulls to the 4 pins - now the path resizes with the text.

 

bonus tip:

If you need rounded corners, you can use the Connect Multiple Layers iExpression instead of the Nulls From Path. It can also create paths whose corners are connected to null layers, but with an additional roundedness parameter.

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 ,
Apr 15, 2022 Apr 15, 2022

Copy link to clipboard

Copied

The basics can be solved with a couple of expressions if you use a shape layer rectangle and use Skew to generate the trapezoid.

RickGerard_0-1650045699188.png

I've uploaded a sample comp with the expressions. If I get time later today I'll add the paragraph justification code. You can then same the shape layer as an animation preset to create multiple copies with a single click. The shape layer always needs to be just below the text. 

 

You can add sourceRectAtTime().left to the mix to compensate for Left, Right, and Center justified text.

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 ,
Apr 17, 2022 Apr 17, 2022

Copy link to clipboard

Copied

LATEST

Here is the modified code that takes care of the text justification:

 

//Transform Rectangle 1 /position
txt = thisComp.layer(index - 1);
box = txt.sourceRectAtTime();
x = box.width/2;
y = box.height/2;
t = box.top;
l = box.left;
[x + l, y + t]

 

Add this expression to the Transform Rectangle 1/Position property and remove the expression in the sample project from the Rectangle 1/Position property.

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