Motion Tracking Filters: The Easy Stuff

In the past, I showed you how to create a very frequently requested effect, tracking a Mosaic filter over someone's face. I'll make a True Confession: I took something of the long way around, because I had some other things I also wanted to show you, like vector masks with alpha channels, nesting tracks inside each other, and so on.

Okay, now for the really easy way to do it.

It takes advantage of two features, one new and one old. The newer feature, in place since Boris Red 2.1, is the ability to apply filters to tracking data. Other compositing applications allow you to do something similar, so that you can, say, have particles trail off somebody's finger like fairy dust.

Those effects are only possible with the small handful of filters that have position information as part of them, of course, which brings me to the old feature. It's called PixelChooser, and it's a built-in masking tool which is part of most of the filters in BORIS RED (and FX and Graffiti, for that matter). Among its many other stellar qualities, PixelChooser allows nearly ANY filter to have a position point, which dramatically increases the range of possibilities resulting from a combination of motion tracking and creative filtering.

Step 1: PixelChooser
Instead of the boy driving a toy car, I'm going to use a clip of the Apollo 11 astronauts walking down a ramp. In case you'd like to play along and don't have suitable footage of your own, here's a half-size version of this clip. To use it, you'll need to work in the Red Engine, and set the project size to 360x243 in the Preferences..

I'll apply the Mosaic filter (Filters> Effects> Mosaic), and this is what we've got: a mosaic covering the whole scene

In the Controls window for the Mosaic filter, select the PixelChooser tab. In the interest of keeping things simple, I'm not going to go into a lot of detail on this amazing tool at the moment. I'll just point out that we're working with one of the region-based selections, and the mask I'll use is the Distance to Point mask. The results of that choice are immediately obvious here.

If you're like me, your default interpolation is something animated. Mine's Decelerate, yours is likely something like Ease In/Out. Because I don't want to animate the next few parameters, I'm going to toggle my interpolations to Constant by selecting this button in the Controls window.

By selecting Constant, the parameters that I set remain "constant" throughout the effect. (This is in contrast to "Hold," which maintains a value between two keyframes, in an effect that might contain any number of keyframes.)

I set the "To" parameter to 40, and use the position point in the Composite window to drag the mosaic over the astronaut's face (Make sure the controls menu on the Composite Window has Position Point selected). Back in the Controls window, I can add a little softness to my selection, with a Blend of 15. I'd like smaller boxes on my Mosaic, so I'll adjust that on the filter's main tab.

Take a moment to savor what we've accomplished, though. We've given the mosaic filter a position point, thanks to the built-in masking power of PixelChooser. Now, instead of animating its position by hand, I can use Motion Tracking to animate it for me.

So I will.

Step 2: Motion Tracker
There's been a slight change in how this filter works in earlier versions of Red, so watch how I do it this time. I apply the Motion Tracker filter by selecting the Favorite Motion Filter button on the timeline. Motion Tracker is the default for this button, but I could change this in the Preferences to automatically apply the Motion Stablizer or Corner Pin Tracker filters instead.

If you're working with Red inside a host application, the default media for the Source track is Video 1. That's exactly what I'd want if I were using Red 3GL as an NLE plug-in. When working in the Red Engine, you'd need to use the media pop-up to assign the same clip for the background clip and the source for the Motion Tracker filter (in this example, Walk.mov).

Drag the Motion Tracker filter on top of the Mosaic filter track so that it is nested inside.

Move the CTI to the first frame of the effect. Click the Preview Monitor button on the Motion Tracker track to open its preview window. The motion trackers are displayed. You can click on them to move the tracker points. Along the theme of keeping it simple, I'm just going to drag the tracker over the astronaut's face, leaving everything else at the default, and select the Analyze Motion Path button.

It really is just that simple. I could show you a lot of the tools we have to enhance the accuracy of the track, but this is a really robust tracker even with everything at the default settings.

There's really only two things I've found that can cause trouble, and that's failing to have the CTI parked on the first frame when you set the tracking area. That's because the motion path analysis begins on the first frame of the clip. It's no wonder that the track might not behave properly if it's not starting from the right place.

The other is leaving my Static/Animate Keyframes button in the wrong position. The tracker works best if keyframes are toggled to animate, that is, with the button showing white. Again, this is obvious if you think about it: motion tracking needs to be able to create animated parameters. The key word is motion.

Set your tracking area with the CTI on the first frame, and let the filter create animated keyframes, and the odds are that you'll get what you need on the first try.

As we discussed last time, the output of the Motion Tracker filter is simply the path. You have to attach the path to something. In this case, it's going to be the position point of the PixelChooser on the Mosaic filter. To get there, I only need to click and drag the Motion Tracker filter, and drop it on the Mosaic filter track.

That's it. Make a mask for the Mosaic filter in Pixel Chooser, apply the Motion Tracker filter, drag it on top of the Mosaic filter track, and I'm done. Here's the rendeRed result.

Step 3: Filter Fun
Now, this example came up in a demo not too long ago, and I used it because it was the only footage I had handy. But the fact is that obscuring an astronaut's face is the last thing I'd want to do. Instead, I'd want to spotlight it. Once again, a breeze using PixelChooser.

Mosaic is certainly one kind of filter that you don't normally think of as having a position point, but Color filters are another category like this. Color filters tend to be applied to the entire frame. PixelChooser allows us to very quickly and easily change this by adding a position point.

My favorite Color filter is probably Tritone. I can use the F pop-up menu to change the Mosaic track to this, and you can see what the filter does: it maps a clip's black, white and midpoint to three colors of your choosing. Those colors can be changed, animated, and so on, but for now, all I want to do is mask them using PixelChooser.

When I select Distance to Point again, the same mask that I'd applied before is still there: a small, blended selection around our hero's face. Checking the Reverse Range option gets me exactly what I want.

Almost. To highlight him even further, I'll duplicate the Tritone track with its nested Motion Tracker filter by pressing command-D on Mac, control-D on Windows. Then I'll use the F pop-up menu again to change the lower Tritone to Gaussian Blur, go to PixelChooser and select Distance to Point, and reverse the range. Here's the rendeRed result.

Step 4: The Easy Stuff
You can see how easy it is to track filters. Once you have the filter with Motion Tracker applied, duplicating and changing it is really just a couple of clicks.

The same is true of the Motion Tracker itself as well. It's a filter, and all I have to do is duplicate it to apply it to anything I want. For example, I took the photo of myself that we use for Tim's Corner, used vector paint to brush a speedy mask, scaled it down, and positioned it over the astronaut's face. I drag the duplicated Motion Tracker filter on top of the track with my face, which then follows right along. Here's the result.

I can tell you in all sincerity that I most definitely do not have The Right Stuff. This is absolutely as close to being an astronaut as I will ever get. I'm more like a Space Cadet. But thanks to Boris Red 3GL, I do indeed have The Easy Stuff, and can build fast, flexible motion tracking effects. You can too, right inside your favorite NLE, or the standalone Red Engine.

Newsletter sign up

Enter your email address below to receive the latest news, video tutorials, and freebies.