In this tutorial, Sri Lankan VFX artist Buwaneka Saranga will teach you how to seamlessly remove a multitude of objects from a moving piece of footage by removing all of the cars from the shot (
above and right).
This isn’t like clone stamping an object out and matching the slight camera shake of a static shot – a moving shot has a change in angle and perspective.
The technique used in this tutorial involves camera projection. You may already know how to do a camera projection in After Effects, but for you to be able to do the kind in this particular case, you need to download and install a script called
Projection by Ben Rollason.
Achieving the same effect without this script would be very tedious and expression-heavy.
The footage I’m using is an aerial shot of a highway with lots of traffic, and we’re going to learn how to remove all the traffic.
The final shot is to be used in a forthcoming short film by
Neumann Films. Time to complete
Adobe After Effects CS6 or later, BR_Projection script for Adobe After Effects
We’ll be using After Effects CS’s 3D Camera Tracker. If you’re using an older version of AE, you can use third-party matchmoving software such as Pixel Farm etc etc SynthEyes, and then import the tracked camera into After Effects.
Cmd/Ctrl + I to import your footage, and drag it to a new composition. Right- click on your footage layer and select Track Camera.
The tracked points will be displayed as coloured crosses.
Select a group of crosses and make sure your target (the red circle) looks flat so that it matches up with an existing flat surface of the footage. I selected three points that gives me a target that’s aligning with the highway.
Once you’ve selected your points, right-click and select
Create Solid and Camera.
After Effects ‘solves’ how the camera moves in 3D space and creates a 3D camera from the tracking data. A 3D solid is also created, which is fitted to the selected tracked points.
We need to scale and orient the 3D solid so that it lines up with our highway. Hit
W to access the Rotate tool, and rotate the solid on every axis until it lines up perfectly. Then hit V to access the Move tool to position it over the surface.
Apply a Grid effect to have more precision in matching the solid with the underlying highway.
Since the camera in my footage moves, the tracked solid gets cut off at the edge of the frame later in the clip – and more detail appears out of the distance. Therefore, before using a camera projection, I needed to pick a frame with the most detail in the distance but where the solid is still visible.
In this case, frame 46 provided the best detail without obscuring the solid.
Window > BR_projection.jsxbin (assuming you’ve installed it).
The Projection script’s UI panel will open. Select your footage layer from the Selected Layer to Project drop-down list, then select the 3D solid on the Timeline and click on the Go button.
Our 3D solid gets pre-composed automatically, and a layer marker is added to show us on which frame the projection was created.
Open the pre-comp by double-clicking on it. You’re presented with a distorted image of our highway, which is exactly what we want.
If you want to get nerdy, you could say that technically we should called this ‘undistorted’, because it doesn’t have the perspective distortion caused by the lens – but that’s just being pedantic.
Select the Clone Stamp tool (
Cmd/Ctrl + B), and double click on the pre-comp. The Layer Viewer opens.
Make sure the Current Time Indicator is at 0 seconds. If not, hit the Home key to get to the beginning of your timeline. Begin to clone stamp out the cars just like you would do in Photoshop.
Cmd/Ctrl and the click and drag left-right to increase or decrease the brush size. Once you let go of Cmd/Ctrl, and drag left-right, you can control the hardness of the brush.
Try to clone stamp as much as you can in one go. Each mouse click will create a new Clone Stamp stroke – and the higher the number of strokes, the slower your RAM previews will be. Create too many and eventually your project file will be slower and laggy.
As you can see in the screenshot (right), our clone stamped layer is obscuring the bridge beneath it. To overcome this we can either use the
Linear Wipe effect or draw a subtractive mask using the Pen tool.
In this case we’ll draw a mask. Give it a feather of 2 pixels.
Click on the stopwatch besides Mask Path on the timeline, and move a few frames back and adjust the mask, so the mask will animate in changing frames.
Another thing we need to correct for is the distortion that gets introduced due to the nature of the projection.
To fix this broken edge, we’re going to use the Transform effect (
Effects > Distort > Transform). Apply it at the layer marker, where the projected layer lines up with the footage, and set key frames on Position and Skew. Move back to the beginning of the timeline and adjust the skew and vertical position until the broken edge matches up.
To fix distortion, the following effects can be used: Transform, Corner Pin, Mesh Warp, Bezier Warp and CC Slant.
Another cool trick is to apply a Fast Blur effect and blur the projected layer to match the footage when the camera is farther away, but gradually reduce the blur when the camera comes closer. Continue this workflow to remove any object from your footage.