Skip to main content
Inspiring
October 20, 2019
Question

Removing an object behind another object in AE

  • October 20, 2019
  • 1 reply
  • 2049 views

I'm working on removing objects in After Effects in this project, and now I need help with this one: in this video from the link, I am trying to remove the painting behind this person who is moving in After Effects, and I have never done this before. 

 

Does anyone know some good tutorials (or anyone know how to do this) on accomplishing this? Thanks!

 

https://youtu.be/acYPQsIeV5s

This topic has been closed for replies.

1 reply

Community Expert
October 21, 2019

You posted the same shot before trying to use Content-Aware Fill, which is the wrong tool. There is little camera movement so there are really only three or four things you need to do to really make this believable. 

 

Since there is a little camera movement in the shot the first thing I would do is Motion Stabilize the shot by switching to the Stabilize Motion workspace, select the layer and then Stabilize Motion using the cross on the wall as the target. You'll put the motion back in later. Then I would pick a frame like the last one that doesn't have anything in front of what you are trying to remove. Save that frame as a Photoshop file by selecting the Composition>Save Frame To Layers>Photoshop Layers menu. Open that up and use Content-aware fill in Photoshop or other tools to remove the painting. When you are done create a layer mask the masks out most of the wall, save the PSD and import it into After Effects. You can then drop it above the original footage to hide the painting.

 

Here comes the hard part. You are going to have to separate every part of the actor that passes in front of the replacement image using Rotoscoping. Rotobrush is probably going to be your best option but because of the similar colors, it's going to take a lot of work to get a clean matte that doesn't stutter. You might want to use a duplicate of the footage with some severe color correction to generate the matte. You may even have to roto the actor's hand and arm manually. If I was doing that shot I would budget a couple of hours to generate the matte. You might get lucky, but that is going to be the hardest part.

 

Once you have the matte created you can use it as a Track Matte for the replacement wall. The next to the last step is to do something about the shadow on that wall. You either need to replace the entire wall so there is no shadow or create an animated shape using a shape layer that matches the movement and general shape of the shadow. You have to put that behind the actor's hand and in front of the replacement wall then adjust the look with blur, opacity and blend modes. 

 

The last step is fairly simple. You add a null, tie the position property of the null to the Anchor point property of the stabilized footage using a simple expression, move the CTI (time indicator) to the first frame and parent everything to the null. This will put the motion back in the footage and add the motion to all of the other layers keeping everything in place. 

 

As I said, there are three or four things you need to do. Only a few of them are simple. The hardest part of this shot by far is separating the actor's arm from the background so you can generate a matte, but it can be done. I don't know of any single tutorial that will give you all of these steps.

 

If you had a different shot the most effective solution would probably be different. This shot is a perfect example of the problems that arise when you shoot something without considering what kind of effects you are going to have to apply to the shot.