This Cyber Monday Tuts+ courses will be reduced to just $3 (usually $15). Don't miss out.
This tutorial provides you with the fundamentals of shape layers and shape effects. We will have a closer look at the most important functionalities and develop some basic examples. The topics covered will give you a good start to realize and design your own projects using shape layers.
Introducing Shape Layers
In this tutorial you will be introduced to shape layers and shape effects and the various powerful possibilities they offer.
We first need to take a closer look at the different shape layer tools and understand their properties. So let's start by creating a new composition by choosing 'Composition' > 'New Composition...' from the menu.
Click on the shape tool in the tool panel (shortcut Q) and create a so called parametric shape for each option in the dropdown menu
(Rectangle, Rounded Rectangle, Ellipse, Polygon and Star). There is one important thing to keep in mind. Unless you don't want to add a shape to an
already existing shape layer (as we just did), make sure that no layer is selected (deselect all layers by pressing F2) or After Effects will
create a mask.
Please take a look at the timeline panel and open up the properties for the new layer called 'Shape Layer 1'. We find a shape group called
'Contents' which further includes the shapes we have created and the 'Transform' property.
Here comes the important note that will save you from future nervous breakdowns and the like: Always be sure on which level in the shape
layer's hierarchy you change properties.
The following example illustrates this in short:
Switch to the selection tool (V), select the layer 'Shape Layer 1' and move it in the composition panel. You will see that all shapes move together. Changes in the position of 'Shape Layer 1' are reflected in its 'Transform' property.
With the selection tool (V) still active, select 'Polystar 2' and move it around in the composition panel. This time only the 'Polystar 2' shape
changes its position, while the values for the 'Position' property remain unchanged. This time, the changes in position were not reflected
in the 'Transform' property of 'Shape Layer 1' anymore but in the 'Transform: Polystar 2' property of 'Polystar 2'.
The position values found in 'Transform: Polystar 2' reflect the position of the shape in relation to the center of the comp.
Let us have a closer look a the properties of our shapes. You will notice that each has a path, stroke fill and a transform property applied to it.
Please feel free to open all properties and change their values to get a feel of how they change the original shapes.
Explaining them all would go to far at this point but they are pretty much self-explanatory.
For example changing the values for 'Inner Radius', 'Outer Radius' and 'Outer Roundness' for the 'Polystar Path 1' property of 'Polystar 2'
results in various shapes of flowers, stars and the like.
What we want to take with us from the above steps is the following:
-Changing values in the 'Shape Layers 1' > 'Transform' property changes the properties (anchor point, position, scale, rotation and opacity)
for all shapes included in that layer.
-Color and stroke can be changed for all shapes a the same time by selecting the appropriate layer (in this example 'Shape Layer 1' and
changing the settings over the 'Fill' and 'Stroke' tools in the tool panel.
-Changing values within the shape itself only affects the selected shape.
-Make sure to change values on the right level of the hierarchy. To prevent any confusion, it pays out to give your objects
descriptive names once your projects get more complex.
In contrast to the parametric shapes introduced in the steps above, the pen tools can create freeform shapes the same way
as when creating masks. So we start again with a simple example to reveal the basics of the pen tool.
Delete 'Shape Layer 1' and activate the pen tool (G). Click and drag into the composition panel and pull out a bezier handle
for your first point. As you create a second point the same way, the pen tool will fill the area that is enclosed between your points
with the color and the stroke you have selected in the tool panel.
If you want to close the path, move the cursor back to the starting point of the shape until a small circle appears next to it and use a LMB click
to close it. A new 'Shape Layer 1' has been added to the timeline panel. If we drill down into 'Shape Layer 1' > 'Contents',
we will find our new shape called 'Shape 1'.
To create an open path, you simply do not click back to the starting point of the shape. To get rid of the fill, select the appropriate shape in
the timeline panel and change the fill to 'None' in the tool panel.
Another way of turning off the fill of a shape is to turn off the video switch (the eyeball) for the 'Fill' property of the appropriate shape.
Delete 'Shape 2' from the composition and select 'Shape 1' in the timeline panel. Click on 'Fill:' in the tools panel and change the fill to
'Linear Gradient' and click OK.
The 'Fill 1' property of 'Shape 1' has been renamed to 'Gradient Fill' and various new options are available. By changing the values for
'Start Point' and 'End Point' you can control the direction and behavior of the gradient. However, another maybe more intuitive way is
to select the 'Gradient Fill 1' property in the timeline panel, which reveals a gradient handle in the composition panel. Move the starting and
end point to achieve the desired result. Change the color of your gradient by clicking on the 'Edit Gradient...' property of 'Gradient Fill 1'.
Now change the 'Type' property of the gradient from 'Linear' to 'Radial' and observe the gradient handle in the composition panel.
The starting point of our gradient is now surrounded by a small circle that can be used to move the radial center away from the starting point.
But what if we want to change our shape after creation? Let's see how to edit individual points:
- To add an additional vertex to your shape, click on the path (not on a vertex!) with the pen tool activated and drag out the bezier handles
as far as needed.
- To delete a vertex, just click on it with the pen tool activated.
- To move a vertex, activate the selection tool (V) and click and drag the appropriate vertex.
- To change the path between two vertices, click and drag on the path or drag the bezier handles of the corresponding vertices using the
- To toggle between a vertex with bezier handles and one without (to create sharp edges), activate the pen tool, hold down ALT and click on
- With the selection tool activated (Press CTRL while in the pen tool mode) double click on the shape path (not into the fill area)
to activate the free transform tool. Your shape will be surrounded by a white line with little boxes.
Use the boxes to scale your shape as you wish or hover over the white line to activate the rotation functionality and click
and drag to rotate the shape.
A fast workflow that does not require to switch tools all the time while editing your shape is using the pen tool (G) and temporarily
activate the selection tool by pressing 'CTRL' when needed.
Alright, after a lot of theory we are getting closer to the interesting stuff. For this we will now have a closer look at each item
in the 'Add' menu.
For the rest of this tutorial, whenever you are asked to choose 'Add' and an effect from the shape effect menu, please use the menu items that will
appear when clicking on the little arrow next to 'Add'.
Create two random freeform shapes within the same Shape Layer using the pen tool. Choose 'Add' > 'Group (empty)' from
the shape effect menu. This will add a 'Group 1' property to 'Shape Layer 1' in the timeline panel.
Shift Click 'Shape 1' and 'Shape 2' and drag and drop them into 'Group 1'. You can now control both shapes together
by highlighting 'Group 1' and changing its properties (e.g. changing fill and stroke on group level). This is a fast way to get control
over a group of shapes without loosing the ability to change the individual shape within that group if needed.
To see the next menu item in action we select 'Shape 1' in the timeline panel and choose 'Add' > 'Rectangle'. A new property 'Rectangle Path 1'
is being added to 'Shape 1' and a rectangle appears in the composition panel.
Use the other menu items to add an 'Ellipse', a 'Polystar' or a freeform 'Path' to an existing shape. The new shape path will automatically take
over the look and feel of its parent shape.
Use the 'Fill', 'Stroke', 'Gradient Fill' and 'Gradient Stroke' items from the shape effects menu to gain even more control over your shapes. To see an example we delete 'Rectangle Path 1'
from 'Shape 1' and with 'Shape 1' selected we choose 'Add' > 'Fill' from shape effects menu. This will add an additional 'Fill 2' property to
Open up the 'Fill 2' properties and change 'Color' to something different than the original fill of 'Shape 1'.
You can move 'Fill 2' up or down in the hierarchy (click & drag) an change its 'Opacity' value to have it mixed with 'Fill 1' and 'Stroke 1'. In
the example below we mix 52 percent blue with the original red to get some sort of purple.
To demonstrate next shape effect, we delete all previously created fills so we are left over with two freeform shapes in 'Group 1'. Select
'Group 1' click on 'Add' > 'Merge Path'. This adds a 'Merge Paths 1' to 'Group 1' but it looks like nothing has changed in the composition panel.
Activate the selection tool (V), select 'Shape 1' and move it over to 'Shape 2' so the two shapes overlap. Now the outline of the two shapes
merged to one combined outline. To see this effect without the blue path lines, click on the same icon as if you were showing/hiding a mask.
Open the 'Merge Paths 1' property an toggle through the 'Mode' properties to see their effect in action.
To illustrate the next effect we will delete everything from the comp and create a new pen shape. Select 'Shape 1'
in the timeline panel choose 'Add' > 'Offset Path' from the shape effects menu. This gives you the possibility to scale your shape up or down.
However, if you reduce the value for 'Amount' your shape looses the roundness. "Why not using the 'Scale' property instead?"
you are asking? To be honest, I still have no answer to that one...
We now delete the 'Offset Path 1' from 'Shape 1' and choose 'Add' > 'Pucker & Bloat' from the shape effect menu. As one can assume from its name,
this effect will pull the line segments either inwards or outwards. As this effect has only one property, it offers a really easy way to create
Delete 'Shape Layer 1' in the timeline panel and use the shape tool (Q) to add a polystar to your composition. Open the properties for 'Shape layer 1'
in the timeline panel and with 'Polystar 1' selected, choose 'Add' > 'Repeater'. The repeater makes copies of your shape
that can be offset, scaled and rotated as you want. Open up all properties (including 'Transform Repeater 1') for 'Repeater 1' in
the timeline panel.
We will shortly see, that the repeater is by far the most powerful shape effect. For a start, we play around with some properties to get a feel for
the repeater's possibilities. Increase 'Copies' to 6 and 'Position' to around [500,0]. Changing the values for the
'Position' property increases or decreases the distance between the copies in X and Y. If needed increase or decrease the 'Scale' of the polystar
to match the image below.
With 'Polystar 1' selected add a new repeater and move it below 'Repeater 1' in the timeline panel.
We now change various properties and see how they effect the final result and to get a better understanding for the repeater's possibilities.
We first increase 'Copies' to 30. However, this time we want the copies to offset in Y and not in X so we
change the values for 'Position' to [0,-60] (Remember that the top left corner of our comp is [0,0] so "up in Y" means a negative value). As a next step we change 'Scale' down to 90 percent. This means that every copy will
be scaled down by this factor. To make the copies fade out towards the end we change the 'End opacity' to 10 percent. You should now end
up with something similar to the image below.
Now we will just quickly animate this creation by going to frame 0 and setting a keyframe for 'Offset' with value 30.
As expected, this will offset the copies by the number specified. Move forward to frame 24 and set another keyframe
for 'Offset' with value -40. Move the work area end to frame 24 and hit 0 on your num pad to run a RAM preview. This effect
should now look like the one shown in the preview.
As a next example we will take again our polystar to create a cool spiral effect. Delete 'Repeater 2' from 'Polystar 1' and open up
the properties for 'Repeater 1'. Increase the value for 'Copies' to 60, set 'Anchor Point' to [-1000, 0], 'Position' to [0,0], 'Scale' to 95 percent and
'Rotation' to +30 degrees. The values for anchor point give you control over the spreading of your spiral and as its name says, the 'Rotation'
property adds rotation to all your copies. Move your shape layer with the selection tool (V) so the spiral is centered in the composition panel.
Again, we have the possibility to quickly animate this creation by setting keyframes for the 'Offset' property. Set a keyframe for 'Offset'
at frame 0 with a value of 100 and move forward to frame 24. Set another keyframe with a value of -85.The final effect should now look like
the one shown in the preview.
In addition, the repeater offers the possibility to quickly create various grids. To see this feature in action we delete everything from
the comp and create a new shape using the 'Ellipse tool' (Q). Remember to hold down shift as you drag out
the shape to create a perfect circle. Change the 'Fill' to 'None', stroke color to white and weight to 2px.
With 'Ellipse 1' selected in the timeline panel, add a repeater to the shape. Open up the 'Repeater 1' properties and increase 'Copies'
to around 20 and 'Position' to around [50,0] to match the image below.
We now add a second repeater to 'Ellipse 1' increase its 'Copies' to 14 and change its 'Position' value to [0, 50]. We end up with a simple
grid of circles.
To make things a little more interesting we want to add a gradient fill behind the grid that fills our circles with color. To achieve this effect,
we will choose 'Add' > 'Gradient Fill' from the shape effects menu. Make sure that the newly created 'Gradient Fill 1' property is placed within
'Ellipse 1' group and below the two repeaters. Please note that if you switch to the selection tool (V) and select 'Gradient Fill 1' in the
timeline panel, that the gradient handles appear in the composition panel.
Open up the properties for 'Gradient Fill 1' in the timeline panel and change 'Type' from 'Linear' to 'Radial'. Also change the values for
'Start Point' and 'End Point' so the gradient is centered in your comp (Instead of changing the values in the timeline panel,
it's probably easier to click and drag the two gradient handles directly in the composition panel as we have seen before) and adjust the 'Colors' as you want by clicking on 'Edit Gradient...'.
Switch off the 'Stroke 1' property for 'Ellipse 1' to make the white circles disappear.
We now have various possibilities to animate this setup. For example a pulsating gradient can be achieved by adding a short expression
to the 'End Point' property or by just setting some keyframes. I can highly recommend the website of Dan Ebberts (http://motionscript.com) if you don't feel comfortable with expressions yet. He offers a great introduction into expression on his site and explains various very
handy tips and tricks.
If you like, please check the composition called 'Grid' in the project file to see another animated grid with a linear gradient (Switch off 'Gradient Fill 1'
and turn on 'Gradient Fill 2' in the timeline panel.
The examples we have seen here only scratch the surface of what can be created with the repeater shape effect. I recommend to play around with
various combinations of the repeater to see what can be done - there are thousands of creations waiting to be discovered.
To see the next effect in action, we once again delete everything from the comp and create a new polystar with the shape tool (Q).
Select 'Polystar 1' in the timeline panel and choose 'Add' > 'Round Corners'. This will add a 'Round Corners 1' property to 'Polystar 1'
and by increasing its only property 'Radius' the corners of our polystar get rounded - simple as that.
To take a closer look at the next shape effect 'Trim Paths' we take a little detour to see another cool function of shape layers. So let's delete
'Shape Layer 1' and add some text to your comp using the text tool (CTRL + T). Feel free to use whatever text you like.
The cool thing about this is, that we can convert this text into shape layers so we are able to apply a shape effect to it. To do this select the text layer in the timeline panel
and choose 'Layer' > 'Create Shapes from Text' from the top menu. As we can see in the timeline panel, After Effects has switched off the original
text layer and added a shape layers that contains every individual letter of our text.
Select the shape layer and choose 'Add' > 'Trim Paths' from the shape effects menu. This will add a 'Trim Paths 1' property to the shape layer.
Trim path can be used to draw a shape's stroke on and off and/or to wipe its fill on and off. For our example, we turn off the fill for all
text-shapes. At the same time we add a white stroke with 4px weight.
By changing the values for the 'Start' and 'End' properties of 'Trim Paths 1' we will now be able to animate the text stroke.
Move the time indicator to the beginning of your composition, change the value for 'End' to 0% and add a keyframe. Move the current
time indicator to frame 48 and add another keyframe for the 'End' property at 100%. If you want every individual letter to reveal after each other,
change the 'Trim Multiple Shapes' property from 'Simultaneously' to 'Individualy'. Hit 0 on your num pad to run a RAM preview.
To make this effect look more interesting you can for example add a glow effect to the layer and maybe add a wiggle expression to
'Opacity' to create a flickering effect as in the composition named 'Trim Path' from the project file.
The same effect can be used to create an animated line growing over a map or the like. So we start with a new comp
by choosing 'Composition' > 'New Composition...' from the menu or by hitting CTRL + N.
Use the pen tool (G) to create an open path by switching off fill in the tools panel.
Drill down into 'Shape 1' in the timeline panel and open its 'Stroke 1' property. To add some dashes and gaps to the shape, click two times on the
little '+' icon to the left of 'Dashes'. This will add a 'Dash', 'Gap' and 'Offset' property underneath 'Dashes'. You now can control the lengths
of the dashes and the space in between. If you need a more complex line pattern, feel free to add more dashes and gaps by clicking the '+' icon
as many times as you want. And vice versa with the '-' sign.
Select 'Shape 1' in the timeline panel and add the 'Trim Paths' shape effect to it. By setting keyframes for the 'End' property of 'Trim Paths 1'
we can animate the dashed line as we have seen it in the example with the text shape. If you want the line to grow backwards, just click
the second little arrow icon to the right of 'Path 1'.
For the next shape effect we will once again delete all shape layers from our comp and add a new polystar with the parametric shape tool (Q).
With 'Polystar 1' selected in the timeline panel click on 'Add' > 'Twist' from the shape effects menu. With only one property, this effect is
pretty straightforward to understand. Play around with the values for 'Angle' make the polystar twist around. Obviously the center region of
the shape is more affected by the wist as the outer regions. A fast and easy way to get interesting results is to use a repeater and to add an
expression to the 'Angle' property of this effect. Please check the composition called 'Twist' in the project file for details.
As we move to the next shape effect, delete 'Twist 1' under 'Polystar 1' and click on 'Add' > 'Wiggle Path'. This shape effect is an auto
animated one. To see it in action increase the value for 'Size' and 'Detail' to around 40 and the 'Wiggles per second' to 8.
Press '0' on your num pad to run a RAM preview. This flickering star is just one short example, feel free to play around with this to see
how changes affect the shape and the animation. By increasing 'Size' to very high values, you can quickly achieve an animated chaos of strokes
Delete the 'Wiggle Path 1' effect from 'Polystar 1' in the timeline panel and choose 'Add' > 'Wiggle transform' from the shape effects menu.
Open up the properties 'Wiggle Transform 1' in the timeline panel. Under the 'Transform' property you can set the desired magnitude
for wiggling the 'Anchor Point', 'Position', 'Scale' and 'Rotation'. Change some of these values and run a RAM preview to see the corresponding
result. The two last shape effects have been combined in the composition called 'Wiggle Path & Transform' in the project file.
And last but not least, we delete 'Wiggle Transform 1' from 'Polystar 1' and choose 'Add' > 'Zig Zag' from the shape effects menu. This effect
is once again very straightforward, it either adds a sharp or round wave path to the 'Polystar 1' depending on your selection for the 'Points'
property. Play around with the values for 'Size' and 'Ridges per segment' and you will see that this is another simple and fast way to
create various nice shapes.
Just in case you catch one of these days where new ideas are rare, you can ask After Effects for a little help by doing a brainstorm
for you. To see what kind of help this function provides, you can select specific properties or just a whole shape and click on the
brainstorm icon. In the example below, I highlighted the 'Rotation' property of the repeater from the spiral example (Step 31) and that is
what After Effects came up with. If you like one of the suggestions, you can hover over the appropriate image and choose either 'Save as New
Composition' or 'Apply to Composition' to add the effect into your project.
And finally for the last step, here is another thing that might come in handy some day. Let's say you want to convert a mask that you have already
created into a shape path to (for example) apply a shape effect to it, this is how it works:
Delete all layers from your comp and add a red solid to it. Use the mask tool to create a random mask.
Press F2 to deselect any layer and use the pen tool (G) to create a dummy shape layer with a few points. Select the Solid and open its Mask properties,
select its 'Mask Path' and choose 'Edit' > 'Copy' from the menu or press CTRL + C on your keyboard.
Drill down into 'Shape Layer 1' > 'Contents' > 'Shape 1' > 'Path 1' > 'Path' and with 'Path' selected, choose 'Edit' > 'Paste' from the menu
or press CTRL + V on the keyboard. Your mask has been converted into a shape and you now can apply all shape effects to it.
Alright, that was it so far from my side. It's time to leave you alone in the endless universe of shape layers and effects so you can
work on your own ideas. However, I'm looking forward to seeing some fascinating creations out there...