Welcome to DMW TV, the online learning resource for students using the Digital Media Workshop at Middlesex University , Hendon Campus. Here you'll find software tutorials, guides to using our equipment and tips on getting the most out of the facility while you are at the Uni.

Thursday 16 February 2012

Camera Tracked Titles

Hi Everyone,

Here as promised is an After Effects tutorial to recreate the 'floating title' effect from last week's workshop.   Before we begin, have another look at the final result as a reminder:





Stage 1: Tracking the Camera Move

Open After Effects and make a new Composition matching your video settings


Import your video file and drag it onto the composition.


You'll need to add a Camera Tracker to the video by clicking on the 'Tracker' tab of the bottom right panel.  If there is no 'Tracker' tab, go up to the Window menu and make sure 'Tracker' has a tick next to it.


There are two basic options: 'Track Motion' and 'Stabilize Motion'.  Stabilize lets you take shaky, hand-held video and stabilize it to look like it was shot on a tripod.  It works quite well but is not going to give you as good results as a proper tripod shot -- there are no short cuts in cinematography!

We're going to use the first option.  Click the 'Track Motion' button and the rest of the panel will switch on.  Because there is only one video track the 'Motion Source' option should automatically select your video.  The only option we need to change is 'Track Type'.  Set this to 'Perspective Corner Pin'


You should now have a tracker called 'Tracker 1' on your video and some extra buttons will have appeared under the picture.


The tracker is made up of four labeled 'Track Points' at the corners of a white square.  The track points are used to mark an object in the video so that After Effects knows what colours and shapes to track from frame to frame.  Its important you pick a feature in the picture which is easy to track.  The best features are high-contrast corners or dots.  For example the white painted window frames against the red bricks make really strong tracking targets, especially if you put the track point right on the corner of the window frame.

You can move each track point by clicking in the smaller square inside it.  Move the mouse inside the square until you get a black arrow head and direction arrows.  If you see a white arrow head, move the mouse a bit more until it is over the edge of the little square.  You can then click and move the tracker.  You should see a magnified section of the video to let you easily pick a good tracking target.  Move it until the corner of the window paintwork is in the middle of the square like this:


Do the same for the other Tracking Points until you've got a large rectangle lined up with the background.  Remember each tracker needs to be on a clearly visible corner in the picture.


When all the tracking points are positioned properly, its time to start tracking.  Down in the Tracking panel at the bottom right there are some 'Analyse' buttons.  Pressing the 'Analyse Forward' button will start After Effects looking through all the frames of video.  The tracking points should stay stuck to their track targets in the video and follow them like they were pinned to the picture.  At the end of the analysis, the path followed by the Track Points will be shown as a grey 'squigly' line:



If everything has worked, After Effects has tracked the video and created keyframes recording the movement of the track points through-out the video.  If you click on the arrows on the video track to open up the properties, you'll see the Tracker and Track Points along with their keyframes in the timeline:




Section 2: The Titles

Now that we have a track of the video its time to create the titles.  We'll be using a Text layer with Layer Styles to very quickly create solid looking text with shadows and highlights.  By adjusting the lighting on the layer styles to match the real lighting in the video, a much more realistic and convincing effect can be achieved.

First off, make a new Text layer: Layer > New > Text


You can adjust the basic font settings in the Character panel which should be on the middle right of the screen.  Because we'll be shrinking the text layer into the background of the video, we want to start off with the text as big as possible so that it fills the tracked rectangle.  You can change any of the yellow coloured values just by clicking on them and moving the mouse left to decrease the value or right to increase it.  To help the text to 'sit' in the picture better you should make sure you colour it to match the colours in your video.  The buildings already have a dramatic colour scheme.  The red bricks contrast nicely with the battleship grey of the metal cladding.  You can use the 'eye dropper' tool to pick the grey colour for the text which will make it stand out against the brickwork in the background.  Make sure you select the text before you make changes to the font.


After adjusting the size and colour of the text, you should have something like this:


At the moment its a bit dull and flat, but its easy to make the text look more 'solid' with some layer styles.  Go to the menus and find Layer > Layer Styles > Bevel and Emboss, this will put shadows and highlights around the text edges to make look less flat.  Next put a drop shadow behind the text with Layer > Layer Styles > Drop Shadow.  Both of these effects take light direction into account.  To make the text look like its really in the video, we need to adjust the light direction to match the real world.  Its obvious from the video that the sun is coming in from the right and the shadows are pointing to the left.  The properties for the effects are accessible in the bottom panel next to the time line.  Click on the arrows to open the properties for each effect and change the Angle value to match the lighting.


Play around with the other properties, especially Distance and Opacity until you get something like:



Stage 3 Corner Pin

To create the illusion that the text is floating in the video, we have to "map" the text layer onto the rectangle made by the Tracker.  The Corner Pin effect does just what it says -- it pins the corners of a layer on to four points on the screen.  If the points move, the layer will follow.  The Tracker has already created keyframes for its four corner points under the Feature Centre property.  All we have to do is add a corner pin effect to the text layer, then literally copy and paste the keyframes from the tracker points to the corner pin effect.  First, click on the text layer to select it then go to Effect > Distort > Corner Pin


Open up the properties of the text layer and expand the Effects section, then Corner Pin. 


The four corners of the text layer are set to the corners of the composition size ( 0, 0 for the top left and 1280, 720 at the bottom right).  Scroll down to the video layer and expand its properties until you find the first Tracker Point's Feature Center keyframes.  To select all the keyframes,  just click on the name of the property.  The selected keyframes will be coloured yellow.


Then just go to Edit > Copy or press CMD C go back to the Corner Pin effect and click on "Upper Left" and paste the keyframes ( Edit > Paste  or CMD V ).  The Tracker points and corner pin points are in the same order so copy and paste keyframes from each one in turn.


And that's it!  If you play back the composition, the text should move along with the video as if it was always part of the picture.  The last thing to do is render out a video to edit into your film.

No comments:

Post a Comment