Surface does not follow x-spline properly

i have an x spline that, after some manual adjustments, tracks an object perfectly.
BUT the actual surface (aka the actual tracking data) does not follow the x spline from a certain point on.
Specifically the tracking data is off from the point on where I had to manually fix the x spline in the footage.
how can I tell the tracking data to just follow what the x spline is doing?

Short Answer: You can only correct the track via adjust track, the shape doesn’t affect where the track is tracking, just the texture the track is looking at. So use adjust track to keyframe this.

Long Answer: To really know how the planar tracker works, you need an understanding of the difference between the surface and shape tools.

The shape can be a matte/mask and gets used that way for many tasks like color correction and object isolation, but in Mocha the shape is first and foremost where you define the plane you need to track. When tracking for VFX, object placement, screen replacement, and most tasks that require precision match moving you have to be very careful with choosing your planes for your shape and align the surface to the area you need to follow. The surface is what the track is actually doing, the shape is where the track is looking for planar texture data.

So first, look at your shot and the task you need to do, then break down the relevant areas in the shot into a low poly model in your mind, or a cubist painting, or however you need to visualize that the world is a series of textures moving in one direction at a time.

In mocha, we can best track one planar area of texture at a time. In order to track this, you have to pick the texture that moves “relative to itself” which is just a fancy way of saying that it moves in the same direction.

Mocha looks at the texture within the spline and then looks ahead to the next frame, it finds the texture there and then the tracker makes a keyframe based on how the texture has changed from one frame to the next, and you don’t see any of this because it’s under the hood; it’s invisible math. To give you something to see, the tracker pulls the shape and surface tool along with the track based on the keyframe it just made. Now the process repeats, Mocha looks at the texture in the new shape that has been transformed along with the tracking data, and finds it on the next frame, makes a keyframe, and pulls the shape and surface tool to it.

Where this confuses people is that the shape can be keyframed for rotoscoping and garbage mattes. This will not affect the track other than changing where the tracker is looking for the next frame. Once the track is complete, animating the shape has zero effect on the track at all. See, no matter how I move the shape, the track remains unaffected.

The surface is an accurate visual model of the track itself. So whatever the track is doing, if the surface tool isn’t sticking like glue to the plane of the object you are tracking then you have a bad track.

One of the common ways people get bad tracks are they track multiple planes at once, so two sides of a cube at once for instance (OR Whole human faces. Entire arms. Whole scenes with complex multiplanar objects crammed into one shape, like this guy’s entire mouth).

Another common way to get a bad track is to not notice a shadow or reflection, but since Mocha is a computer, it sometimes sees subtle movement within a texture we might usually ignore or take for granted. Mocha does exactly what you tell it to do. You just have to know how to talk to it and how it thinks. Being good with the planar tracker is like being good at Google searching. You know what you need, but you need to give the search engine the right keywords to get there or you’ll get garbage results. The planar tracker is like that but with texture. What clean texture can you use to get the track you want with the least amount of work? It’s not always where the object is, sometimes it has to be a coplanar texture instead. Or as @Martinb says “Knowing how to see what the tracker sees is as important as knowing how to draw the spline.”

You can use adjust track to correct a bad track with a little drift, but to correct a bad track that’s drifting a lot, you really need to think about better placement for your shape.

I can’t see this in motion, so I am just guessing, but I think you might need to narrow down your spline to a more consistent texture like the teeth or the lips but not both.

Please let me know if you have any questions and I will be happy to help you.

Cheers,
Mary

Alrighty!
first of all; thank you very much for this very detailed answer!
I think a key thing that I just realized with mocha is, that even when in the end I need, in this example, the teeth tracked if that does not seem to work (which it did not…) i should be tracking a close but different area that just might do trick - correct?
in this case I tracked the upper lip just above the teeth area that I am actually interested in, which seemed to do a much better job in this case.
Also if the track at a certain frame fails - I go back on that specific point and can adjust the spline and the grid indicating where the actual track will end up is not going to be affected.
so, tracking a position where I want to ad something in post is very different from tracking something for a matte.

so, now I seem to have an actually very decent track of the part right above the teeth in that shot.
The track sits very tightly in terms of its location BUT instead it did not seem to take over any information in terms of size, rotation etc. - how should I go along with this?

maybe this is simply a tricky shot to track…
i am now, in after effects, working with a second null that adjusts the errors in the first null that takes its info from the mocha tracking

Yes, this is tricky to track. Organic stuff like faces are always tricky to nail. Because they’re so multiplanar. I am glad the explanation helped you understand how Mocha thinks a bit better. You’re on the right… ahem… track.

And it does look like the mocha logo is sticking, but it’s so small I can’t see whether it is sticking correctly. In cases like this, the grid tool can help you see if the motion is correct because it places an expanded grid out from the surface tool you can use to check your work. It looks like you are already tracking with all parameters.

You’re not using Mocha Pro, but if you were, there’s a grid warp tool in the insert tab that would really help you attach things to skin and cloth. You use the track and then hand animate the grid to match the “geometry” of the face. It’s really easy technique wise, but your mileage may vary depending on your comfort with keyframing.

You might be able to get similar if more tedious results with corner pins and expressions along with the puppet tool in AE. You can find a tutorial of that here: https://borisfx.com/videos/mocha-and-after-effects-puppet-tool/