Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › how to connect letters to composition

  • how to connect letters to composition

    Posted by Artem Ludyankov on August 8, 2012 at 10:42 pm

    Hello guys,
    I need your help. I have an idea for one project where I have to create some kind of template.
    I have prerendered 3d letters and I wanna link them to simple text. So for example if you type in one composition each letter in this text has to be replaced by appropriate footage or composition with prerendered 3d letter.
    Is it possible to do it? Any ideas would be really appreciated.
    Thanks

    My Portfolio

    Matt Little replied 6 years, 8 months ago 3 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    August 9, 2012 at 12:37 am

    From what you’ve described, I’d do it with a script that would prompt you for the folder of 3D letters and would pull in the appropriate letters to make up the text contained in the selected text layer. Of course there are a lot of other details to take care of, depending on the final result you want, but it should be feasible.

    Dan

  • Artem Ludyankov

    August 9, 2012 at 10:37 am

    Thank you Dan,
    Unfortunately I’m really bad with scripting. I could write some simple expression, but scripting it’s quite difficult for me.
    Is there any way to make it using just expression and AE tools.
    For example can I link one letter in text source to one layer in this composition? Or something like this.
    Thank you very much anyway. Really apreciate your help.

    My Portfolio

  • Dan Ebberts

    August 9, 2012 at 2:12 pm

    I think the closest you could come would be to have a comp with all the letters stacked on top of each other. You’d need a copy of this comp for each letter position in your source text. The layer names would be the same as the letter (layers “A”, “B”, etc.). You would name the comps based on their position in the text string, so, for example, comp “Letter_0” would correspond to the first letter, “Letter_1” to the second, and so on. The letter layers inside these comps would each have an opacity expression that would retrieve the source text letter corresponding to letter position of that comp. If the letter matches the layer name, 100% opacity else 0%. Something like that.

    That could work, but you wouldn’t have any repositioning of the letters based on proportional spacing–your 3D letters would in effect create a mono-spaced font.

    It would be a pretty ambitious application of expressions, but I think it could work.

    Dan

  • Matt Little

    January 13, 2020 at 9:31 am

    Hi Dan,

    Trying to do this exact thing. What expression could I use to connect a compositions opacity to the first letter of a text layer, and then connect to the second letter and so on?

    Thanks
    Matt

  • Dan Ebberts

    January 13, 2020 at 5:20 pm

    So if your text is in a text layer named “Text” in a comp named “Main” and your letter stacks are layers named “A”, “B”, “C”, etc in comps named “Letter_0”, “Letter_1”, etc., then you would apply an opacity expression like this to each letter layer:


    myIdx = parseInt(thisComp.name.split("_")[1],10);
    txt = comp("Main").layer("Text").text.sourceText.value;
    if (myIdx < txt.length){
    txt[myIdx] == name ? 100 : 0;
    }else
    0

    Dan

  • Matt Little

    January 13, 2020 at 7:03 pm

    Hi Dan,

    Thanks so much for this. Worked perfectly! Any explanation on this would be amazing, this is way over my head! Again thanks

    Matt

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