Can't get Mocha to import proper shape data to AE

AE CC 2017, mocha Pro 5.5.1, Mac OS Sierra 10.12.3

I’ve read the FAQ, watched multiple tutorials and still stumped. I must be missing a fundamental concept in mocha or AE, and I am admittedly new to more advanced concepts in both. I have tried doing this with cut & paste workflow in mocha AE as well as mocha Pro and nothing has worked.

I have footage that where I am replacing the head of a running individual with a Photoshop 2D image. Portions of the footage have foreground obstructions so I need to mask those and knock out appropriate portions of the 2D image over the life of the clip. The obstructions are also moving and intersect the 2D image for 20 frames or so in different portions of the clip. For the purposes of trying to solve this I have just concentrated on one area, a thrown flag that passes in front of the video area I am superimposing with the 2D graphic.

Tracking works great. I create a track for the head, including a tracking cut out layer track for the thrown flag so that it doesn’t interfere with my main track. I export the tracking for the head by cut & paste, link to my null linked to my 2D image, and it works as advertised. But no joy when I create shapes that I will use as a mask for knockouts for the flag obstruction. Reload my footage layer in mocha, I move to a starting frame and create an X-spline around flag, then track forward, adjusting spline position and shape (the flag changes shape as it flutters) along the way. Then I stop when safely out of the area of obstruction, set in and out points as relevant. I export mocha AE shape data to clipboard, using either visible layers or selected layer - simple because there is just the one shape.

In AE, playhead on first frame of comp, I create my solid above the 2D image layer. Everything goes black as expected. I move the playhead to the first frame for my flag shape. I then paste the shape data into the solid layer, and see my “flag shape” when I twirl down. I trim back the solid to the flag in and out points. Everything under the solid remains the solid color, which seems weird. When I look at the parameters, I see opacity is set to 0%. I manually set this to 100% and now see the underlying video clips, the 2D image, and my starting shape. So OK, I set the image layer to use the solid layer as an alpha inverted track matte. Play through the clip, nothing happens, 2D image obscures the flag. So I undo setting the track matte, and the shape reappears on screen. Hit play, and I see that the shape never moves, never changes shape, to match what I had done in mocha.

When I look at the actual shape data, it looks like it contains values changing over time, but I am a n00b so can’t tell. I should also note that I started first with a round trip clip from premiere to AE to mocha and back. I thought maybe this was an offset issue, so that I started using in an out points in the mocha import window (which caused other issues with “cannot set frame because”), then I just started with AE and importing the footage direct instead of direct link from Premiere, and finally after much back and forth I just trimmed the clip to the i/o I wanted and created an image sequence to eliminate potential issues and started the process from scratch with AE to mocha. And still no joy. Also note that I have ensured that the sizes (1280x720) and frame rates (29.97 for video, 30 for the image sequence) are the same between mocha and AE.

There may be a different workflow with the mocha plugin, but I would like to get the cut & paste but right first in mocha pro in case all I ever have to work with is mocha AE. Please point out my misconceptions or bonehead actions and save me from myself so that I can at least have a joyful weekend making this work.

And just to emphasize, my last try at this included trimming my longer clip to just the portion I am using, then converting that to an image sequence. So I end up with 295 frames at 30fps in both AE and mocha. For my shape layer in mocha, I have the in point and out points set to bound where the foreground obstruction is, and I output the shape data just for that layer, then paste at the same starting frame in AE

Definitely seems to be an issue with the behavior of in and out points on layers and my assumptions about them. I had thought if I set a layer in and out point, I would then paste the shape keyframes from the clipboard on my solid at that frame in the AE comp. But that isn’t working for me. How am I supposed to do this properly so I don’t have to paste keyframes that only i/o at the start and end of the whole clip?

For giggles I went in and tracked a shape manually on the clip segment, setting keyframes to move it off screen when not needed and set keyframes at start and end. So keyframes with whole clip and leaving the full clip i/o points for the layer. This places the shape as expected. But I’d love to know how to do this properly.

Shape data pads frames to the start of the clip if you’ve have your project in/out range set to full, otherwise it will start from the exact project in point so you can paste to the shape playhead position like you do with tracking data.

What are your project and layer in/out points set to?
Are you using the native spline creation, or the shape effect?

My work flow was as described above; I was pasting the shape data directly into a solid to mask what I needed. However, I changed that to pasting in as a mocha mask and the shape and keyframes appear as advertised with proper offset. So the tutorials I watched are likely deprecated and did me wrong. Thanks for the help.

in the tutorials the tracking shot is usually the length of the composition, which simplifies things. it will cause confusion if you sent a part of a clip to mocha (that you trimmed the composition to for example), because as Martin said: it will paste at the beginning of the clip. even if it’s not visible in the timeline.

try this:

  1. export shape data from Mocha
  2. in Ae in your composition click twice on the footage (your video track) layer so it will open in the layer window where you will see the length of all the clip
  3. press home to go to the starting in point of the whole clip in the layer window
  4. in the timeline panel, click on the layer you want to paste the information to (don’t set the playhead anywhere, it needs to stay where it is)
  5. click paste
  6. success?

One note, the Mocha Pro plug-in certainly an improvement to the Mocha AE CC workflow, since you can apply it directly to a clip in Premiere OR AE and it uses the projects settings and the host media engine. Also Mocha Pro 5 is much faster!

Thanks. I worked through my issues back in April. Really the issue is tied to Adobe Dynamic Link workflow, and how Mocha inherently understands the world of frames, subclipping, and what frame 0 is. In the world of Premiere and AE working with subclips is de rigeur, and Mocha lives in an absolute world where all starts at frame 0 and ends at last frame. So offset is inevitable when the worlds collide. Exacerbated when you also set new start and end frames for tracking and shapes in the Mocha interface. Trying to find where Mocha has decided to stick the keyframes in AE can be a real pain.

The Mocha plugin basically masks much of this to make life easier, but there are still challenges. And if you don’t reach the fundamental understanding of how Mocha looks at the world, you will run into problems with the plugin as well. And there is no Mocha AE plugin, so learning how to do things right without the plugin is useful because you may find yourself in a situation where you can’t.

I love the Plugin. It is definitely a game changer and I love the interface. Be aware that I have also run into issues trying to switch between projects created in standalone and those in plugin (loading what was saved in one into the other) so sticking with one versus the other is also important. So consistency is important across the board.