Matter Repair problem


I’ve been using matte repair for blending a foreground talent’s face profile with my replacement background and it looks really seamless, except now I have one section where I actually need to “cheat” the face position a bit to the right (+X) so I’ve put a transform node after the matte repair, but now I’m getting a very noticeable dark/black border around the talent’s face at the roto edge, which goes away when I turn off the matte repair node, but I’m not sure what’s causing the dark edge to show up when changing the +X on the transform node of the foreground talent. I have the roto exactly on the edge with no blur or offset and it seems that any blur/offset adjustments I make on the matte repair or roto, reveals more less of the original clip, but unfortunately the dark edge remains.

Thanks for any help on this :slight_smile:

Do you need to move matte repair to after the transform in the node tree?

Yes that’s correct. The talent’s head profile is in position A in clip A, but then I cut to a closeup shot clip B, which is supposed to be continuous dialogue, except I need to transform the head position in clip B to match the X position of where it was in clip A.

I’m noticing there is some type of (unwanted) compounding effect with using Matte Repair on 3 elements. Talent 1 is the one that has the X transform and the forehead with the dark outline on the roto is in the screenshots

Image 1: Talent 1 comp’d with BG
Screen Shot 2022-02-16 at 6.04.50 PM

Image 2: Talent 1 comp’d with Talent 2 then comp’d with BG
Screen Shot 2022-02-16 at 6.04.58 PM

Image 3: Talent 1 comp’d with Talent 2 then comp’d with Wall, then comp’d with BG. This is the final comp I’m trying to do, but it has the darkest outline.
Screen Shot 2022-02-16 at 6.05.15 PM

I feel like maybe I need to rephrase this. Have you tried moving the matte repair node to after the transform in the node tree?

Ah ok, I’ll try moving the matte repair to after and let you know, thanks!

Hi Mary,
Still getting the same dark outline problem even when transform comes before matte repair. In the sample below, it still happens as soon as I have the multiple matte repairs converging in the final comp, but if I have just the single matte repair without the other matte repairs from the additional composited element, the comp is CLEAN, no dark outline.

Transform first with multiple matte repairs composited

Transform first with ONLY one matte repair on Talent 1

It’s hard to give a proper suggestion without seeing your complete tree and having the actual source files.

Have you tried using the Alpha Composite node to combine the various Matte Repair nodes, add a Switch Matte node to insert that combined alpha into the image it is attached to and then do one Composite?

Hi Marco,

I’d like to give this a try, but could you please clarify the part about using a “Switch Matte” node? I’m not clear on what exactly is suppose to plug into what. These are the elements that are getting combined. Thanks for some additional guidance and clarity.

I have my original clip, and from that clip I’ve branched off to create 4 roto’d elements to be recombined:
From foreground to background order

  1. Talent 1 roto with tranform,
  2. Talent 2 roto
  3. Wall and Window Frame roto
  4. Window Glass roto (with opacity adjustment)

All those elements need to be recombined in that order and then I’m adding in a cityscape blurred background to fill in the window

The Switch Matte node simply takes the alpha from one image and combines it with the RGB channels of another image. If you are using multiple Roto nodes off the same source, you could combine the alpha from all 4 Roto nodes with Alpha Composite, plug the original source into the left output of the Switch Matte node and the output of the Alpha Composite into the right input of the Switch Matte node. This combines the alpha from all 4 Roto nodes with the original source. This may or may not be appropriate for what you are doing. I originally thought some of your black edges were a pre-multiplication issue resulting from multiple comps, but it is really hard to tell what is going on from just your screen shots. My thought was that one composite may solve the problem.

Hi Marco,

I’ve attached a session showing the dark outline where talent 1’s forehead passes over the blurred out background light. There is only 1 frame of the clip, Frame 407. I sent it via wetransfer because I couldn’t figure out how to shrink the session to Frame 407 without the roto getting screwed up. Thanks for any help on this :slight_smile:

The Node A tree shows the desired NO dark outline version
Screen Shot 2022-02-23 at 10.23.37 AM

The Node B tree shows my actual full comp with matte repairs giving the Dark outline
Screen Shot 2022-02-23 at 10.21.47 AM

The Node C tree is the one using the alpha matte but it doesn’t look like it’s comping correctly because the Node C just shows the original clip.
Screen Shot 2022-02-23 at 10.43.51 AM

The black line was occurring because you extracted the woman, moved and comped the edge of her face over a dark portion of the background, and then used that as result and the alpha to later comp with. I have attached a version of the project with the way I would do this.
matte repair outline problem - frame (2.7 MB)

Hi Marco, thanks for the solution, the final comp looks perfect! Could you please elaborate on what the Swap Channel, Alpha Composite (instead of just a regular Composite) and Switch Matte are doing together, in order to produce the final comp result?

Also, could you please let me know what you did in order to shrink the session version file size you sent back to me?

Thanks for all your help!!! :slight_smile:

You can remove the Swap Channels node. I had it there when I was experimenting and forgot to remove it. The Alpha Composite subtracts the Window Roto from the Wall Roto and then uses Switch Matte to combine that alpha result with the background image. The Composite City Lights nodes then comps the lights only in the area of the window. I made the project smaller by removing the Paint and Backup folders within the project folder.

Ah ok thanks Marco! It’s making sense to me now. When you add additional inputs to the Alpha Composite, inputs 3,4,5, are they all also just subtracting (or whatever blend mode is picked) from Input 1? Thanks!!

Thanks for the file size reduction tip as well!


1 Like

Hi Marco,

I kind of simplified the version of the session I sent you, because in my actual full session I was comping talent 1, talent 2 and the wall together to then pass through a light wrap node, which then got comp’d over the blurred lights background, using the blurred light background as the light wrap source. With the session you sent me, I think I would have to actually use three copies of a Light Wrap node (with identical settings), one on talent 1, one on talent 2 and one the wall is that correct, instead of being able to use a single Light wrap node, is that correct? Or is there another way I could put a single Light wrap node in the session version you sent me? Thanks again for your help.

I removed your project from my machine so can’t check it. You could conceivably use one Light Wrap as long as the accumulated alpha that you feed into the Light Wrap looks like you want. Otherwise, you may need multiple Light Wraps.

Hi Marco, I tried funneling everything into a single light wrap, but it ended up giving me the dark edge around talent 1 (Lady), so I ended up putting 3 individuals light wraps onto talent 1, talent 2, and the wall/window outline, using basically the node layout version you sent me back, which looks perfect, no dark edge with the 3 light wrap nodes. For now I’m going to just stick with the 3 light wraps of the same settings, and I’ll send you a simplified version showing the single light wrap dark outline issue, in case you could dive into it when you have chance, to see what/if any way there would be to use a single light wrap with NO dark outline in this type of clip scenario. Thanks again.