To add a line shape in After Effects, use the Pen Tool while ensuring the "Shape" button is active. This creates a shape layer that defines your line using a stroke.
Here's a more detailed breakdown:
-
Select the Pen Tool: Locate the Pen Tool (it looks like a pen nib) in the toolbar at the top of the After Effects interface, or press the "G" key to select it quickly.
-
Enable the "Shape" Option: In the toolbar area (typically above the composition window), look for the dropdown menu next to the Pen Tool icon. Make sure the "Shape" option is selected. This is crucial; otherwise, you'll be creating a mask on an existing layer instead of a new shape layer.
-
Create Your Line: In your composition panel, click once to define the starting point of your line, and click again to define the ending point. This creates a straight line between those two points.
-
Adjust Properties (Optional):
- Stroke Width: In the Layer panel (or in the "Contents > Shape 1 > Stroke 1" properties within your shape layer), you can adjust the "Stroke Width" property to make the line thicker or thinner.
- Stroke Color: Modify the "Stroke Color" to change the line's color.
- Rounded Caps/Joins: Adjust the "Line Cap" and "Line Join" properties for different end styles (e.g., rounded, butt, square) and corner styles (e.g., miter, round, bevel). You can find these within the "Stroke 1" properties as well.
- Dashes: Add dashes to your line by using the "Dashes" property. You can control the length of the dashes and gaps.
- Add More Points: You can add more points to your line after creation to create a more complex shape. Simply click on the path with the Pen Tool.
-
Transforming the Shape Layer: You can transform the entire shape layer using the transform properties (position, scale, rotation, opacity) available in the Layers panel.
Example:
Let's say you want to create a simple horizontal line across your composition.
- Select the Pen Tool (G).
- Ensure "Shape" is selected in the toolbar.
- Click on the left side of your composition to set the first point.
- Hold down the Shift key (to constrain the line horizontally) and click on the right side of your composition to set the second point. This will create a perfectly horizontal line.
- Adjust the "Stroke Width" to your desired thickness.
By following these steps, you can easily add and customize line shapes in After Effects for various visual effects and design purposes.