Content Aware Fill In After Effects



Remove a Photobomber Using Content-Aware Fill. One of the best and easiest ways of removing anything from your photos in Photoshop is by using the Content-Aware Fill. The Content-Aware Fill is one of those tools that seems almost magical the first time you use it. It allows you to fill in selections with content instead of a color. Remove objects from your video with Content-Aware Fill in After Effects Using Mask Tracking and Reference Frames with Content-Aware Fill For this exercise you need the latest version of After Effects (16.1) and this free clip from Adobe Stock, (clip ID 222376940). Explore more with free footage from Adobe Stock.

Cover image via

In this video tutorial, learn the basics of the brand new Content-Aware Fill in After Effects — including a free project file!

Adobe set the internet ablaze with the announcement of the new Content-Aware Fill feature in the latest After Effects CC release. Now, let’s see if this new feature lives up to the hype. (Spoiler alert: Yes, it does.) In this tutorial, we’re going to cover how to use the new Content-Aware Fill feature in After Effects CC.

So, let’s get started! (Be sure to download the project file, which includes footage to follow along!)

Download the project file

This project file is free for personal or commercial use. By downloading, you agree not to redistribute this file.

What Is Content-Aware Fill?

Content-Aware Fill in After Effects lets you remove unwanted areas or objects in video footage, while automatically filling in the area of the removal. It analyzes frames over time to fill in missing pixels by pulling them from other frames in the footage. It’s similar to the Content-Aware Fill in Photoshop, except in After Effects, it’s temporally aware, and it works on video footage.

How to Start Using Content-Aware Fill

To begin using Content-Aware Fill in After Effects, navigate to the Window tab at the top of the screen, then select Content-Aware Fill. This will open up the Content-Aware Fill panel in your workspace. You will then need to mask out the object you want to remove from your footage. (You may need to keyframe the placement of your mask if your object is moving throughout.) Set the mask to Subtract so that you now have a transparent alpha channel where that mask is on your footage. You should be able to see a mini-preview of where that mask is on your footage in the Content-Aware Fill panel.

You can now select Generate Fill Layer in the Content-Aware Fill panel. After Effects will then analyze the footage and render a .PNG sequence, which it places in the composition. That .PNG sequence fills in the masks/gaps in the footage.

If everything worked correctly, the unwanted objects should no longer be in your footage.

Different Fill Methods

There are three different fill methods you can select from when you use Content-Aware Fill. They are named Object, Surface, and Edge Blend. The Object Fill method will likely be the most commonly used, and it is the default fill method.

  • Object Fill: Great for removing moving objects in your footage.
  • Surface: Ideal for removing stickers, decals, or logos on a smooth surface.
  • Edge Blend: Fast method, best used on low-detail surfaces like paper.
Content Aware Fill In After Effects

Creating a Reference Frame

In some cases, when Content-Aware Fill isn’t giving you the results you want, you may have better luck using a Reference Frame. (I find this ideal when removing static objects from footage, such as a cell tower or a parked car.) When you select Create Reference Frame, After Effects automatically exports a frame from your video to Photoshop. You can then use the Clone-Stamp tool to fill in the removed area. Then save and close the image in Photoshop.

That reference image will automatically import back into After Effects and into your composition. Content-Aware Fill will now take that reference image into account when it generates the fill throughout the video.

Extra Tips

From my experience with Content-Aware Fill, it seems to work best on objects moving through your footage. This allows After Effects to “see” what the video should look like when the object isn’t supposed to be there. When removing static objects in the scene, results will vary. I recommend using the Create Reference Frame option in those cases. Also, I got the best results when I put a small amount of feathering on my removal masks. It doesn’t take much — usually about 2-8 pixels of feathering.

Interested in the tracks we used to make this video?

  • “Retro Vibes” by Wolves
  • “Don’t Forget” by Marc Walloch

Looking for more video tutorials? Check these out.

For years it has been possible to remove unwanted objects from your photos using Adobe Photoshop, but for video, it has always been a challenge — until now! Adobe After Effects has a new feature called the Content Aware Fill that removes unwanted objects from your footage.

In this tutorial, we’ll show you how to use it by removing people walking on the beach.

Content Aware Scale Video Effect

New to After Effects? Check out the Beginner’s Guide to Advanced Tools and Techniques for a primer. And if you’re looking for stock footage to use, head over to Storyblocks Video for endless options, like the clip we used here.

Here’s a still frame from the footage we will be working with:


And here is a still frame of the same footage after Content Aware Fill has been used:

Let’s get started!

1. Once your footage is imported into After Effects, drag it down to the Composition button at the bottom of the Projects panel. This will create a composition with the same settings as the footage.

Effects

In this clip, there’s nothing that interferes with the people walking since the background throughout the frame is very consistent. Since there’s a person near the left side of the frame, as well as two people and a dog toward the middle of the frame, we’ll use Content Aware Fill twice.

2. With the layer selected in the composition, switch to the Pen tool (G on the keyboard), and scrub through the footage to find the best place to create a mask. In our case, it would be where the dog moves away from the people. The idea is to draw a mask with the Pen tool that is large enough to cover the elements you’d like to remove from the scene.

Once your mask selection is complete, you will now have an area that includes your elements, and everything else has been removed. On the mask layer in your composition, set the mask to None for now.

3. Next, with the timeline cursor still on the same frame that you’ve made your mask selection on, inside your mask layer, click the keyframe stopwatch to create a keyframe.

Switch back to the primary cursor tool, then move your timeline cursor to different frames throughout your composition. Anytime that the mask isn’t surrounding the elements you’d like to remove, reposition the mask.

Repeat the pattern until you’ve created enough keyframes that the mask follows the selected elements throughout the composition.

4. Next, go to Window > Content Aware Fill.

Then, on the mask, change it to Subtract.

5. At this stage, with the mask set to Subtract, we could click on Generate Fill Layer inside the Content Aware Fill panel, and it would do its best job to fill in the mask with what it thinks should be there. However, I’ve found that the result is often not accurate in doing it this way. It’s best when you provide Content Aware Fill with more information to work with.

To give Content Aware Fill more data, change the mask back to None like we did in Step 2, then inside the Content Aware Fill panel, click on ‘Create Reference Frame.’

This will open Photoshop. Change to the Lasso tool.

6. With the Lasso tool, I will make a selection around the people (excluding the dog for now.)

Then press Shift + Backspace (Shift + Delete on Mac) on your keyboard to open the Content Aware Fill panel in Photoshop. Press OK.

That will remove the people from the scene. Now do the same for the dog.

Content Aware Fill In After Effects 2018

7. Go to File > Save, and switch back to After Effects. You’ll notice back in After Effects that a new layer has appeared called Reference Frame. This will provide clean data for your mask selection in After Effects that the Content Aware Fill feature can utilize to create a better result.

Let’s set our mask back to Subtract like we did in Step 4. The effect will look complete, but that’s only because of the reference frame. Every other frame in the composition still needs to be completed.

8. In the Content Aware Fill panel window, click ‘Generate Fill Layer,’ and wait for the effect to analyze and complete.

Once complete, it will show a new .png layer in your composition above your footage. The effect is now complete for the people and the dog in the middle of the scene.

If you only have one element in your footage to remove, those are all the steps that are required!

In our footage, we have another person on the left of the frame, so we will repeat steps 2 to 8. This time, we will select the person on the left.

9. I will create a second reference frame, then when Photoshop opens, I will remove the person from the shot, Save and return to After Effects.

10. Back in After Effects, I will draw a second mask around the person and will make sure both masks are set to None. From there, I will create keyframes throughout the composition and reposition the mask as needed.

Since we are using the Content Aware Fill feature twice in this project, I will turn off the first generated Fill layer, and the first generated Reference Frame layers.

Fill

11. Once again, let’s go to the Content Aware Fill panel window and click on ‘Generate Fill Layer.’

12. Next, I will turn all of the layers back on, and make sure the two masks that were created are set to Subtract.

Content aware fill in after effects 2019

And now we’re done!

The Content Aware Fill workflow has its limitations, as a lot depends on the footage you’re working with. However, once you’ve attempted it a few times, you’ll have an understanding of what footage you can use with the feature. It’s a beneficial tool that can help you achieve the perfect look in your clips and drastically reduce your editing time!

Want to see more from Will Bartlett? Look for more tutorials to come on the Storyblocks blog or subscribe to his YouTube Channel, Alli and Will.