Go backBack to selection

Mocha 4: The Planar Tracker Gets an Update

The Lens Distortion module in Mocha Pro

Imagineer Systems has updated Mocha, their popular planar tracking tool. Mocha, which comes in multiple versions, makes it possible to track parts of a scene and then use that information to composite graphics and perform other manipulations to your image. In its Pro version, it’s capable of much more.

The basic version of Mocha, Mocha AE, offers 2.5D Planar Tracking and comes bundled with all current releases of After Effects. Mocha Plus is $195 and adds export support for Adobe Premiere, Apple Motion and Boris FX. It also adds the lens distortion solving tool (it lacks the Insert, Remove, Stabilize and 3D functionality found in the Pro version). Imagineer also produces a version of Mocha bundled with the application HitFilm that has functionality similar to Mocha AE.

The full version, Mocha Pro, will adjust for lens distortion, remove parts of a scene, and perform basic compositing with motion blur without switching into another application. It has image stabilization, Stereoscopic 3D support, and a 3D camera solver to calculate the virtual location of the camera used to shoot a clip and help composite 3D objects into a scene.

Mocha Pro also supports Autodesk Flame, Smoke, and Nuke, as well as editors like Adobe Premiere and Avid. Export to applications has been improved with this release and they can now export to Nuke’s Tracker Node. Also new is support for Python scripting. This makes it possible to integrate Mocha with asset management systems.

In the lens module Mocha calculates the distortion added by a lens. It first locates what it thinks are straight line segments in the image. You then click on these lines to link up multiple lines that make up one straight segment. After selecting three or four groups of line segments you click Calibrate and it calculates the distortion correction. Calculating this distortion can be useful for two purposes; if you want to remove the distortion, or if you want to keep the distortion and composite something that is not distorted into the image.

Tracking shapes in Motion Pro | Courtesy Imagineer Systems
Tracking shapes in Motion Pro | Courtesy Imagineer Systems

You can export the lens data to After Effects using a free plug-in for After Effects (this must be downloaded from Imagineer’s site).

The object Remove module can remove foreground elements from a shot using other clean frames from within the shot. This requires first indicating the area to be masked, as well as identifying the area that can be duplicated.

The Camera Solve module calculates the position of the camera used to capture the sequence. You can then export the camera data to an application like Maya or Cinema 3D so that when you render your 3D model the camera movement will replicate the movement in the original scene.

Mocha is frame rate and resolution independent. It supports a variety of file formats including QuickTime, sequential image files, and RED footage. The 4.1 update supports the RED Dragon 6K. For formats not supported, such as Sony .MTS, they should be exported to QuickTime or a sequential file.

As a relative newbie to Mocha, I don’t feel qualified to fully evaluate the program. It is capable of doing some amazing things but you shouldn’t think of it as just a plug-in. Yes, it’s a motion tracker, but Mocha requires some intelligence from the operator; you have to understand how it works to get the best results, particularly if your scene is so complex that your basic motion trackers fail you. If you want to do the things Mocha is capable of, expect to spend some time up front learning it before you get the best results out of it.

Fortunately, Imagineer has posted dozens of videos that explain the different features and how to use Mocha for different operations. The fundamentals section alone comprises 20 videos to get you started with Mocha. Imagineer also has a comparison of the features found in the different versions of Mocha.

To get more details about how best to use Mocha, I spoke to Ross Shain, Chief Marketing & Creative Officer of Imagineer Systems.

Filmmaker: How is Mocha different from other motion trackers?

Shain: If you’re tracking an object as it moves across the screen and a foreground element comes in front of it, that’s the type of thing that is very difficult to track. Or if you are tracking an image that goes out of focus, or off screen, these are very difficult challenges for motion tracking algorithms.

Planar tracking allows us to track really difficult things and hide [some of] the difficulty from the user. We’re trying to bring tools to editors and artists to allow them to be creative without having to do all the manual key framing that’s commonly associated with visual effects work.

Filmmaker: How much are people are using Mocha to fix mistakes vs. adding elements they just couldn’t capture?

Shain: I think it’s used for both quite a lot and I’ll give you two examples.

A very common problem that we see is adding screen inserts to laptops and cell phones, whether it’s an advertisement or a film. It’s a very simple task, but it can get very complex, especially when the screen has lots of reflections, or the lower corner is going off screen. Mocha can track that information and then replace it.

In the film Invictus, director Clint Eastwood decided that he wanted to make the rugby players look a lot more beat up throughout the film. They ended up adding lots of makeup and dirt in post. It’s not really a fix, but it’s definitely elements that have been tracked and added into the scene.

They did hundreds of shots using Mocha to do all the tracking and one of the unique things here is that they used Mocha to do 2D tracks for all these elements, and they were able to accomplish hundreds of shots in a really efficient way. So users are definitely using Mocha to insert things into the scene, but we also see customers using it to fix things and remove things.

Filmmaker: What tips do you have for those starting to use Mocha?

Shain: A lot of people want to do screen inserts and they ask “Should I put tracking marks on my screen?” Ultimately you want to put the reflections back onto the screen to make it look realistic, so then the tape becomes an issue.

What we recommend is that you shoot with just a gray screen, or the screen turned off, because what Mocha then can do is track the edges of the screen. By keeping your screen black or gray, you’re actually going to be able to achieve a much more realistic composite with real reflections in it.

A customer was having a lot of problems with a shot because they didn’t understand that Mocha was a planar tracker and they were basically trying to track the center of the screen, but if you track all the pixels on the edges we can solve the shot in a much easier way.

When people first start using Mocha, typically they just draw a big shape around the object and then hit track and a lot of times they don’t fully understand what Mocha is doing under the hood. It’s important to think about the planes of a scene.

We’re tracking within a shape; we are telling the software that all these pixels are on the same given plane. So pixels that are in a reflection – like in the middle of a screen that’s reflecting off the ceiling probably – are not moving on the same plane as the screen’s pixels, so we tell the software to avoid it and it’s actually a very unique way that we can solve difficult tracks.

Major feature differences of the different Mocha versions
Major feature differences of the different Mocha versions

Filmmaker: If I was tracking a phone, I would draw a large region around it thinking it would want to know about the edges of the phone.

Shain: If it was too large a region then it would grab on to some of that background. If we were to visualize this in planes, then a hand in the foreground is a plane, the phone is a plane, the background is a different plane. A very, very common problem people have is a cell phone with a finger that’s typing on the cell phone that goes in front of what they’re tracking. What you do is add a second shape for the hand, and then it can track two layers at once. It can do unlimited tracking at once.

Filmmaker: You can track multiple shapes?

Shain: Yes. That’s another piece of advice that we try to share with people; you want to stack the layer order. You want to stack things that are further from the camera at the bottom of the layer list. Think of the background as layer 1, the foreground is layer 2, and then any element that’s closer, you keep stacking them up in layer order. And that allows Mocha to track through obscure tracks, so when a foreground element obscures a background we can continue to track through that.

Reflections are the bane of motion trackers because all these reflections are not moving in the same motion. I had a customer that had a shot they spent two and a half days on who was having a real difficult problem with it in another application, and we were able to track it really easily.

Filmmaker: What’s the most common question you get about Mocha?

Shain: A really common question is, “I have After Effects, how do I find Mocha?” You touch a layer in AE and under the animation window, track in Mocha AE. This is how you find Mocha. So it’s not found in the effects pallet, it’s found under animation.

Imagineer Systems

© 2024 Filmmaker Magazine. All Rights Reserved. A Publication of The Gotham