Skip to main content
Participant
January 24, 2019
Answered

Infinity Loop?

  • January 24, 2019
  • 3 replies
  • 3394 views
A program should be so animated, that small circles circulate as endlessly as possible in a drawn line.


In detail: We have drawn a pipe in 2D that passes through a machine. Through this line flows liquid. The liquid should circulate through the pipe, passing around curves and corners. The liquid is represented by small dots, which are strung like a chain and have a distance of 100 Px.



How do we get to an "infinite loop"? Is that even possible in AE?

    This topic has been closed for replies.
    Correct answer Mike_Abbott

    With no layers selected, select the pen tool. To the right of the toolbox click on fill and set it to none. Set stroke width to 10px to start with.

    Draw a path with the pen tool to create a shape layer.

    Twirl down: Shape layer > Contents > Shape 1 > Path 1 > Stroke 1.

    Set line cap to Round Cap

    Click the + next to the Dashes property - twice.

    Set the Dash to 0 px

    Set the Gap to 100px.

    Adjust stroke width to traste

    Animate the offset property to create your 'flow' as required

    It won't be infinite - but it can animate for the length of your video : )

    3 replies

    June 30, 2020

    Wtf duck u 

    Community Expert
    January 24, 2019

    Or you can also apply this expression:

    loopOut(type = "cycle", numKeyframes = 0)

    Byron.
    Community Expert
    January 24, 2019

    loopOut() the same thing as loopOut("cycle" numKeyframes=0) will only work if the position of the dots is perfectly lined up with the keyframes so you don't end up with a jump. IOW if the dots are moving in x and dot number #1 is at 200 when the animation starts then dot #3 has to be exactly at 200 pixels when the second keyframe is set. There is no foolproof mathematical way to do this so you have to adjust the position of the keyframes manually until the loop does not jump. You could use loopOut("offset") and then adjust the speed by sliding the second keyframe. That is an easy way to use loopOut().

    Mike_Abbott
    Mike_AbbottCorrect answer
    Legend
    January 24, 2019

    With no layers selected, select the pen tool. To the right of the toolbox click on fill and set it to none. Set stroke width to 10px to start with.

    Draw a path with the pen tool to create a shape layer.

    Twirl down: Shape layer > Contents > Shape 1 > Path 1 > Stroke 1.

    Set line cap to Round Cap

    Click the + next to the Dashes property - twice.

    Set the Dash to 0 px

    Set the Gap to 100px.

    Adjust stroke width to traste

    Animate the offset property to create your 'flow' as required

    It won't be infinite - but it can animate for the length of your video : )

    Community Expert
    January 24, 2019

    If you choose to make a dotted line using Mike's suggestion you can make the offset animate automatically by holding down the Alt/Option key, clicking the stopwatch and then entering this expression:

    s = 500; // speed of movement

    time * s

    If the dots go the wrong way make s = -500

    To make the line move faster or slower just change the value of s.