Isolate Input Layer in Insert Module

I’m using Mocha Pro in After Effects. Using the insert module, is there a way to just isolate the insert layer without the rest of the frame so that when clicking the render button on the Mocha plugin in AE it shows just the insert layer?

Basically I want to be able to skip the step where I make alpha masks in AE based on the mattes output from Mocha. Can it be done in the insert module or anywhere in mocha?

You should be able to achieve that result in Mocha Pro by selecting the Insert: Cutout option from the Module pop-up in the Module Renders group, then enable the Render checkbox.


Perfecto! Grazie mille!

Actually now there is a black outline around the image. How do I get rid of that?

I’d suggest looking at the premultiply option in the Mocha Insert Module UI - maybe it’s enabled but shouldn’t be?

I’ve tried with both Premultiply on and off, and same result.

Can you confirm that the black border is not in the source that you’re using for the insert? If it’s in the source then you’ll need to crop that out before sending it to Mocha for the insert.

It’s not on the source. I comes up at all times, but most prominently when the motion blur button is on.

source image

with motion blur on

motion blur off

Why does motion blur put this black boarder? I’m having to do a workaround with scale and alpha masks, but it’s costing me a lot of time. It would be great if there was a way to have the cutout layer come in without any extra pixels added in.

Can you send the insert shot to me please? I’d like to take a look at it.

It looks to me like this could be the result of a premultiplication step, which would be added with the motion blur pass. I don’t know if there is a way to control this but I’ll take a look to see if I can find a solution, however, I need to work with the insert shot that you’re working with.

So I found an image with a white border, which I used as an insert in mocha and when I warp transform the insert I can see that Mocha has added an anti-aliased edge to the shot back in the host and I think this is being hit with the motion blur setting which is spreading the AA edge and producing the black border that you’re seeing. At least I think this is what’s happening. I’ll check in with the mocha team to see if this is indeed correct and if so I’ll ask them if they have a solution for you.

Thanks for looking into,.
IGASTT_ep 06_FoAW_sc57_photo 2.psd

@paulsmyers could you please let me know which version number of Mocha Pro you’re running?

Thanks for sending the shot - I’ve repro’d what you’re seeing with that image on my system. Note that it seems that the problematic black edge is only visible when using the Cutout option - if you select the Composite option the result is a clean edge with no black border.

Version 9.5.4 build 15.gc02196055959

Hi Paul,

There is an outstanding Mocha issue (MO-11641) that causes fringing for Insert:Cutout specifically.

There are a couple of workarounds here that may be helpful:

  1. Render with Insert: Composite. Not always ideal, but you still have controllable blending options.
  2. Apply Corner Pin data to the insert instead. This way you can bypass the rendering via Mocha. Obviously, if you are using PowerMesh then it becomes slightly more difficult!
  3. Try using Luminescent Premultiply blend mode on the Insert: cutout. This removes the dark fringing.

So no really good solutions? Any word on that being fixed? Seems like a huge problem that the Render: cutout is basically useless.

In addition to the above, you can also do the following:

  1. Render your insert in the Mocha UI over the entire timeline.
  2. Go to “Export rendered clip”
  3. Choose “Insert: Cutout” from the clip options
  4. Choose a file type that supports alpha (either a TIF or PNG sequence or a ProRes 4444 clip) and export
  5. Import the exported clip to After Effects and make sure to interpret it as premultiplied.

Alternatively, use one of the refine matte effects with the plugin render:

  1. Render insert cutout as normal in the After Effects effect panel
  2. Apply Refine Hard/Soft Matte effect after the insert:cutout to remove the fringing.

Unfortunately, you can’t choose to premultiply an effect in After Effects like you can in other programs so a secondary effect is necessary. We’re looking into the best way to blend this well when motion blur is used. It becomes complicated if there is also alpha in the image which is NOT premultiplied, so we’re still exploring the best solution.

Render as composite, dupe the layer, and render that one as cutout (use a black solid as layer insert), and use it as an alpha matte. No aliasing. Precomp all three layers to do a zDepth pass or fast box blur.

But it’s a processor heavy alternative to the plugin working as advertised.