Page 1 of 1

How do you replace a polygon mask with another polygon mask?

PostPosted: Thu Mar 28, 2024 4:20 am
by BMDR User 9201
Fusion beginner here. I'll try to simplify the example as I don't know the technical terms and I've exhausted myself through countless forum searches, YouTube videos, etc. but basically I have a Fusion clip of a person. I made a polygon mask around the person's face and tracked it and that's all good. I have an image of another person and I created a polygon mask around their face and I can't figure out how to replace the 1st polygon mask with the 2nd polygon mask. I don't just want to overlay the 2nd mask over the 1st mask because there are features like hair in the 1st mask that I want to retain to show up over the 2nd mask.

Re: How do you replace a polygon mask with another polygon m

PostPosted: Thu Mar 28, 2024 2:02 pm
by Sander de Regt
Do you want to replace the mask, or do you want to add another mask? I am not sure based on the way the question was formulated. You say you want to keep the hair from the first mask. But this is the mask of another person's face, am I correct? So it sounds like you want to combine the two, not replace them.
If that's the case, you can just put the output of the first mask into the input of the second mask and then use the result from that as your new mask.

Re: How do you replace a polygon mask with another polygon m

PostPosted: Thu Mar 28, 2024 4:13 pm
by BMDR User 9201
My question is not formulated well (sorry).

Maybe this helps? Image


MediaIn1 = video clip of PersonA.
Polygon1 and PersonB = still image of a different person (PersonB) with a mask around their face only.
Polygon2 = mask around PersonA's face.

How do I add/connect Polygon2 into the sequence so that PersonB's face fills the area of the mask in Polygon2?

Re: How do you replace a polygon mask with another polygon m

PostPosted: Fri Mar 29, 2024 10:37 am
by KrunoSmithy
BMDR User 9201 wrote: I can't figure out how to replace the 1st polygon mask with the 2nd polygon mask. I don't just want to overlay the 2nd mask over the 1st mask because there are features like hair in the 1st mask that I want to retain to show up over the 2nd mask.


If you just want to swap the polygon masks it should be pretty straightforward of simply un-connecting or un-hooking the node link of polygon1 that goes into PersonB node, and connecting in its place, polygon2.

Unless I misunderstood what you wanted.

Re: How do you replace a polygon mask with another polygon m

PostPosted: Fri Mar 29, 2024 4:17 pm
by Sander de Regt
If I understand you correctly, you want to replace person A's face with that from person B.
And what you have now is a still of person B that's on top of person A (that's the output of the tracker)
but you want to only have the result of the tracker inside the 'hole' you created with polygon 2.

Without seeing how accurate your roto is, you probably will achieve the result you're looking for by just feeding the output of polygon2 into the blue triangle of the tracker node. Give that a try and see if it does what you're looking for.

Re: How do you replace a polygon mask with another polygon m

PostPosted: Tue Apr 02, 2024 4:14 pm
by BMDR User 9201
Thank you all. The suggestions didn't work but I'm attributing it to me explaining poorly. I'll provide a better screenshot with generic examples when I get time.

Re: How do you replace a polygon mask with another polygon m

PostPosted: Wed Apr 03, 2024 5:48 pm
by xunile
Do you mean something like this?

Re: How do you replace a polygon mask with another polygon m

PostPosted: Thu Apr 04, 2024 8:08 am
by birdseye
You state you have tracked, so there is movement involved in at least one of the faces. Unless the original movement of both faces matches quite closely, including rotation and distance from the camera, you are unlikely to make the swap look convincing. Add in the hair. if it moves over the face and that should be a real nightmare, just sayin'. Matbe it would be better to take the whole head clean off and plonk on the other one.