Animating Spray Paint and Stencil Effect in After Effects

Turquoise Flag-Tip
spraypainttutorial.jpg

So in this tutorial I’m going to show you how to create a spray paint effect using After Effects. It’s a fairly simple process but I’ve got a few tricks that you may not have thought of. Here is a sample video of what you’ll be creating:

Here are the AE project files.

So let’s begin.

1.) Open After Effects
Lets create a composition that is 720×540 and call it “final stencil”.

comp-settings-1.jpg

2.) Make Paint
Now we are going to make a spray paint effect. There are lots of different ways to achieve a spray paint effect. I will show you two different techniques in this tutorial. First, create an adjustment layer that is the size of the composition and call it “paint 1″. Apply “vector paint” to this layer. Change your vector paint settings to look something like this.

Make sure the vector paint effect is selected and you should see a toolbar next to your comp window. Select the brush and paint on some spray paint similar to this.

3.) Animate Paint
Within the Vector Paint controls change the playback to “Animate strokes”. Once you do that the Playback Speed becomes available for you to change. Put it somewhere between 3.5 and 4. Now when you scrub in the timeline you should see the stroke you just made animating from start to finish.

NOTE: Where you are in the timeline when you make your first stroke using vector paint determines when the stroke starts animating. So if you were not at the begining of the paint layer when you made the stroke, you’ll notice that the stroke doesn’t start animating on the first frame of the layer. It starts animating when it reaches the point in the timeline where you first made the stroke.

4.) Roughen the Edges so it looks like spray paint.
Apply the “Roughen Edges” effect to the paint 1 layer. The trick here is to bring down the scale parameter in the Roughen Edges effect. Change your effect settings so you have Border = 20 and scale = 10. The “boarder” parameter controls how much of the edge it will roughened. Now our spray paint is made and your project should look like this:

5.) Add Paint Drips
Let’s add in some paint drips for a little more realism and styling. Go and grab the Spray Paint vector pack and isolate a few drips and copy them into a new Illustrator or Photoshop document. I’ve copied my spray paint splatters from Illustrator into Photoshop as pixels, this way After Effects won’t be rendering these layers as vector art. Save your isolated drips as “drip 1, drip 2, and drip 3″ and import them into After Effects.

Now let’s add these to our comp. Drop one of the Drip psds into the timeline and solo the layer. Take the elliptical mask tool and draw a circle mask around main part of the spray paint. It should look like this:

Now we are going to keyframe the “mask expansion” so the drip will animate. Keyframe the mask expansion to go from “-61 pixels” to about “74 pixels” with a duration of about 20 frames. Now when you scrub in the timeline you should see the solo’d “Drip” layer animating. Ok, click to solo button again so we can see our “paint 1″ layer. Depending on what colors you are using you may need to add a “Fill” effect to the “Drip” layer so it matches our original “paint 1″ layer.

5.a) Blend the Drip
Now that your drip animates and it’s the same color as our “paint 1″ layer let’s put them together. Here is how I did it.

5.b) Finish the Drips
Now do the same procedure to the other Drips and combine them with the “paint 1″ layer. You should now have something that looks like this.

6.) Do It Again for Variation.
Now, we are going to start from step #2 and create a whole new paint layer. One thing you want to make sure you realize is that we need to create another composition because the
“Roughen Edges” effect will effect all the layers below it when it’s applied to an adjustment or solid layer.

Create a new composition and call it “paint vers 2″. Do the same thing that is in steps 2-4 just make the stroke from right to left instead of left to right. You should have something like this:

7.) Combine the 2 comps
Drag “paint vers 2″ from the project window into the “final stencil” composition. You should now have something like this:


Now we are going to add drips to this paint layer as well. This time we can just duplicate the drip layers and add the “Fill” Effect to change their color so it matches the “paint vers 2″ color. Now you should have something similar to this:

8.) Making the Stencil Comps.
Make a new comp that is 800×540 and call it “paper”. Add a new solid layer and put a rectangular mask on it and then rotate the layer a bit. It should look like this:



8.a) Create a paper texture

Now we are going to use this shape as a track matte for our texture. Go and grab a paper texture from our texture pack and import it into the project. Drag the paper texture into the “paper” comp. Make sure the paper layer is underneath the solid layer and set the solid as an “alpha matte”. Now your paper layer should be using the solid layer as track matte. You can scale and position the paper layer to your liking.


8.b) Make a “Stencil” comp
Make a new comp that is 800×540 and call it “stencil”. Drag the “paper” comp into this comp. Now this is where we make our stencil. As you can see, I’ve used the Go Media logo as my stencil, but you can use practically anything. It’s probably best to use something that’s vector, like an illustrator file or a text layer within After Effects. This way you can use the alpha channel as a track matte. So create some text, or use the Go Media logo and on the “paper” layer select “Alpha inverted Matte” Now the Go Media logo, or your text should be cut out of our “paper layer”. Now you should have something like this…

8.c) Make More Spray Paint
So here is where I show you another way of making spray paint. This technique is less mechanical and seems more realistic to me. Create a black solid that is 400×400 and put a circular mask on. Now apply the “scatter” effect to the black solid layer. Set the scatter amount to around “70″.

Now we are going to animate the mask expansion to create the “spray on” effect. I’ve keyframed mine from -135 to -18 with a duration of about 5 frames. I also dropped the opacity down to about 80%. Once you have done this once, duplicate the layer and move the position to the next point you want to paint. You’ll also want to offset the duplicated layer in the timeline. Do this over and over until you have completely painted on your stencil. You’ll notice that I also used a “Drip” layer to add a little bit of style and realism to this comp. Here is how i did it.

8.d) Create the Bottom Comp
Create a comp that is 800×540 and call it “Bottom”.
Drag in the “stencil” comp and the Go Media Logo into this comp. Draw a rectangular mask on the stencil layer that subtracts all the paint and is the same size as our original paper comp. This will probably take a little manual tweaking. Make sure the text is in the same place as it was in the stencil comp. You can copy and paste the position attributes to make sure they are the same.

8.e) Create a “no paint” comp.
In the project window highlight the stencil comp and hit “comand+d” to duplicate that composition. Then double click on it to open it up. Then change the comp name to be “no paint”. Then delete all the paint layers so you just have the paper layer and the Go Media logo layer as a track matte.

8.f) Create another stencil comp? Yes!
Create a new comp that is 800×540 and call it “stencil build animation”. Now drag your “stencil” comp, “no paint”comp, and “bottom” comp into this comp.

Now solo the “stencil” layer. Add the “CC Page Turn” effect to this layer. Now keyframe the page turn effect so that the stencil folds into frame. You’ll want to keyframe the fold position. I keyframed the position from -128,270 to 705,270 with a duration of about 1 second. You’ll want to make sure that the paint in your “stencil” comp doesn’t start painting until the page turn transition is complete.

Now once the page turn is complete and the paint has finished painting, select the “stencil” layer and hit “command + shift + d” to duplicate and cut the layer. Now on the second “stencil layer” keyframe the “CC page turn” effect to animate out the way it came in. You can literally copy and paste the keyframe from the 1st “stencil” layer to the 2nd stencil layer. Now you need to make sure that the “bottom” layer is underneath everything and is positioned in the timeline so it only is visible when the page turn effect is animating out. Your comp should look like this:

Now you’ll notice that when our stencil animates out of frame, the backside has paint all over it.

This is where we want to use our “no paint” comp. as the backside in our “CC page turn” effect. Once you set the backside to be the “no paint” layer, you can hide that layer.

Once you set the backside to the “no paint” layer, your comp should now look like this:

Now make sure that the “bottom” layer is visible at the same time the Page Turn effect reveals the “bottom” layer. You’ll want to do some simple masking so you don’t see a jump in the black paint when the bottom layer becomes visible. The reason this happens is because both the bottom layer and the stencil layer have the paint layers on them. This is also because my original paint was set to 80% opacity. If it was set 100% this would be less of a problem. But just do a simple mask that follows the page turn as it animates and we’ll be fine. The image above shows the simple mask job I did.


9.) Combine the Stencil Build with our “Final Stencil” Comp.

Drag the “stencil build animation” comp into the “final stencil” comp. Align the “stencil build animation” layer in the timeline so it starts to animate after all of our red and yellow paint finishes animating.

10.) Adding a Little Bit of Style.
So now the basics of this tutorial are complete. The only thing left is to take this animation a bit farther and keep adding in elements and making this piece visually interesting. Create a new comp called “square paint comp”. Use the vector paint effect to create a nice background similar to the one I used. Don’t forget to animate the stroke like we had done before. I also created a stroke effect on the vector paint by duplicating the paint layer and making the brush size bigger. I then brought the opacity of that layer down to about 65%.

10.a) Use 3D Space and a Camera
I then turned all the layers into 3D layers, added a camera and started to do some keyframing on the camera. I added a simple wiggle to the point of interest which give the camera a little shake. You can also add lights, motion blur, depth of field effects and anything else you can think of…go crazy! I hope you enjoyed learning about these techniques! Have fun!

Discussion

We want to hear what you have to say. Do you agree? Do you have a better way to approach the topic? Let the community know by joining the discussion.