Download tasks/t51-animate-lines/instruction.md from refreshdotdev/Refresh-GUI-dataset: direct link, hf CLI and curl.
- Browser
- Download file 5.86 kB
-
https://huggingface.co/datasets/refreshdotdev/Refresh-GUI-dataset/resolve/main/tasks/t51-animate-lines/instruction.md
- Command line
-
hf download hf://datasets/refreshdotdev/Refresh-GUI-dataset/tasks/t51-animate-lines/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/refreshdotdev/Refresh-GUI-dataset/resolve/main/tasks/t51-animate-lines/instruction.md
You are learning Friction from a captioned video tutorial. The local video at /root/tutorial/tutorial.mp4 is your source of truth. Bring the Tutorial window forward and watch the full video before creating the animation. Revisit the demonstration while working and compare your preview with it before exporting.
Recreate the teal, multi-segment line drawing on black. Reveal the line along its path from the starting end to the moving tip, ending on the demonstrated angled contour. Use the guide below for Friction controls; match the video's final contour and color where the guide gives examples.
Use 1920×1080, 25 fps, 6 seconds. Save the editable project at /root/edit/project.friction and export /root/Desktop/final.mp4. Save and export progress during the attempt so completed work can be collected at timeout.
Use Friction through the desktop. You may write expressions inside Friction; do not use a terminal or external code editor.
✍️ How to Animate Lines (Trim Paths) in Friction
Based on Brooker Films' Trim Paths Tutorial
Goal: Learn how to make a line or complex path "draw" itself onto the screen, adjust its styling, and even morph the path while it draws.
Step 1: Drawing the Basic Line (0:00 - 0:28)
Before we can animate a line, we need to create one with a Stroke and no Fill.
- Create a new composition in Friction.
- Select the Path Tool (Friction's equivalent to the Pen Tool) from the left toolbar.
- Check your tool properties at the top or in the side panel.
- Set Fill to
Noneor an opacity of 0%. - Set Stroke to a visible color (like White or Yellow) and give it some thickness (e.g., 10px or 20px).
- Set Fill to
- Click once on the left side of your canvas to create your starting point (Vertex 1).
- Click again on the right side of your canvas to create your ending point (Vertex 2).
- Press
EnterorEscto finish drawing the path. You should now see a simple straight line.
Step 2: The "Trim Paths" Animation (0:29 - 0:48)
In After Effects, you use an "Add" menu. In Friction, we use the property panel to modify how much of the stroke is visible.
- Select your new shape layer in the Scene Panel.
- Look at the properties panel on the right. Expand the Stroke settings.
- Look for the parameter called Trim, Dash/Gap, or Stroke Length (depending on your exact Friction version, vector modifiers handle line drawing here). If there is a dedicated Trim Path modifier, apply it.
- Locate the End parameter (which goes from 0% to 100%).
- Keyframe the Draw-On effect:
- Move your playhead to Frame 0 on the Timeline.
- Set the End property to 0%. Click the Animate/Stopwatch icon to set the first keyframe. The line will disappear.
- Move your playhead forward (e.g., to Frame 60).
- Increase the End property to 100%.
- Press the Spacebar to play. The line will dynamically draw itself from left to right!
Step 3: Easing for Natural Motion (0:49 - 1:02)
Right now, the line draws at a mechanical, constant speed. We want it to ease into a gentle stop.
- Open the Graph Editor / Timeline View at the bottom of the screen.
- Click on the End property to reveal its keyframes on the timeline.
- Drag a box to select both the start and end keyframes.
- Click the Smooth Node / Bezier button in the Graph Editor toolbar.
- Click on the second keyframe (at 100%) and drag its left bezier handle horizontally to the left. This flattens the end of the curve, telling Friction to draw the line fast at the beginning and slowly ease into its final resting state.
Step 4: Styling the Edges (Rounded Caps) (1:03 - 1:24)
Blocky, square edges often look harsh. Let's make them smooth and rounded.
- Select your shape layer in the Scene Panel.
- Go to the Stroke properties in the side panel.
- Look for the Line Cap and Line Join settings.
- Change the Line Cap from
ButtorSquaretoRound. - Look at the ends of your line—they will now be perfectly semi-circular. This simple tweak instantly makes motion graphics look much more polished.
Step 5: Complex Shapes (The Graph Animation) (1:25 - 1:53)
The magic of the Trim parameter is that it works on any path, no matter how complicated.
- Let's make a stock market graph. Select the Path Tool again.
- Instead of two points, click 5 or 6 times across the screen to create a zig-zag graph shape.
- Because the Trim parameter operates on a percentage (0 to 100%), you can apply the exact same keyframes as Step 2.
- Set End to 0% at the start, and 100% a few seconds later. Friction calculates the total length of your zig-zag path and animates the stroke along every corner flawlessly.
Step 6: Morphing the Path While It Draws (1:54 - 2:40)
Friction allows you to animate the actual shape of the line simultaneously while the stroke is trimming.
- Select your zig-zag graph layer.
- Expand the layer properties and find the Path Data (or Vertices) property.
- Move your playhead to Frame 0 and click the Animate icon for the Path Data to set a starting keyframe.
- Move your playhead forward (e.g., matching where your Trim ends at 100%).
- Using the Edit Node Tool (path editing tool), grab some of the points on your graph and move them around. Drag a peak higher, or a valley lower.
- Friction automatically creates a new keyframe.
- Play it back: The line will physically warp and change its shape at the exact same time it is drawing itself onto the screen.
Pro-Tip for the Student: The Trim/Stroke animation is the backbone of animated logos, loading bars, and text-reveal effects. Try creating a continuous path that spells out a cursive word, and use this exact Trim technique to make it look like invisible handwriting!