5 Shopping Cart
Your cart has been updated

Cover image via

Basic Screen Replacements (with Reflections) in Adobe After Effects

Jason Boone

In this tutorial, we’ll take a look at one of the most common VFX techniques — the screen replacement. Let’s see how it’s done in After Effects.

If you’ve ever attempted to shoot a screen with your video camera, then you’ve probably encountered one of many possible issues. These include a flickering image, exposure mismatches, and banding — just to name a few. You can play the game of tweaking your camera’s shutter speed and matching the refresh rates, but it’s still a difficult process to get perfect. Today, let’s take a look at a more versatile option — the screen replacement.

Don’t have time to watch the video? Read the transcript below to learn the VFX technique at your own pace.

What Is a Screen Replacement?

Screen Replacement in Adobe After Effects

This basic technique allows you to track the screen, then use that data to “replace” the screen.

A screen replacement is a basic technique that gives VFX artists and video editors complete control in post-production. Whether it’s a phone, television, or computer screen, the overall process is the same. Track the screen in your shot, then use that tracking data to “replace” the screen with a separate clip or sequence.

Let’s see a simple, yet versatile, method that will allow you to retain the natural reflections within the scene. We’ll jump into Adobe After Effects and break it down step-by-step.

Step 1. Track the Screen

Track the Screen in Adobe After Effects

The Mocha AE is more versatile and is already bundled in After Effects.

I’ve shot a sample clip of me looking at my phone, with my reflection clearly visible in the phone’s screen. I purposely shot this on a blank screen so I’ll be able to use the black color to help easily isolate the reflection later. But first, let’s track the clip.

After Effects has a great point tracking system, but I prefer the planar tracker of the Mocha effect. It’s just more versatile when it comes to tracking for screen replacements. And don’t worry, Mocha AE is bundled with After Effects, so you already have it installed.

For the first step, I’ll grab the Mocha AE effect from Window > Effects & Presets > Boris FX Mocha and drag it onto my clip. Now, I can click on the Mocha button in the Effect Controls panel, which will launch the app. Don’t get scared if you’re not familiar with the program. The Essentials workspace makes it really easy to work with.

I’ll select an area to track via the x-spline tool. I want to avoid any unnecessary movements, such as my reflection in the middle of the phone’s screen. For this reason, I’ll make a selection around the edges of the phone. I’ll also activate Perspective in the Track Motion Options area. The track forward/backward buttons are just below. Once tracked, the timeline will turn blue.

With my track complete, I’ll select Show Planar Surface, as well as Show Planar Grid. The planar surface translates to corner points, so I’ll use this tool to fine-tune the boundaries of the screen insert. The grid works as a reference, allowing me to check the quality of my track and the surface of the plane. Now, you can see why it’s called a planar tracker.

Once I’m happy with my results, I’ll save and close Mocha.

Step 2. Prep the Replacement Clip

Prep Replacement Clip in After Effects

With vertical video, you’ll need to resize the image to make it fit the screen.

Next, I’ll prep my screen insert. Since this is a vertical video, I need to prep it correctly. First, I’ll bring my clip that I want to insert into my comp and select Layer > Pre-Compose, moving all of the attributes into the new composition. When applying the tracking data, the inserted item (this new pre-comp) needs to match the resolution of the tracked clip (which happens to be UltraHD), which it does.

Again, since the phone is a vertical video, I need to resize my image to make sure that it’ll fit the screen. For this, I’ll dive down into my pre-comp and pre-compose my nested clip again. This final pre-comp needs to match the resolution of my phone. With the pre-comp open, I’ll go to Composition > Composition Settings, then manually type in the vertical resolution of my phone, which is 1080×2340.

To keep things organized, I’ll rename my pre-comps to Screen Insert and Screen Insert Clips. Now, I’ll resize and position my clip within the Screen Insert Clips comp accordingly. If I want to do any animations, this is the pre-comp where it’ll happen.

Corner Pin Effect in After Effects

The Corner Pin effect will squash your pre-comp to fit your phone’s screen.

When applying the tracking data, After Effects will apply a Corner Pin effect, essentially squashing my pre-comp to fit my phone’s screen. Because of this, I’ll grab the Screen Insert Clips pre-comp within the Screen Insert comp and select Layer > Transform > Fit to Comp. Good gracious, I’m handsome!

Step 3. Replace the Screen

Replace Screen in After Effects

Now, just grab the original clip, open up Tracking Data and click on Create Track Data.

The insert is ready to go, so I’ll navigate back to my master comp and grab the original phone clip. In the Effect Controls panel, I’ll open up the Tracking Data menu in the Mocha AE effect and click on Create Track Data. A dialogue box pops up and shows me the layers I created within Mocha. Since I only created one, I’ll grab the Phone Screen track and click OK.

This brings the track data onto my clip, adding Corner Pin keyframes. I’ll export this data to my Screen Insert comp. Under Export Options, I’ll switch the setting to Corner Pin with Motion Blur, and set the Layer Export to my Screen Insert comp. After applying the export, my insert is now tracking along with my phone.

Step 4. Isolate the Reflection

Isolate the Reflection in After Effects

Once the reflection is on its own layer, you can change the parameters in the way that suits you.

Last, but not least, I’ll isolate the reflection. Since the reflection of my original clip is on top of a blank black screen, I can separate it using basic blend modes, such as Lighten, Add, or Screen. If I’m in a hurry, I can introduce the reflection quickly just by changing the blend mode of the Screen Insert. But, as I said before, I want to isolate the reflection, which takes a few additional steps.

For this, I’ll duplicate both the original clip and the Screen Insert and bring both layers to the top. I’ll rename the original duplicate Reflection and the screen insert duplicate Reflection Matte. Now, I’ll simply place the Reflection Matte layer at the top, and set the track matte column of the Reflection layer to Alpha. This will isolate just the screen of my original clip. Now, I’ll simply set the Reflection layer’s blend mode to Lighten, Add, or Screen.

With the reflection on its own layer, I now have complete control. I can change the Opacity, Scale, and Position parameters to get the reflection exactly as I prefer.

Screen Replaced in After Effects

Here’s your final product.

What are you waiting for? It’s time to replace those screens! When you’re done, check out this additional bonus After Effects content: