Mocha masks based on luma matte from After Effects


I started using Mocha Pro not too long ago and I took the trial version to start with and would like to buy a license later if I can use Mocha to my advantage.

I work as a motion designer and I often need a variety of masks that could work equally well in After Effects, Premiere Pro and Fusion, but there is no direct mask export between those software (except for TrackMatte, but that’s not what I need), so I decided to try Mocha Pro for such export, because with this software you can output native masks to Premiere Pro and Fusion (it’s awesome!).

But here’s the thing, I still don’t really understand how I can keep track of the simple luma masks I output from After Effects to a video file, so I can use them to create exact masks in Mocha and export them via “Export Shape Data” to other software. All my attempts, so far, have been unsuccessful, so I’m turning to you for help. I was thinking that maybe this can’t be done in Mocha, but given how complex tracking is done with it, I highly doubt that in the same way you can’t accurately track and create a mask from the simple shapes in the video that I output from AE (simple scale/position animation). Example of such a mask: - YouTube

I also tried using “MochaImportPlus”, but after autotracking masks in After Effects, it creates a lot of extra points when the mask moves and such export really breaks the mask in Mocha, unfortunately.

The algorithm of my actions:

  1. Create animation of shapes in After Effects.
  2. I make auto-trace shapes and get masks.
  3. I transfer the resulting masks to a video file and use “MochaImporterPlus” to send them to Mocha Pro.

These masks begin to warp horribly in Mocha Pro and are completely unusable. I believe that this is due to the fact that when auto-tracing a mask in AE, many additional points are created throughout the entire animation interval. But is it possible, perhaps, to put a substrate under these masks and align them in this way, tracking the mask on the video with contrasting shapes?

I hope I’m writing clearly, because if not, I can record a video.

Are you trying to track 2D flat shaded animated shapes with no texture? I am trying to understand the goal. If you’re trying to track shapes with no texture, that’s why the process isn’t working for you. Mocha needs texture to track.

Can you show me a video of what you are trying to do? I am having a hard time visualizing it.

The thing is, Mocha Pro is the only tool that allows you to output animated masks to Premiere Pro from After Effects, so I’m trying to find a way to use this to my advantage (masks in Premiere Pro are categorically inconvenient to use, unlike masks in After Effects). Here’s a video showing how the mask behaves after auto-trace in After Effects (it gets distorted when animated) - - YouTube.

BUT! This only happens when the mask is created with the autotrace tool in After Effects and the number of points changes during its movement. If you create a mask originally, without using shapes and auto-tracing, this will not happen to it and its animation and curves will be perfect. So I wondered: how can I fix the distortion of masks that happens when exporting to Mocha Pro, if the mask changes the number of points during movement? Thought that maybe you could carpet pad it and “bind” the mask to it, but even if that’s possible, I don’t know how to do it.

I could add a texture to such a shape, it doesn’t matter, because ultimately I need the mask itself to export to Premiere Pro. But I thought that maybe by using a backing from a contrasting footage with the same mask in 2D, Mocha Pro could understand where the boundaries of objects are and wouldn’t break the masks.

Why wouldn’t you just do this kind of work in AE and Dynamically link it into Premiere? Also, you can just hand animate shapes as well. Mocha doesn’t have this kind of autotrace frame by frame, though we can “snap” over time with manual keyframing… and if Mocha did have autotrace like AE, it would still have the limitations of the AE tool, where it could only trace the pixels it can see.

I think you might have better results hand animating shapes in Mocha Pro or AE.

Because then it is not a native export and cannot be saved as a Premiere Pro preset. In other words, this approach will only work for the developer of the project, but not for the end client who will use the project (I just create ready-made projects for Premiere Pro, which do not require After Effects)

Thank you so much for the explanations! Now I understand that it is impossible. However, since Mocha, so far, is the only application that can pass masks from AE to PR natively, I will use this feature. And if so, I can assume that it is possible to create a separate tool that could also export masks, but directly from AE… though, I’m not a programmer… but that’s about it :slight_smile:


Ah! Now I understand. Let me poke someone else on my team about this because I think actually someone knows way more about doing this sort of thing in premiere than I do.

Also… We might have a way to import AE masks into Mocha with a script, and export Premiere shapes out of Mocha, but it might be obsolete and I need to check on the feasibility.

Yes, of course. But there is only one problem here: Premiere Pro by default cannot accept masks directly from After Effects, and to be more precise - After Effects has no built-in functionality to export masks directly to Premiere Pro. If you add a link in the form of Mocha Pro 2021 to this chain, there is functionality for exporting in the form of the “Export Shape Data” button, but Mocha Pro distorts masks if points are added to them during animation, and this is the only problem. I tried to find a programmer who could write a plugin to directly interact AEtoPR with the same “magic button” Export Shape Data, but could not find a specialist who understands this issue, unfortunately.

Aren’t you talking about “MochaImportPlus”?

Yes, but also I’m talking about python scripts. I’ll need time to research this.

1 Like

О! If you have such a script, I would like to be able to get it. :star_struck: Even if it’s outdated, you can still roll back to older versions of Adobe (and maybe older versions of Mocha?).

And here’s how well masks are exported without changing the number of points through Mocha: - YouTube

Sorry to bother you. I just brought up the issue of mask exporting with an Adobe specialist and we started talking about masks in Mocha. Please tell me, do you somehow convert or convert AE masks within Mocha Pro to be understood by Premiere Pro?

We can’t trace the luma mattes. But… we can roundtrip shapes.

OK, so your BEST workflow I think is going to be using MochaImport+ to get AE shapes INTO Mocha and then Mocha to get shapes into Premiere by exporting the Shape Data and Pasting it in on the Opacity parameter in the Effects Controls in Premiere.

That’s the direction I can point you in.

Sorry, I don’t really know what you mean by “But…we can roundtrip shapes”.

Right now my workflow looks like this:

  1. Creating shapes in After Effects and animating them.
  2. Auto-tracing shapes and getting masks from them.
  3. Exporting masks into Mocha Pro using MochaImport+

I got stuck here because the masks I get from autotracing in AE get distorted in Mocha Pro and are very improperly rendered, so it doesn’t make sense to export them to Premiere Pro (though it’s possible).

I described this process above and showed it in a video.

I’m not sure, but maybe you mean exporting not masks but shapes in Mocha Pro, but I’m not sure that such exporting is possible.

P.S. I am a Russian speaker and sometimes use a translator to understand the point, but in this case I didn’t really understand the process you described and how it differs from the one I wrote above.

Use AE Masks instead of shapes… animate those.
Take those masks into Mocha with MochaImport.
Use Mocha to get the masks into Premiere.

1 Like

OR, my collegue Ben Brownlee found this, It is the RD Shapes to Masks script:

1 Like