Hey, this is Matt with Blue Mantle Films.
Today we're talking about how you can remove objects from video footage
-- like this --
using the Content-Aware Fill feature,
which is new to After Effects.
So yesterday Adobe introduced this
feature for After Effects
which is a feature that they first teased back in 2017.
But before I give my thoughts on it,
I want to go through how to actually use it.
For the purposes of this tutorial I'm going to assume that you have
at least a working knowledge of After Effects.
So hopefully you guys are familiar with After Effects and you can follow along.
So we're gonna start by creating a new
project,
and then within that project we're going to import the clip we want to remove an object from,
then we're going to create a new comp from that clip.
for this particular clip,
which was actually my fourth attempt at using this feature,
I got really good results, I think.
But other clips that I tried it on didn't do so well,
and we'll kind of go through some of those to highlight some of the limitations
of the Content-Aware Fill.
Now I'll give a little coveat that this clip I actually prefer to have the person in the shot,
but I wanted to test out the feature and see what its strengths and weaknesses are.
The first and I think most important step to getting decent results from this feature
is to create a quality mask around the object that you want to remove.
You'll then need to track that object by keyframing the mask throughout the whole clip.
Now this is somewhat tedious but you don't want to skimp on this step or you'll get poor results.
I started with one keyframe every two seconds
and then I went back through and fine-tuned the movement and the shape of the mask
to ensure it closely tracked the subject.
When the mask is done, and I've finished all keyframing, I invert the mask
so that everything except the subject is visible.
Once that's done, go to the Content-Aware Fill on this sidebar,
and if you don't have it in the sidebar click on "Window"
and then make sure you've got a checkmark by the feature, and then it should be there.
So go ahead and click "Generate Fill Layer" and wait for it to do its thing.
This step takes a while and it will analyze the footage then render the fill layer,
but you're gonna have to wait.
I went and got some coffee or something.
I can't remember. Maybe I went and ate dinner.
But yeah, it takes a long time.
Once that's done, I like to reorder the layers
to put the fill layer underneath the clip so that the feathered edge of the mask can be used.
Now, one thing that I did accidentally
when working on this clip,
is that I forgot to feather the
mask before creating the fill layer.
I prefer to do mask feathering first
so that the fill layer that's created
is big enough to allow for that feathering,
without showing darkened edges.
You can see I had to make a few adjustments to
get the feather to work without showing the subject
that we were trying to mask out.
And if I had feathered it before creating the fill layer,
then I wouldn't have had that problem.
Overall it gave me pretty good results, and I'm happy with how it turned out for this clip.
So that's the basics of how to use
Content-Aware Fill in After Effects.
Now I'll go through some of its limitations.
So as I said there are definite
limitations to Content-Aware Fill.
This feature excels where there are
simple or uniform textures,
but it quickly breaks apart when dealing with more complicated textures.
And you can see here the sand, as an example, it made a funky kind of smudge where the person used to be.
You'll also run into trouble if you try to remove an object
that's partially obscured by a foreground element.
Now this makes sense to me because the AI doesn't know exactly
what you do or don't want to actually remove.
There's just too much guesswork.
And so I really didn't expect it to work but I figured I would try it and see.
And yeah. It doesn't work.
This is a very organic effect so I noticed that man-made objects just don't seem to do well.
Here I tried to remove this police car,
but there are many textures and many foreground elements surrounding the car
so After Effects just couldn't figure  out how to realistically fill in the blanks.
I actually didn't even try waiting on
this one for it to fully render.
After I saw the first few frames, and I saw how long it was going to take to analyze the footage,
I gave up on it and tried a different clip.
Overall, I think this feature has
incredible potential and it does some cool things,
but you do need to know its limitations.
One thing that I haven't tried yet, is using 
the "Create Reference Frame" tool,
which I think would help with some of the trouble areas.
I might, *might* is the keyword, go back and see if I can get good results on the police car clip
if I use handmade reference frames.
but that's for another video. I'm definitely not going to try to do that here.
I'm hoping that Adobe continues to develop this
and that some of the kinks can be worked out.
So that's all for today.
Please like, comment, subscribe,
and I'll see you in the next one!
you
