OK, get ready fo a novel.
For faces or other organic body parts that are in motion or are turning in space, and with almost ALL organic roto (roto not on rigid planar surfaces) make sure you cut perspective tracking off. You may need to switch to translation scale and rotation only, or translation only, in some cases. In these cases, more manual keyframes will be needed.
For fast moving objects that are so quick that they are moving non-planar shapes with motion blur, manually keyframe those frames, and continue tracking when you are more likely to get a track. You can also increase angle, zoom, and minimum % of pixels tracked for better results.
For moving shapes that can’t be broken down into a planar surface, look for the bulk similar motion and Mocha should be able to ignore the irrelevant data. Again, more manual keyframing may be necessary.
Tighter roto shapes can help roto organic, non-planar shapes but most objects can actually be broken down into what is essentially “low poly” models for the purposes of roto. Make sure to paper doll everything, split up shapes by motion groups (like ribcage, soft belly tissue, and pelvis) for difficult roto shots. Things like cloth flapping in the breeze are just hard, period, but using translation only to get the bulk motion and then keyframing the flutters can help.
The best practice for when to set keyframes when adjusting a spline when the roto shape falls off is to keyframe the last frame where the roto shape is onscreen, and the very next frame, keyframe it completely offscreen until it needs to be back onscreen. Then keyframe the frame right before the shape needs to appear onscreen, and again for the next frame it needs to be on screen for (the next immediate frame).
It can absolutely help to stop tracking, correct the spline, then track backward, and it can also work to just correct and continue forward, depending on the shot and what your previous frames look like. If your previous spline looks fine, no need to track backwards.
In order to determine where to make a spline correction and add a keyframe you should look for the “arcs” of the animation. That is, where the spline is most divergent from where you need it to be. Then scrub between those two keyframes and look for the most divergent parts of the spline, correct them, and keep scrubbing between keyframes. The idea is to evaluate where corrections are needed from a large scale to a small scale. Look up principles of animation re: squashing, stretching, and tweening for a better grasp of what this looks like.
You can prevent the spline from falling off a tracked shape between keyframes by adjusting your tracking parameters like switching to translation scale and rotation only, or translation only, adjusting the rotation and zoom values to increase the search area, increasing the dimensions of the search area, or adjusting the Minimum % of pixels tracked.
The shape is where the track is looking, the surface tool is what the track is doing. In the case of roto, the shape follows the track. Keyframes correct the shape edges while it moves along with the tracking data in order to create roto masks.
You are probably using the wrong techniques, or are not understanding how the tracker works, we have not found any bugs with keyframing roto. Have you watched our Fundamentals of Mocha or Getting Started with Mocha series? They really help and go in depth into these details. But honestly, nothing beats hands on experience for learning once you grasp the concept of planar tracking. That concept is the hard part. Basically, Mocha is a texture tracker, looking for motion groups we call “planes” because planes have pixels in them that move all relative to one another. But thinking about it in motion groups can be more helpful than thinking about it in a rigid, “planar” way. Think of primary and secondary motion, think of how those concepts differ, and think of how something is put together of parts all moving separately, then think of what those parts have in common motion-wise, group relative motion together into one shape, and you’ll have a much more articulated “paper doll” to work with in roto. However, also understand that any tracking has places where it will fail and some parts of roto will always be manual work. For every shape that can be tracked, Mocha can save you time, but not all shapes have enough texture or are visible enough to be tracked throughout the whole shot, in these cases, manual keyframes are necessary. You can also check out our documentation for more info.
It is also vital that you stack objects in the layer pile as closest to camera at the top and furthest from camera at the bottom of the pile. This means shapes will hold out from one another properly while you track, and you won’t get conflicting tracks.
Please let me know if you have any more questions and I will be happy to help you.