Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Control Text Repeater with sliders

  • Control Text Repeater with sliders

  • Fabian Bosman

    November 27, 2019 at 9:28 pm

    Dear After Effects Gods.

    I was looking for a repeater effect for text.
    It is a similar effect to the repeater effect from the shape layer but I still want to be able to adjust my text
    instead of making a shape from the text layer first. So I want to control the repeats with two sliders, one for X and one for Y repeats.

    I found this video where the technique is explained, but for some reason it is not working in CC2019.
    https://www.reddit.com/r/AfterEffects/comments/aw5v1h/how_to_repeat_text_vertically_horizontally_in/

    Below you can find the expression that was used.
    Can someone tell me how to get this working in CC2019 and if there is another way to achieve this effect.

    I hope someone can help me.

    Thanks,
    Fabian

    xRepeater = effect("X Repeater")("Slider").value;

    yRepeater = effect("Y Repeater")("Slider").value;

    horzRepeat = value.repeat(xRepeater);

    vertRepeat = horzRepeat + "\n";

    vertRepeat = repeat(yRepeater);


    How to Repeat Text Vertically & Horizontally in After Effects 2019 from AfterEffects


    How to Repeat Text Vertically & Horizontally in After Effects 2019 from AfterEffects

  • Dan Ebberts

    November 27, 2019 at 10:50 pm

    I think the last line should be:

    vertRepeat.repeat(yRepeater);

    Dan

  • Fabian Bosman

    November 29, 2019 at 10:45 pm

    Thanks Dan I got it working.

    I have another question, is it also possible to have the repeater effect and also
    link the source text of the repeater to another text layer?

    So when I adjust the text in the other (non repeat) text layer, it will also change the repeater text layer.

    I hope it makes sense ☺

    Fabian

  • Dan Ebberts

    November 29, 2019 at 10:53 pm

    Sure–something like this:

    txt = thisComp.layer(“Text”).text.sourceText.value;
    xRepeater = effect(“X Repeater”)(“Slider”).value;
    yRepeater = effect(“Y Repeater”)(“Slider”).value;
    horzRepeat = txt.repeat(xRepeater);
    vertRepeat = horzRepeat + “\n”;
    vertRepeat.repeat(yRepeater);

    Dan

  • Fabian Bosman

    November 29, 2019 at 11:10 pm

    Man, you know everything ☺ Thank you so much for the help.
    It is exactly what I was looking for!

  • Fabian Bosman

    December 10, 2019 at 11:01 pm

    Hi Dan,

    Do you know if it is also possible to use this duplicate effect but then from the middle outwards?
    Now it repeats from the top-left corner.

    What would be the code for that?
    I’m new to the expression language and I’m trying to learn it.

    I hope you can help.

    Greetz,
    Fabian

  • Dan Ebberts

    December 10, 2019 at 11:11 pm

    What would the result of that look like?

    Dan

  • Fabian Bosman

    December 10, 2019 at 11:15 pm

    Something similar like this

    Around 0:20 sec in the video you see the Line spacing change from the cente to outwards
    https://previews.customer.envatousercontent.com/h264-video-previews/b4f79446-4294-479a-bf2a-e559540184a9/23403987.mp4

    Please let me know your thoughts about how to create this effect.

    Greetz
    Fabian

  • Dan Ebberts

    December 10, 2019 at 11:36 pm

    I don’t think you’re going to be able to do anything like that using JavaScript’s string.repeat() function.

    Dan

  • Fabian Bosman

    December 11, 2019 at 8:49 am

    It doesn’t have to be with the string.repeat() function.
    If there is another way to repeat text from the middle (center) that would be great too.

    I want to achieve the effect in the video I send earlier, and want it to be be working with a slider to easy adjust the repeats.
    If this can be done through another way I would like to hear that ☺

    Thanks,
    Fabian

Viewing 1 - 10 of 13 posts

Log in to reply.

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