This is an intermediate level tutorial that will explain how to do a spray-paint effect in After Effects using Trapcode Particular. This tutorial will focus on the technique and theory behind the effect. I'm not trying to get the perfect holy-grail of spray paint effects here, but with a little bit more work, it can be accomplished. Familiarity with After Effects is essential, as I am not going to cover the basics here. There are many other great tutorials and reference materials that cover those aspects of the program.

So, here is a reference movie of what we are going to accomplish.

The abstract here is that we want to spray paint in "real-time" and have a drip system that is completely automated - meaning that if we change the path the spray paint is creating, the drips will automatically come from that new path. We don't want to manually place drips every time we revise the animation.

So, first, let's start a new comp at 720x540 29.97 fps. Call this comp "airbrush_animation." This will be our master comp for the effect. Add a null object and call it "Spray Painter." This will be the object that controls the path of our spray paint. I have made my comp 5 seconds, but you can make it whatever duration you want.



Now, open the motion sketch window (window>motion sketch). Using this tool will enable us to draw a motion path in real time for the spray paint effect. Select the "Spray Painter" layer and click "Start Capture" on the motion sketch window. Click in the comp window and draw your spray paint path. Now, your hand movements have been captured and transferred into position keyfames on the "Spray Painter" layer.



Now, it is time to create the spray paint effect.

In Photoshop, I've created a sprite that I will be using to paint with. What we will be doing is laying down hundreds of copies of this sprite on our animation path, creating the spray paint look. Think of this like using a Photoshop brush. In the brush settings, if you adjust the spacing you will notice that the brush is really just made up of a bunch of circles or other user-defined patterns. This is no different - and this technique can be used to animate other photoshop-style brushes and effects. Airbrush is just one example of what you can do with this technique.



So, precompose your airbrush sprite into a comp named "airbrush_sprite." I'm using a 200x200 comp for this. Let's open up the airbrush sprite comp and do a little bit of work here.

Since my sprite was solid white on solid black, I've unmulted it (not a standard effect in After Effects. Using it as a luma matte for another layer will work, too) to git rid of the background and inverted it because I want to make black spray paint.

I've also added a small animation, scaling it from 85% to 100%. I want the spray paint to have a slight outward spread at the beginning of its creation, and this is the easiest way to do that.



Now, go back to the "airbrush_animation" comp and drop the "airbrush_sprite" comp in there at zero seconds. Make this layer invisible.

Now, add a new layer to the comp (720x540 in size) and call this layer "paint." This layer will create our paint effect. Apply particular to this layer. Now, what we want to do is use the "Spray Painter" layer's position keyframes to drive particular's emitter position. Toggle down the effect switch for Particular and select the Position XY setting. In the top menu, select animation>add expression. Delete what is in the expression box and type in "thisComp.layer("Spray Painter").position;" (without the quotes) or pick whip to the position parameter of the "Spray Painter" layer (the expression will be a little different in this case, but will do the same thing.)



Open up particular and adjust the settings as follows or as suits your own needs:

EMITTER
Particles/sec: 150
Emitter Type "Point."
Direction: "Directional"
Direction Spread [%]: 0
All rotations and velocities set to 0

PARTICLE
Life [sec]: 5
Life Random [%]: 0
Particle Type: Custom
In the custom tab, layer set to "airbrush_sprite" and Time sampling set to "Start at Birth - Play Once."
Rotation: 0
Rotation Speed: 0
Size: 25 (or whatever thickness you want your spray paint to be)
Size Random [%] 2 (this should be a small number for this type of effect. It could even be zero. Other types of brushes can have different random values)
Size over life should be constant (field is all red.)
Opacity: I'm using 70. You can use whatever suits your needs. A higher setting will require less particles, but will appear much more dense.
Opacity Random: 0
Opacity over life should be constant (field is all red)
Transfer Mode: Normal
Leave the Physics, Aux System, Visibility, motion Blur, and Render Mode alone.



Now, preview the animation. It should look like a good start. you may find gaps in your spray paint. Just increase the rate of particles and it will fill it in. As # of particles increases, this effect will become quite processor heavy. So, just be prepared for that.

Okay, so what we want to add now are some cool drips. So, let's create a quick drip animation. Start a new 100x540 comp and name it "drip_slow." Add a new black layer, same size as the comp. Draw a spline from the exact center of the layer to the bottom of the frame. Don't go all the way to the bottom - maybe to the action-safe line. This spline should only have 2 points and be perfectly straight. Select the layer and add the stroke effect (effect>render>stroke). the path should be set to "Mask 1" Brush size around 4.5, hardness around 80%, opacity 100 and paint style set to "Reveal Original Image." Set a keyframe for "End" at frame zero at 0%, then go to frame 150 and set a keyframe for "End" to 100%. Ease in the last keyframe so the drip comes to a gradual stop. Play back the animation, and you should have a simple drip.



So, we are going to use particular to place our drips randomly on the spray paint animation path. There, we can randomly control the size of our drips, but we cannot randomly control how fast the drips are moving. So, we'll do a little workaround. Duplicate the "drip_slow" comp twice. Label one of the duplicates "drip_medium" and the other "drip_fast." Open the "drip_medium" comp and move the last "End" keyframe to 3 seconds to make the animation play back faster. Then, go into the "drip_fast" comp and move the keyframe to the 1.5 second mark. So, now we have three different drips. You could vary them in other ways, too, but for my purposes this was all I needed to do.

Now, select all three drip comps and place them in a new comp (100x540 pixels, 450 frames long (or 15 seconds). The comp length needs to be exactly 3 times the length of one of the drip comps. It is important that all the drip comps be the same length, as well. Label this comp "drip_speed_randomizer." Place the drip comps back to back in the comp. Make sure they do not overlap.



Go back to the "airbrush_animation" comp and add the "drip_speed_randomizer" comp to the timeline at frame zero. Make this layer invisible.

Duplicate the "paint" layer and call this new layer "drips." Open the particular effect setting for this layer and change particles/sec to 10. Set the custom particle layer to "drip_speed_randomizer," time sampling to "Split Clip - Play Once," and number of clips to 3. The Split Clip function will split the "drip_speed_randomizer" into 3 equal segments and randomly play back the movie from one of the segments each time a particle is formed. Adjust the particle size and Size Random [%] values to suit your needs.

If there are too many drips, you can change the particles/sec value to suit your needs.





So, I think there is one other refinement that will help this animation a little. The drips, to me, are not quite random enough in their distribution. They are somewhat evenly spaced along the animation path. So, we're going to add a small expression to randomize the particles/sec value for the drips effect.

Select the Particles/sec parameter in the timeline and from the top menu, select animation>add expression. Delete what is in the expression box and type in "random(0,10)" (without the quotes). This will set particle emission every frame to a random value between 0 and 10. This should help randomize the look a bit.



So, we're done setting up the effect!

Now, if you want to change the animation, all you have to do is select the "Spray_Painter" layer and motion sketch a new path. All the spray paint and drip effects will automatically adjust to the new animation.