Mocha stabilizer

Hi everyone,

I’m stabilizing a clip in the mocha plugin on flame and then enabling the same

Is there a way to reverse the stabilization and bring back the original movement?

I am rendering it in the plugin as the stabilization is better than exporting the stabilizer data and then applying it through 2d transform.

Any ideas?

Thanks in advance


Can you use the stabilizer data on an axis instead of the 2D Transform node? Then you would have the option to “Invert” the data.

Keep in mind @Jeff presents all the high-level knowledge about tracking outside Flame, in his Masterclass

1 Like

How are stabilizing it? as there are multiple ways to do it in mocha. Are you using the unwarp stab?

Thanks @Sinan - yeah I didn’t know you could load Mocha data into the 2d transform node.

I know of two stabilization data workflows where you work with exported data, and then one workflow where you can use the OFX node itself. I haven’t done that approach much because I like using the data; I think it gives you more control.

Stabilizer Data Approach (a little complicated) = export Flame2024.stabilizer tracking data and then load it in Action with a surface set to Perspective and load the data into the UV points tab. This should stabilize it. Invert the stabilization by duplicating the action and on the surface in question, in the UV points tab click “to vertices” and then “reset all”.

Shape Data Approach (a little simpler) = export gmask tracer shape data similar to how you export roto and then load a gmask tracer node with the data, copy the axis from the gmask tracer and paste it into an action, connect it to a surface, and invert the axis. This should stabilize it. Invert the stabilization by duplicating the action and changing the invert status of the axis from inverted to not inverted.


@cristhiancordoba and @Sinan

I am loading mocha as a ofx plugin within flame.
I’m then creating a shape and tracking it.
After that I’m going into the stabilizer tab and selecting motion all as the shot has some skew as well.

After that I am exporting the stabilizer data from the stabilizer tab and tracker tab as .stabilizer files.

Once I exit, I am selecting the option in the ofx plugin to render the stabilizer. It’s working Bang on.

I was wondering how I could invert this within mocha to get the original motion back after I’m done cleaning up the shot.

I tried loading the 2 stabilizer data files I exported in action by selecting the axis and then going into track stabilize and 2d transform stabilize tab.

However they don’t look the same as mocha is internally smoothing the shot and applying skew etc that is not there in action or 2d transform.

I know 2d transform has a invert option.
I am not sure how to invert the data in action through the axis. When applying stabilization in action, it applies it to the axis and surface.
I am not sure how to invest that @Sinan .

It would be great if I can copy the same mocha node and invert that data.

In mocha I can’t find the animation data, only the dope sheet.

Any ideas guys?

I’ll try these options tomorrow, thanks so much
I found the 2d transform approach was almost matching the stabilization from mocha.

In action I was doing something wrong.
I’ll try the action approach tomorrow.

In mocha you have the option to select all motion which includes x and y translation, shear and perspective besides rotation and zoom. It also has a smoothing option.

I selected all these.

How would all this data translate into the flame axis, especially shear and perspective?

I’ll have to do some testing on that one- I’m not sure.

It sounds to me that you are close but missing a couple of steps or are exporting the wrong kind of data out of mocha.

38:00 in Jeff shows the exports. I think you are exporting stabilizer data when you really ought to be exporting shape data to load into a Gmask axis.

1 Like

So just duplicate the mocha node and set to Render: Stabilize: Warp. It should work

1 Like

It’s not currently possible in the render mode of the tool. At least not for the standard stabilize. It’s possible for the Mesh Warp stabilizer, so depends on your use case if that is an option. Though due to the nature of that stabilizer it does not guarantee to be a null-op.

There’s also a thread on the BorisFX forum on this topic: Reverse Stablization - #2 by maryp - Mocha Pro - Boris FX Forum

It’s worth noting that for some formats Mocha can export the inverted data, which could help if the Flame workflow you’re applying it to doesn’t have an invert.


Thanks everyone,

I’ll try the warp stabilizer option tomorrow as well. I tried it, but it applying the stabilization only to the area within the shape in mocha and distorting the rest, I was not sure if the unwarp would bring the image back to its original state.

I’ll try it again tomorrow.

I’ve used the shape export a lot, loaded in in gmask tracer, used that axis for tracking, I’ll try inverting as suggested earlier…

I’ve got a few things I need to try tomorrow

Thanks for all the advice everyone

It does, and I’ve used it that way. It’s meant for comping or painting out specifically for the stab/unstab workflow. The only reason the caveat it is that the math is more complex, and you might get minor deviations on the unstab.

You would want to do that on the original, then then comp the unstab back over the original with a mask.

1 Like

Use a bilinear in Action to achieve this.

  1. export your track data from within mocha as a .stabilizer.
  2. load track data onto bilinear as a 4 point track. Make sure crop is off in the surface area.
  3. click on “Vertices” tab then select "copy anim>To UV Points.
  4. Open vertices animation channel and keep the key frame where you started your track. Your clip should now be stabile.
    TO reverse the stabilization duplicate the action setup and copy the track data from UV back to Vertices (there is a button to do this under the UV points>copy anim, then “keep” the keyframe where you started the track on the UV animation channel now the track should invert itself.
1 Like

Thanks everyone
I tried all these options and it works

Have a great day ahead