4 step process: Tracking, Creating a Clean Plate, Rotoscoping, Color Matching. welcome to the wonderful world of compositing.
Tracking
you should track the moving object either by perspective of transform (depends on the movement in the shot) and apply the track data to the clean patch you create later (step 2) this is also called “clean plate”. if it’s only rotation,position,scale in which the object moves, you can then attach a patch to that null with a track data so it moves like your object. if it’s perspective movement you apply the track data directly to the layer with corner pin effect when you paste the track date from mocha. check the adobe resource files for tracking workflows https://helpx.adobe.com/after-effects/using/tracking-stabilizing-motion-cs5.html
Creating a Clean Plate
Option#1:
you can use Ae stamp tool for this:
1. click twice on the video to open the layer window and use the stamp brush. adjust size and feather and in the paint panel use constant frame and lock source time. this will create a still patch for the duration of the shot.
2. go back to the composition window and duplicate your footage. set the paint effect for the duplicate to “paint on transparent” and delete it from the original. now you have a layer with a patch on transparent background, while the other layer is the original footage.
option #2:
sometimes the paint process is too complex and you need more tools like Photoshop has. (content aware for example) so:
1. export a still frame from your video: Composition->save frame as-> file. this will create a PSD from your video.
2. open the file in photoshop and clean the area you want
3. import the file back to Ae.
4. mask just the part you want
now you need to attach the patch layer to a null with the tracking data.
Rotoscoping
you create a duplicate of your video and rotoscope your obscuring object from the patch. you can try using rotobrush: https://helpx.adobe.com/after-effects/using/roto-brush-refine-matte.html or manually: https://helpx.adobe.com/after-effects/using/animating-shape-paths-masks.html
Color matching
depending on the lighting changes you may have to adjust the exposure for your patch to match the background. you can do this with any of the Color Correction effects. you may need to add grain too.
That’s it!
Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials