Join Nick Harauz for an in-depth discussion in this video Using integrated Mocha tracking with Sapphire, part of Sapphire for Video Editors.
- [Instructor] So I'm here in my Chapter 6_3 sequence. And we're going to take a look at how Mocha is integrated into the majority of Sapphire Effects in version 11 here. With my timeline open, I'm just going to go to my effects. And let's do a search for S_Cartoon. This is not the only effect, as I just mentioned. Several effects actually can, basically, have a gateway to Mocha. Which will allow us to mask an effect to a certain portion of the screen. Let me just place S_Cartoon here on the TRIM_BOB clip.
And, with that, let's go press Shift + 5 to go to Effect Controls. And let's just load a preset. And I'm sort of liking the Ink Stroke effect. Just has a lot of detail. End result, I just want to lend this to his face. I just want to see how this Ink Stroke only looks on his face itself. So I'm going to load that in. Interesting kind of cartoonist style here on the clip. If I were to try to do this, and just keep this in mind, inside of Premiere Pro, we could try to use one of these mask tools. I would have to use my free draw bezier and hope that that bezier would be able to track his face across the screen.
On top of that, if it did break down, or did not follow his face for a couple of frames, I would have to tweak frame by frame in order to achieve my end result. Let's see how Mocha might be able to help us with this situation. I'm going to click the Edit Mocha button. And this is going to launch the separate interface of Mocha Pixel Chooser. And the first thing that I'm going to do is really just a rough mask around this persons face. Now you can start to draw this mask anywhere.
And then either track forward or backward. Now Mocha will tell you that they prefer you to draw X-Splines. And I will say this, as well, because X-Splines are easier to control than beziers in this program. You can adjust multiple points at once, without having to worry about each particular bezier handle. Let's just draw, and I'm going to just start this off with a super rough mask. Okay, by clicking. Click, click, click, with this X-Spline tool that I just selected, around the subjects face.
So I'm not going for accuracy here. And I'm going to click on the top point, and just double click. A little handy shortcut is if you press Z, I can zoom out here. And I might want to just extend the points here at the top. Because his head does come into frame. And to just show you another way, if I click and drag, I can select multiple points and bring them in. The really cool thing about Mocha is I can contract something very rough. And then, essentially, link to it a more specific track. I want to draw your attention to a couple of things. One is I'm going to turn on this little paint icon.
Just going to show you the area that I'm currently using to track. So, and one really cool thing about Mocha, that's different from anything else, is it tracks textures. Or, it tracks a pattern of pixels. It's not just looking for a point. Which makes it extremely powerful. When I made this X-Spline shape, I do have the ability to select a point and press Control + A to select multiple points, and sort of curve them in, or make them really ridged. Over to your left is a Layer Control panel. And I'm just going to rename this Layer 1, Rough Head Track.
I have the ability to change the overlay. So I'll change that to a green, to make it more noticeable. And I'll also change the outline around the points to a black color. Now I did draw this shape in the middle of my clip. So the first think I want to do is actually track this backwards. And what I'm doing is tracking, using this information down here. Since the shape that I drew is fairly large, it's using only a minimum amount of pixels, it's fairly low. The smaller the shape, the more pixels it will use. It's using Translation, Scale, Rotation, and Sheer to perform the track.
I'm going to add Perspective, because there's a little bit of Z movement here. But think of Translation as position data, Scale as scaling up, Rotation as rotation, Sheer is just a shifted X and Y, without a shift in Z space. Knowing that Mocha does a pretty good job to start you off with the default settings, we're just going to track this backwards, by clicking on this button. And you'll see here that it holds up pretty nicely. Now I'll join you in a second, after this track is complete.
What I'm going to do, after this is done, is move to this point and then track forward as well. So, overall, it did a really good job of the track. And we run into a little bit problems here, at the side, when the head tilted over. So I want to show you how easily this is to just fix. So that we know that we have the proper pattern. I'm just going to kind of go to the frames just before he does start to move over to the side. And add a keyframe here. And then I'm going to go to where his head's tilt.
I'm just going to click and drag over these buttons. And, keep in mind, I'm just looking for something rough. And just drag them out to the side, to better define the area I was looking for. You can see there that the mask adjusts appropriately. At any point in time, if this wasn't what we were looking for, especially this sort of increase, as in it just happens so abrupt, what we can do is change this. Now here's the cool part, is that all of this data can be used, right, and essentially we can link something to it.
So I'm going to actually turn off the little gear icon here. And I'm going to now start to draw in a more specific shape around his head. I'm going to go to the end of my clip, select the X-Spline tool, and kind of draw in the shape around his head. And once I double click, you can see there, the shape outline, I'm just going to press Control + A to select all the points and kind of drag them inwards, just to make them a little bit more soft. You can see there, this is the frame that I chose to drag them on.
Rather than track this, what I'm going to do is select Layer 2. And link it under these Layer Properties to the Rough head track. And just notice if I move forward, looks really good. You can see here that it holds up pretty well throughout this entire piece. Now here's the best part. Is that this data is independent. So I can make some tweaks, depending on some errors that might occur because of my previous track. I might just add, by the way, if you press the Control + left arrow, in this program, or right arrow, you can move frame by frame.
And right around here, I'm just going to force the addition of the keyframe, cause I like the way this looks. And I'm going to move forward, to where this sort of stops its motion. And then just select, click, and drag all these points. And then just move them in. And you'll see what Mocha has done is interpellated, or basically tweened between my keyframe examples. No need to keyframe on every frame. And you can make these adjustments to one, or however many points you desire.
I'm pretty happy with this as a rough mask, just to show you a demonstration here of Mocha. And I'm just going to just basically rename this, Good Head Mask. And before we go back over into Premiere Pro, I need to make sure of something. I want to make sure that the rough head is not visible. And that the good head is visible. So I am going to make sure that the eye is on for this. And it's not on for the rough head. I'll click on this. Go press the save button. And what you're going to see here is that the cartoon look is only applied to his head.
Other things you should note about this Mocha effect, is if I look at the S_Cartoon, underneath it is a bunch of Mocha parameters. And if I click the disclosure triangle next to them, I can increase the blur of the Mocha mask, so it's not so ridged. And if you looked in earlier tutorials, just know there's this way of actually showing Mocha's mask only, to decide how blurry you want that mask to be. And another thing to note is that I can actually invert the mask that I made altogether, by clicking on this Invert Mocha button. Everything but his face is effected here, in this shot.
I preferred it the other way. So hopefully this gives you some ideas of how you can use Mocha integrated into Sapphire Effects. And, keep in mind, you should try to track the eyes, and a couple of other items, to get a sense for how this works. And there's also a ton of training on borisfx.com to get you up and running with this powerful tool. In the next movie, I'm going to further this exploration by showing you a more advanced example. And then a really cool way that we can actually attach lens flares to an object.
- Getting started with Sapphire
- Essential parameters
- Working with presets
- Adding transitions
- Creating photo-realistic lens flares
- Adding backgrounds and textures
- Building custom effects
- Working with Mocha