Believable Hand-Held Motion Tracking with Mocha & After Effects CS4
Jeff Foster | 07/02
Insert images or video into your hand-held footage for a realistic effect!
To help me make the proper adjustments to the surface data, I can select the Grid button to see an expanded visible grid that tells you immediately if your track is off in any direction in 3D space. With this grid, it’s easy to see if you’re off in your alignment - even just a few pixels. Play back in real time to see if the grid moves off the directional plane you intended and make adjustments to the surface corner points accordingly.
Exporting the Tracking Data
Once I’m satisfied with my track and surface path, I need to export this data to use in After Effects. I select the Export Tracking Data button in the bottom right of the Adjust Track panel and choose the After Effects CS4 corner pin data option in the pull-down menu in the dialog. I can then either save the data as a text doc (.txt) or Copy to Clipboard. I chose Copy to Clipboard the return to my open project in After Effects. (sometimes I chose both options in case my computer crashes jumping between apps - just as a safeguard).
Applying the Tracking Data to the After Effects Project
Once I’ve returned to my open project in After Effects, I make sure that my CTI is at frame 0 and I’ve selected the layer with my full-frame side panel artwork is on (which could also be a full-frame video if I chose) and then simply Paste the data from the clipboard to this layer. The artwork layer is now positioned correctly onto the side of the truck and you can see the path of motion indicated by the keyframes it created. Note the keyframes for not only the corner pin data on this layer, but also for Position, Rotation and Scale.
NOTE: If your inserted image or video appears to be slightly off-alignment from it’s intended destination, then you can slightly move it into position with the Anchor point. All of the tracking Position and Scale information will remain intact.
Creating a “Reflection Map” for the Truck
Now that I have the side on my truck, I can play it back in RAM preview and make sure that it aligns perfectly with the shot - including the camera shake and distortions. But to increase believability in this shot, I need to add some slight reflections onto the side panel surface as the truck moves down the street. Since the truck is in motion and the reflections are minimal (mostly light/color) I only need something that represent the environment in this location, so I use a single frame of the original video footage without the truck in it to create my “reflection map” - cropping and blurring the image and darkening the bottom section. If I had wanted to simulate a real mirror-like reflection, I would have planned ahead and recorded video from that side of the street, using a tripod at the correct angle, then inverted that footage so it would be reversed, then continue with the following steps).
I then import the “reflection map” file into my project in After Effects and place it on top of the tracked side panel layer in my Comp. I lower the transparency so I can see through it enough to reposition it, scale and rotate the layer until it looks like it will create the reflections I want along the entire path of the moving truck. I then set the Layer Blend Mode to Overlay (Layer>Blend Mode>Overlay).
I need to now mask the reflection map to only the side panel on the truck, so I then duplicate the tracked side-panel layer (containing the corner pin tracking data) and move it on top of the reflection map layer in the Comp Timeline. I then select the reflection map layer and chose Layer>Track Matte>Alpha Matte to mask out all of the image surrounding the side panel on the truck. Next I set the reflection map layer’s transparency to 10% so that it’s barely visible on a single frame but when you play it back in real time RAM preview, you can see the light and color reflections - which really sells the effect!
Here’s the final video comparison between the original and the tracked project:
Off topic: I just came by here to brush up on my mocha skills, and couldn’t help but notice these comments:
Lasvideo first said: “A tutorial that doesn’t allow the reader to follow along and replicate the process is a waste of time in my opinion.”
Lasvideo then said “I just thought this tutorial looked so good, I wanted to participate.”
Those two comments are a perfect illustration of the following blog’s thoughts on how to get more people to listen to your opinions:
“http://sethgodin.typepad.com/seths_blog/2010/01/amplifying-complaints.html”
It’s the old vinegar vs. honey discussion, isn’t it? (smile)
Personally, I also prefer follow-along sources and project files (see our books) - but I also know how hard it is to get clearance from people to re-distribute their sources (see our videos). So I agree, but I’m also sympathetic.
Meanwhile, I learned a few useful tidbits from this piece. Thanks, Jeff!
Hi Chris:
This is cool. One of my favorite AE teachers is commenting on my (effective?) communications skills I guess my major in Telecommunications and minor in Speech Communications is showing. Actually stuff like this is reflexive with me…something I wish I had a bit more of when it comes to motion graphics.
Tom Daigon
Avid DS / FCP Editor
Borne Again Cameraman http://www.hdshotsandcuts.com
Hi, love the tutorial. But I’ve run into a snag and I have NO clue as to why its not working. This is the 1st time I’ve used Mocha. Anyway, I shot some footage on my hvx of a building sign, tracked it really well. Exported data into CS5. I want to replace the building sign with another jpeg logo I have but whenever I paste the tracked data to the sign layer it sits miles off the original. I have followed various tuts on this to the degree but this always seems to happen. Any help would be much appreciated. BIG TIME.
Posted by .(JavaScript must be enabled to view this email address) on 06/09 at 11:47 AM
All rights reserved. HD EXPO, High Def EXPO, Createasphere, E-Tech, Entertainment Technology Exposition, 3D Production Workshop, VariCamp, P2 Camp, ColorCamp 101, and Lighting, Filters & Gels for HD are all trademarks of HD Expo, LLC.