Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Scrolling shapes along a square path

  • Scrolling shapes along a square path

    Posted by tom edwards on March 10, 2022 at 3:25 pm

    I’m looking to replicate a text on path scrolling effect around a square path just like in this tutorial: https://www.youtube.com/watch?v=ykncwozwUBM

    However, I do not have the the original text file so I’m using paths imported from Ai.

    Please help!

    Thanks

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Filip Vandueren replied 4 years, 2 months ago 3 Members · 8 Replies
  • 8 Replies
  • Filip Vandueren

    March 10, 2022 at 4:02 pm

    Using the path to Nulls script, with the 3rd option, you can create null objects which follow paths and orient themselves.

    You would need 1 null per letter, and do the spacing by hand, once their relative spacing is set, you can add another slider to control them all at the same time with a simple expression.

    Would that be an option ?

  • Terry Coolidge

    March 10, 2022 at 11:20 pm

    How much text are you talking about? Too much to type? The latest iOS lets you use an iPhone camera as an optical character recognition (OCR) device. Filip’s solution sounds like it could work, but that sounds like it’s much more involved. I would first try to transcribe or convert your Illustrator paths into text that you could simply paste into a text layer in AE.

  • Filip Vandueren

    March 10, 2022 at 11:49 pm

    I think Tom wants to use the shapes because he needs the design but doesn’t have the font.

  • Terry Coolidge

    March 10, 2022 at 11:51 pm

    gotcha…

    I’d try to get the font.

    😉

  • tom edwards

    March 11, 2022 at 11:17 am

    Thank you both for your replies.

    Unfortunately I don’t have access to the font file and it’s a bespoke typeface with a lot of the characters intersecting.

    I did think Trace Path was the most viable option but I’m struggling to figure out how each character (which amounts to over 130) can remain in their formation when assigned to a null…

  • Filip Vandueren

    March 11, 2022 at 12:16 pm

    Perhaps it’s better to vectorize and organize the graphic into separate layers in Illustrator, would be better suited to do this than juggling all of this around in the timeline.

    However; if there are a lot of overlapping characters, then how would those behave when they navigate the corner of a path? Should they stick together? That might look weird… the alternative is more illustrator work to separate everything into single characters…

    Once you have everything set up as 1 character per layer (or shapegroup) in a correct layout of everything in 1 long line, then we can talk about what expressions would make the spacing in the path to be easy.

    But there’s a lot of manual work first…

  • tom edwards

    March 11, 2022 at 12:40 pm

    Hi Filip,

    So I’ve separated each character onto their own layer and aligned all characters on the same line.

    In Ae I’ve run Trace Path on a square path – what do you recommend I do from here?

    Thanks

  • Filip Vandueren

    March 12, 2022 at 9:23 am

    Hi Tom,

    I propose giving all the character layers another colour-label than other Nulls and layers in your comp, so it’s easy to quickly select them all by clicking on the coloured square in front of one layer’s name and choosing “Select Layer Group”. That makes it quick to paste an expression to multiple layers.

    I’m assuming the character’s anchorpoints are not all perfectly on their baseline, as they would be when the outlines are created in the first place ?

    Then we need some extra steps:

    Add a “Control Null”, position it at [0,0].

    Select all the character layers and center their anchorPoints (Layer -> Transform -> Center AnchorPoint in Layer Content);

    Add a Point Control “firstChar”, and position it under your first Character, where you want it to attach to the Path (so, on the baseline)

    Add this expression to all of their anchorPoints:

    value - [0,position.valueAtTime(-1)[1]-thisComp.layer("Control Null").effect("firstChar")("Point")[1]];

    The characters will now all have crazy vertical offsets, don’t mind about that for now.

    To the control-nulll add a slider named “spacing” (set to about 30), and a second slider named “offset” (keep at 0).

    Give all the Characters this expression for position, it is based on the position expression that the “Trace” option of Paths to nulls made:

    The main thing you need to adjust is to make sure the name of the pathLayer and the name of pathToTrace is correct for your composition, you should copy those from the “trace” Null’s position expression.

    var pathLayer = thisComp.layer("Shape Layer 1"); 
    var progress = thisComp.layer("Control Null").effect("offset")("Slider")/100;
    var spacing = thisComp.layer("Control Null").effect("spacing")("Slider")/100;
    hPos = position.valueAtTime(-1)[0] - thisComp.layer("Control Null").effect("firstChar")("Point")[0];
    progress += (hPos*spacing)/1000;
    progress = ((progress%1)+1)%1;
    if (time<=-1) { value } else {
    var pathToTrace = pathLayer("ADBE Root Vectors Group")(1)("ADBE Vectors Group")(1)("ADBE Vector Shape");
    pathLayer.toComp(pathToTrace.pointOnPath(progress));
    }

    Add this expression to each character’s rotation:

    var pathToTrace = thisComp.layer("Shape Layer 1")("ADBE Root Vectors Group")(1)("ADBE Vectors Group")(1)("ADBE Vector Shape"); 
    var progress = thisComp.layer("Control Null").effect("offset")("Slider")/100;
    var spacing = thisComp.layer("Control Null").effect("spacing")("Slider")/100;
    hPos = position.valueAtTime(-1)[0] - thisComp.layer("Control Null").effect("firstChar")("Point")[0];
    progress += (hPos*spacing)/1000;
    progress = ((progress%1)+1)%1;
    var pathTan = pathToTrace.tangentOnPath(progress);
    radiansToDegrees(Math.atan2(pathTan[1],pathTan[0]));

    Also based on the original Trace expression.

    You don’t need the Trace Null anymore.

    Now you can finetune the character spacing and animate the offset. (The exact value is dependent on the length of your PathToTrace, the length of the line, the width of each character,… but the result should be perfectly proportional to your original layout and easy to dial in)

    If you notice a bit of offset from the path to the characters, check to see that in your Shape Group the position <i style=”font-weight: bold;”>of the Contents (not the layer transform) is set to [0,0], then reposition the layer, not the Contents.

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