Tracking and stablising complex scene using multiple shapes

Hello there, my first post.

Enjoying Mocha 2021 8.0.1 very much. So what I am trying to do is tracking and stabilizing complex city scenes where the camera is placed looking forward from a moving vehicle. The scenes are long so the references I can use to track will change along the scene. I don’t see an object for the whole scene. What I can use is, a building far away, then another one, then another one. The only way that I found is to cut the scene, track and stabilize the different sections of the scene, then try to make them match correcting the deformation with a corner pin tool. Not too happy about that. So my questions are:

1- Is there a way to track first one object with one shape, then add another shape further on and let go of the first one as the object that was tracked disappear from the scene?

2- I need the horizon to be very stable, and I need to place objects at the horizon level. So I need the tracking data to attach the object to. I found that If I just track some object at the horizon, I can place the object, and it will stick to it, no problem there. But if I stabilize first, then export the tracking data via the "create tracking data button, any object attached to this data will not move accordingly with the object I’ve tracked.

So is there a way to stabilize and then use of that data to place an object?

3- Is there a way to stabilize only portions of a scene without cutting the scene in separate sections? If, let’s say, I track and stabilize 10 seconds and apply the stabilization to that part, when I get back to after effects these 10 seconds will be stable, but the frame after that 10 seconds will not be affected. I need the rest of the clip to be continuing from the same position (and deformation) that was there at the end of the stabilized portion. Is there a good way to do that?

Thank you so much for your help! Any tips will be welcome, and I can share some example privately if needed.

Glad you are enjoying Mocha, let’s see how we can help.

1- Is there a way to track first one object with one shape, then add another shape further on and let go of the first one as the object that was tracked disappear from the scene?

Yes, track from the end of the shot to the beginning and either unlink the track by going to layer properties and where it says “link to track” set the option to none in the dropdown menu. This will keep the shape in one place and read everything that moves through the shape as a single track. OR you can use add to x spline to continue to create shapes through the shot as you find similar planes to track. Whenever you are moving forward in a scene though an it’s a long shot, you want to track from the tail end of the shot to the start of the shot. That should help.

2- I need the horizon to be very stable, and I need to place objects at the horizon level. So I need the tracking data to attach the object to. I found that If I just track some object at the horizon, I can place the object, and it will stick to it, no problem there. But if I stabilize first, then export the tracking data via the "create tracking data button, any object attached to this data will not move accordingly with the object I’ve tracked. So is there a way to stabilize and then use of that data to place an object?

You have to stabilize first and then either render the stabilized shot (recommended) or precomp/nest/etc the stabilized shot and then apply a new instance of Mocha to the shot and re-track the horizon. You can’t track the horizon in the shot you are going to stabilize, you have to stabilize it first in order to match the new motion you got with stabilize.

3- Is there a way to stabilize only portions of a scene without cutting the scene in separate sections? If, let’s say, I track and stabilize 10 seconds and apply the stabilization to that part, when I get back to after effects these 10 seconds will be stable, but the frame after that 10 seconds will not be affected. I need the rest of the clip to be continuing from the same position (and deformation) that was there at the end of the stabilized portion. Is there a good way to do that?

I’d try trimming the track layer you’re using for the stabilize in the layer properties tab and making a full “reference” frame at both ends of the section you need stabilized and see if that works for you. Please note, you can only trim one section this way. Any more stabilized sections would need to be full reference frames on both ends and then cut in inside your host.

Hope that helps, if you have any questions let me know.

Cheers,
Mary

Hey Mary, thank you very much. I will try your solutions. I’m new to Mocha so thanks for your explanations.

May I ask one more question? What would you do personally if you were to stabilize a similar shot? I find that the most difficult shots to stabilize are those long shots where the camera moves straight forward, in a street with many buildings. Warp stabilizer won’t work, it will add too many deformations when, lets say, the car goes under a bridge or closer to a building for example. Isn’t there a way in Mocha Pro to lets say draw a shape in the center of the view that won’t move and analyze only what’s in that shape and then base its stabilization on that area alone? I have tried to unlink the shape to the surface in the layer properties, but the center point of the surface tool still seams to follow objects, and it will spoil the stabilization. Am I doing something wrong or Is there a “still shape only” stabilization? What I want to achieve is a very stable shot with little or no deformations. Simply keeping what’s in the center of the frame as stable as possible, ignoring small curves of the road and buildings or objects passing on the sides.

Thank you very much for your time.

I’d always try (again, tracking from the end to the beginning) tracking only translation, scale, and rotation, and sometimes for certain sections, translation ONLY. I find too that this varies wildly on a shot by shot basis in a way that only experience can teach. Some shots need you to track translation, scale, rotation, and shear while using shapes on either side of the shot and not in the center at all to account for wobble. For some shots, you have to just try things and see what will work.

I also tell everyone not to track multiplanar objects in Mocha, but where this rule is absolutely broken is when tracking for stabilize. Sometimes best results come from getting an aggregate of data that Mocha ends up averaging together for the “planar” track, and again that comes with experimentation.

Hope that helps. :slight_smile:

I see Mary. ok thank you the good tips. I’ll try what you advised.