How to do animated line


I’m newbie on Synfig Studio. I created like five easy animation as animated menu for digital signage. I don’t know if this gives you an idea about my skill.
Now I’ve a new project. I would like to animate a pen which is drawing a line as drawing a 2017 like example. :blush: I don’t have any idea how to do that as the line should appear after the pen moving. My idea was to move from outside to inside the screen. That was efficient if the line is right.
Someone could give some clue or help I’m appreciating

Thank for you support.
draw line.png

Are the line and pen moving in a linear fashion (straight), or curved?

If they are moving in a linear fashion (as shown in your picture), you can create the line with the draw or spline tool. Make sure you have only two orange vertex handles. Adjust the yellow vertex handles so they are right on top of the orange ones (or otherwise so it doesn’t curve) and at the top, turn the yellow ones off. The button should be called “toggle tangent handles” or something.

Turn ON animate editing mode.

In your initial keyframe (before you want the pen to move), make your line very small and invisible. Placing it off screen is the easiest way, but it only works if the pen starts on the very edge of the screen. You can also set the amount to 0. I suggest you make sure your pen is done moving before you do any other steps with the line.

I don’t know the pattern your pen will move, but I"ll assume you need 2 way points. The first is in the initial position, and the second at the end position (this is all that’s needed for a straight line. You can add more if you want the pen to speed up or slow down along that line.)

So you have your first frame ready, Move forward one frame and see where the pen is. Make sure your small line extends from where the pen started to where it is now, and set the amount to 1. Move to the end keyframe where the pen stops. Simply adjust your line by moving the orange handles so that they line now extends to where the pen is now.

If you preview your animation, your pen and line should go together. It’s possible you’ll need to make minor adjustments, depending on how picky you are and which type of waypoints you used, but I think they should move exactly in line.

If your line needs to move in a CURVED path, let me know and I can give you more instructions. I’m pretty new at this too, so I’m not sure the “correct” method of producing a curved line (or if there is one), but I do have a couple of tricks that I use.

You know, I did not read your post. Okay, so you want to make curved lines to spell 2017. For my method to work, either your background or your line/letters should be a solid color (I think there is a way to make it work even if both are not solid, but I’d have to do some testing).

I don’t know the best way, but assuming your letters are a solid color, here is what I would do:

  1. Create the letters as the will be at the end. You will NOT be changing them, so you don’t need any waypoints on them at all.
  2. Place the letters in a group.
  3. Within that group, create one or more shapes (read to the bottom and adjust your shapes appropriately)
  4. Make sure the shapes are ABOVE the letters in the group, and that they all have the same color as the letters.
  5. Change the “blend method” of all your shapes to “alpha over.” Now, wherever you shapes are, they will make your letters invisible.
  6. Animate your shapes so that at the start, they cover the entire line image, but reveal the letters as the pen writes them.

See this tutorial if you need more help:

If your line is colored more complicatedly, but your background is a solid color, you can do the same method, only make your shapes the color of the background and set them to “onto.”

UPDATE: I was messing around and found a way the works all the time. Make the masking shapes like before, but this time change the blending method to “onto” and make the color anything with a 0% alpha. That way, the masking shapes will make your letters completely invisible, regardless of the color of the line or the color of the background.