File size: 5,861 Bytes
09c6e66 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | 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.
1. Create a new composition in Friction.
2. Select the **Path Tool** (Friction's equivalent to the Pen Tool) from the left toolbar.
3. Check your tool properties at the top or in the side panel.
* Set **Fill** to `None` or an opacity of 0%.
* Set **Stroke** to a visible color (like White or Yellow) and give it some thickness (e.g., 10px or 20px).
4. Click once on the left side of your canvas to create your starting point (Vertex 1).
5. Click again on the right side of your canvas to create your ending point (Vertex 2).
6. Press `Enter` or `Esc` to 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.
1. Select your new shape layer in the **Scene Panel**.
2. Look at the properties panel on the right. Expand the **Stroke** settings.
3. 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.
4. Locate the **End** parameter (which goes from 0% to 100%).
5. **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%**.
6. 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.
1. Open the **Graph Editor / Timeline View** at the bottom of the screen.
2. Click on the **End** property to reveal its keyframes on the timeline.
3. Drag a box to select both the start and end keyframes.
4. Click the **Smooth Node / Bezier** button in the Graph Editor toolbar.
5. 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.
1. Select your shape layer in the Scene Panel.
2. Go to the **Stroke** properties in the side panel.
3. Look for the **Line Cap** and **Line Join** settings.
4. Change the **Line Cap** from `Butt` or `Square` to **`Round`**.
5. 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.
1. Let's make a stock market graph. Select the **Path Tool** again.
2. Instead of two points, click 5 or 6 times across the screen to create a zig-zag graph shape.
3. Because the Trim parameter operates on a percentage (0 to 100%), you can apply the exact same keyframes as Step 2.
4. 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.
1. Select your zig-zag graph layer.
2. Expand the layer properties and find the **Path Data** (or Vertices) property.
3. Move your playhead to Frame 0 and click the **Animate** icon for the Path Data to set a starting keyframe.
4. Move your playhead forward (e.g., matching where your Trim ends at 100%).
5. 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.
6. Friction automatically creates a new keyframe.
7. 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!
|