Back to Blog

How to Create a Glitch Effect in After Effects

By Nick Greenawalt
After Effects

Glitchin’ aint easy - actually, it can be. Today we’re going to create a Glitch Effect Template that will work with any image or video. 

Have you ever been hacked? Or maybe you’re the one doing the hacking? Either way, glitch effects like this are very popular in today’s cyber world. So in today’s tutorial, we are going to make this glitch effect that you can set up once and then drop over any footage.
MKT-Glitch-Effect_AE_202021012-Article.jpg
The great thing about this template is that we are going to have some control over the variables once we set it up. Once you create it, you can make your glitch as subtle or as chaotic as you’d like.
Today, we'll cover:
  • How to add distortion using a displacement map
  • How to shift color channels
  • Set up sliders to change these effects easily
  • Building a reusable Glitch Template

Grab the Project Files and Follow Along

Make sure to check the link in the description and you can snag project files that will help you get the most out of this lesson.

Grab the project files and follow along!

Download Now

How to Create a Glitch Effect in After Effects

What is a Glitch Effect?

how-to-glitch-after-effects-1.gif
So, what makes a cool glitch effect? Well, a glitch is an unexpected digital error. On a video screen, they happen when something isn’t working properly, or a signal is getting corrupted. This usually means that the effect is random and chaotic.

Creating distortion

how-to-glitch-after-effects-2.gif
To get started, I’m going to drop in my source image. This can be whatever you want—an image, video, text. I’m going to use the School of Motion logo. We can go ahead and precompose this and call it “Source.” Now that this image is precomposed, we can change whatever is inside this source composition in the future without messing up our effect. 
We want to create some distortion (or noise), which is going to drive this glitch effect. Make a new layer so we can reference this easily with an adjustment layer. Let’s make a new solid and call this "Noise."
how-to-glitch-after-effects-6.jpg
Add Fractal Noise. Bump up the contrast. Stretch out the scale. We want this noise to dance around randomly as though it’s glitching.
Open Evolution options, alt-click on Random Seed, then type “time*15”. This will give us a new random seed that changes depending on the number we type in here. The higher the number, the faster the change.
how-to-glitch-after-effects-7.jpg
Make a new adjustment layer and add a displacement map. Target the Noise layer and select Luminance: This will make the effect look for the dark and light values. Select Effects and Masks. Now you can see a glitch starting to come together.

Shift Color Channels

how-to-glitch-after-effects-3.gif
Another aspect of glitches is the separation of red, green and blue values—also known as chromatic aberration. Since all colors on a screen are made up of RGB, when you are getting hacked—or doing some hacking—your R,G, and B go crazy. Come on, this is Hollywood hacking 101.
Let’s make a new adjustment layer and add a Shift Channels effect. Keep the red, and turn other channels to “full off.”
how-to-glitch-after-effects-8.png
Set the blending mode to “Lighten.” Add a transform to this layer. Now if we move the position on the transform, you can start to see what's happening here—a single shift for only one color.
Let’s call this layer “Shift Red” and duplicate the steps for green and blue…
how-to-glitch-after-effects-9.png
Like we said in the beginning, we want this effect to also feel random. So let’s add a little Wiggle expression to the transform property on one of these channels. Copy expression on to blue and green.

Set up sliders for easy control

how-to-glitch-after-effects-4.gif
Now it's time to set up some sliders so we can easily manipulate this effect and get the desired results.
Add a null object and name it "Controller." Now add 2 slider controls. Pick whip Wiggle Expression to sliders, and copy the expression to other adjustment layers. Now we can animate the sliders on this controller layer—from zero to whatever—to create a glitch.
how-to-glitch-after-effects-a1.jpg
Use hold keyframes to create snappier start and ends. And if you aren’t happy with how linked together things are, you can start messing around with these expressions and making even more sliders!
Now let’s see how we can reuse this effect in the future.

Build a reusable glitch

how-to-glitch-after-effects-5.gif
Now that we have a glitch effect we are happy with, let’s clean this up a bit and templatize this so it’s easier to reuse.
Highlight them all and precompose them. I will call this "Glitch Effect." But OH NO, the effect is GONE! What have we done?! No worries, just click the Continuously Rasterize button and our effect will affect all the layers below it.
Now the issue here is that if we want to make any changes to our glitch, we have to click into the glitch comp and change the sliders, and then click back out to see the effects.
how-to-glitch-after-effects-a2.png
That’s not going to work for me. Let’s copy all the sliders from our controller Null, and then past them onto our Source Precomp.
Then lock the Source Effects Control Panel up top and switch back into the glitch comp. Now we can go ahead and delete any keyframes we made on the controller layer, and just re-link these sliders to the same corresponding sliders, using the pick whip. 
Now you can keep any animation you want to do on the outer comp on the Source layer. The original sliders are linked to the sliders on this layer. All of the expressions have been updated.

G-G-G-Get It!

how-to-glitch-after-effects-a3.gif
And there we go. Look at this awesome glitch effect we made. We created some nice distortion, shifted color channels, and even attached all of these properties to sliders so we could easily control them in the future. Way to go. Very proud of you for making it this far. 

Express Yourself

And if you want to take your motion skills even further, why not advance your knowledge of automation with Expression Session, where Zack and Nol will teach you how to approach, write, and implement expressions in After Effects.