Jump to: Board index » General » Fusion

Trick to 2 masks on one clip

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

MarnMxxx

  • Posts: 252
  • Joined: Sat Dec 22, 2018 6:45 am
  • Real Name: Marn Morris

Trick to 2 masks on one clip

PostThu Jun 06, 2019 5:39 pm

Can't get 2 masks onto one simple clip. Seems like it should be simple but there is absolutely nothing simple in Fusion.

2 Masks, one clip. What's the hidden secret for this easiest of things in After Effects.
USING:
iMac 2020
OS 13.5.1
3.8 GHz 8-core Intel Core i7
64GB 2667 MHz DDR4 RAM
AMD Radeon Pro 5700 XT 16GB
12TB RAID
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Trick to 2 masks on one clip

PostThu Jun 06, 2019 6:06 pm

Can you show what you did so far?

You connect one mask with the other (mask output into mask input) and use both to mask the clip...
Easy as many things in fusion
Offline

MarnMxxx

  • Posts: 252
  • Joined: Sat Dec 22, 2018 6:45 am
  • Real Name: Marn Morris

Re: Trick to 2 masks on one clip

PostThu Jun 06, 2019 6:54 pm

Here's what you said to do.
Just trying to punch 2 holes into clip to show through to another clip below; seems simple but.
Attachments
MasksIssue.jpg
MasksIssue.jpg (312.98 KiB) Viewed 7226 times
Offline

Sander de Regt

  • Posts: 3558
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Trick to 2 masks on one clip

PostThu Jun 06, 2019 8:21 pm

You're almost there.
Personally I'd never mask a loader/mediain, but use a matte control tool after this.
One way to do it the way you're trying to do is by starting with a rectangle mask that covers the whole frame and then use two ellipse masks set to substract to cut the holes and you should be good to go.

*edit* never mind - this is not the best suggestion, see below.
Last edited by Sander de Regt on Thu Jun 06, 2019 8:54 pm, edited 1 time in total.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Hendrik Proosa

  • Posts: 3029
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Trick to 2 masks on one clip

PostThu Jun 06, 2019 8:40 pm

Why doesn't op's current setup work though? What is the logic of it not working?
I do stuff.
Offline

Sander de Regt

  • Posts: 3558
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Trick to 2 masks on one clip

PostThu Jun 06, 2019 8:53 pm

You know what? I just found out you don't need the first rectangle. Just use two ellipses like the OP does.
But: the 2nd one needs to be set to subtract, and I think this is not the case in the OPs original flow.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Bryan Ray

  • Posts: 2484
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Trick to 2 masks on one clip

PostThu Jun 06, 2019 9:13 pm

Hendrik Proosa wrote:Why doesn't op's current setup work though? What is the logic of it not working?


One of the Ellipses is Inverted, and the second is likely set to Merge. So they're both there, but the second one is simply covered by the first.

Another way to do it would be to leave both Ellipses in their normal positive mode, then add a Bitmap tool between the second Ellipse and the footage and set that to invert instead. Then you'd have two holes in the solid mask.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

MarnMxxx

  • Posts: 252
  • Joined: Sat Dec 22, 2018 6:45 am
  • Real Name: Marn Morris

Re: Trick to 2 masks on one clip

PostFri Jun 07, 2019 5:11 pm

You connect one mask with the other (mask output into mask input) and use both to mask the clip...
Easy as many things in fusion


Lots of folks saying how easy Fusion actually is.

Sander de Regt actually gave the easy step of just setting the second Ellipse to subtract. That worked and yes, turns out to be easy. The part that's not easy is figuring this out. Look at the other posts trying to come up with some way to do it. My first ellipse is set at invert and so was the 2nd. I turned off invert on the 2nd ellipse and set to subtract which worked great.

I'll say it again. Fusion is anything but easy. Trying to figure out a way to accomplish simple things is proving very difficult.

Thanks everyone for all the post and I'll be back very soon I'm sure looking to solve something very simple.
USING:
iMac 2020
OS 13.5.1
3.8 GHz 8-core Intel Core i7
64GB 2667 MHz DDR4 RAM
AMD Radeon Pro 5700 XT 16GB
12TB RAID
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: Trick to 2 masks on one clip

PostFri Jun 07, 2019 8:38 pm

your inital post didnt cover the part you want a inverted mask, just two masks together to one loader/mediaIn.

IMO node based compositing needs the artist more to understand what (s)he is doing. if you look node for node you can see your result and decide what to do.

if you looked at your first mask then you see a big white space with a tiny little black hole. how would you do a second hole if it was a sheet of paper? you need to cut it out (=substract) something from it.


another way would be to add both mask together and apply the "Invert mask" on the loader/mediaIn, maybe this is more like you would do it in other software.
Offline

MarnMxxx

  • Posts: 252
  • Joined: Sat Dec 22, 2018 6:45 am
  • Real Name: Marn Morris

Re: Trick to 2 masks on one clip

PostFri Jun 14, 2019 3:54 pm

michael vorberg wrote:another way would be to add both mask together and apply the "Invert mask" on the loader/mediaIn, maybe this is more like you would do it in other software.


Adding both masks together was what I was trying in the first place. Whats the trick to that?

Here's how logically it should have gone:
I have a mediaIn. I wanted two holes punched in.
Add a ellipse mask. It makes a circle with everything around it cut out. The opposite of what I want, so I invert the ellipse mask and looky there it punches my hole just like I want.
I needed a second hole so I added a second ellipse and like the first one which worked, I wanted the transparent part on the inside not the outside so I clicked invert. Which worked for the first but not the 2nd. Maybe it would work if I could have one mask node with multiple masks added to it but that doesn't seem to work. Long story short, what works for one mask doesn't work for the next. That is the definition of non-intuitive.
Offline
User avatar

Bryan Ray

  • Posts: 2484
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Trick to 2 masks on one clip

PostFri Jun 14, 2019 6:16 pm

Allow me to repeat what I said above:

Another way to do it would be to leave both Ellipses in their normal positive mode, then add a Bitmap tool between the second Ellipse and the footage and set that to invert instead. Then you'd have two holes in the solid mask.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

MarnMxxx

  • Posts: 252
  • Joined: Sat Dec 22, 2018 6:45 am
  • Real Name: Marn Morris

Re: Trick to 2 masks on one clip

PostSat Jun 15, 2019 12:31 am

Didn't work for me.
USING:
iMac 2020
OS 13.5.1
3.8 GHz 8-core Intel Core i7
64GB 2667 MHz DDR4 RAM
AMD Radeon Pro 5700 XT 16GB
12TB RAID
Offline
User avatar

Bryan Ray

  • Posts: 2484
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Trick to 2 masks on one clip

PostSat Jun 15, 2019 4:24 am

Perhaps I didn't explain well. Paste this into your Flow:

Code: Select all
{
   Tools = ordered() {
      Ellipse1 = EllipseMask {
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.641104294478528, 0.5 }, },
            Width = Input { Value = 0.15, },
            Height = Input { Value = 0.15, },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 82.5 } },
      },
      Ellipse2 = EllipseMask {
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.323619631901841, 0.5 }, },
            Width = Input { Value = 0.15, },
            Height = Input { Value = 0.15, },
            EffectMask = Input {
               SourceOp = "Ellipse1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 550, 82.5 } },
      },
      Bitmap1 = BitmapMask {
         Inputs = {
            Invert = Input { Value = 1, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Image = Input {
               SourceOp = "Ellipse2",
               Source = "Mask",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 82.5 } },
      },
      Background1 = Background {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 0.594, },
            EffectMask = Input {
               SourceOp = "Bitmap1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 880, 82.5 } },
      }
   }
}
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Frank Engel

  • Posts: 919
  • Joined: Thu May 17, 2018 11:09 pm
  • Real Name: Frank Engel

Re: Trick to 2 masks on one clip

PostTue Jun 18, 2019 1:10 pm

MarnMxxx wrote:Adding both masks together was what I was trying in the first place. Whats the trick to that?


Not quite. In Fusion, a mask indicates what to include, not what to exclude.

When you "add" masks together, it adds to what is included. If you had two separate "holes" in the two masks, then each mask included everything that was not the hole. Adding them together would mean including everything that was included by either one, so each of the masks would have covered up the hole from the other one.
Offline

Hendrik Proosa

  • Posts: 3029
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Trick to 2 masks on one clip

PostTue Jun 18, 2019 3:32 pm

A simple analogue: you cut a hole into piece of paper. And you cut a hole in different place into another piece of paper. Put one paper over another. Do you see through either of the holes? Nope. Paper here is the mask (value 1.0), hole is where mask value is zero.
I do stuff.
Offline

Chris Hiles

  • Posts: 23
  • Joined: Wed Apr 22, 2020 10:12 pm
  • Location: Germany
  • Real Name: Chris Hiles

Re: Trick to 2 masks on one clip

PostMon Dec 21, 2020 1:46 pm

I do agree that Fusion is anything but intuitive for relative newcomers to this kind of work.
I was looking for a similar solution and came across this thread. I didn't fully understand everything but after a little trial and error (using the information here) it is actually really simple, so thanks to everyone for contributing.
Just in case anyone is looking for an easy way, here's how it can be easily achieved with (I think!) the fewest steps. (I'm only writing this to simplify it for anyone at my level, which is definitely not expert!)
Just for clarity, here was my issue:
I have a livestream clip recording of an online workout with 7 other people. My screen is horizontally flipped, meaning the clock behind me and the "You" (which indicates my screen) is mirrored.
I have to copy the clip, add it to the track above, crop, position and horizontally flip it so it is the right way around.
As I have

So, I have Rectangle 1 going into Rectangle2 which in turn goes into Media in, which is my clip.
Rectangle 1 is inverted so that the "You" shows through (on the track below).
Rectangle2 is set to "Subtract" so that the inverted "ouY" is blocked from showing. This appears at the bottom of my screen from Google Meet, which means that when I horizontally flip the clip, the "You" is also flipped.
The actual clicks to achieve this was very few, but that was only after I read this thread and followed the advice.
Hope this helps anyone trying to achieve a similar result.
DR 16 Studio 16.2.1.017
MBPro (Big Sur)- 2.4 GHz 8-Core Intel i9, 32 GB 2667 MHz DDR4
AMD Radeon Pro 5500M 8 GB, Intel UHD Graphics 630 1536 MB

PC - Intel Core i9 9900K 8x 3.6GHz, 32GB 3000MHz DDR4,
GTX 1060 6GB Palit StormX Graphics
Eos 5D mk3
GP Hero 8
Offline

Sander de Regt

  • Posts: 3558
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Trick to 2 masks on one clip

PostMon Dec 21, 2020 1:54 pm

Chris Hiles wrote:I have to copy the clip, add it to the track above, crop, position and horizontally flip it so it is the right way around.


Your method definitely works, but if you're using the same clip this isn't even necessary.

You can just add a merge tool after your MediaIn and drag another pipe from the MediaIn to the green arrow of the merge and do the cropping/positoning/flipping etc in that second pipe.

Depending on the complexity of the transformations, you can even do this straight in the Merge node (which contains a flipping option as well) but you can also crop/flip/transform with seperate tools inline from the MediaIn to the green arrow of the merge.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

wfolta

  • Posts: 625
  • Joined: Fri May 15, 2020 1:12 pm
  • Real Name: Wayne Folta

Re: Trick to 2 masks on one clip

PostMon Dec 21, 2020 6:59 pm

MarnMxxx wrote:
You connect one mask with the other (mask output into mask input) and use both to mask the clip...
Easy as many things in fusion

I'll say it again. Fusion is anything but easy. Trying to figure out a way to accomplish simple things is proving very difficult.

It's not that it's not easy, it's that Adobe-ified instincts, warped shaped over many years lead us down the wrong path.
Resolve Studio 17 latest, Fusion Studio 17 latest, macOS Big Sur latest, MacBook Pro 2020 64GB RAM and Radeon Pro 5600M 8GB VRAM
Offline

Kel Philm

  • Posts: 607
  • Joined: Sat Nov 19, 2016 6:21 am

Re: Trick to 2 masks on one clip

PostMon Dec 21, 2020 9:32 pm

Fusion can be a little tricky at times, sometimes things aren't as intuitive as we'd like. But Fusion is designed that way to provide absolute flexibility, there is very little you cannot achieve in a node based compositor and as complexity of your Comp increases it really becomes beneficial. Something like AE becomes a nightmare as complexity increases, but it is easier to learn.

Sander - I noticed you don't like masking the input to a Loader? Just wondering why? I often do this as I figure the Loader will require less cache memory/processing than using a matte node.

Return to Fusion

Who is online

Users browsing this forum: Bing [Bot] and 20 guests