Deactivate Mask on Frame Range?

Hi all,

I’m stumbling over a problem that I can’t seem to find an easy solution for. I’m guessing I’m just overlooking a simple option…

I’m currently working on tracking and comp’ing a short video and I had to create a mask layer to mask out part of a chair that should be in front of an object that is comp’ed into the scene. To save time I created only a small number of points for the mask and clipped them to trackers that follow the frame of the chair: So, the mask is now following the chair even through perspective distortion and everything is working great.

That is… everything, except for the fact that the chair only enters the scene at frame 220. So, the trackers are inactive before that frame; unfortunately, however, the mask is not. In fact: The white parts of the mask are now squeezed together in some weird shape along the left edge, because that’s where the trackers are before they become active.

Is there any way to prevent this from happening? Can I fully deactivate the mask (i.e. set to black) between frames 1 and 219? Or can I set up a node in the Compositor that ignores the mask before frame 220?

Any help would be much appreciated. Thanks in advance.
Marcus

You can go into the masking panel and move the mask out of frame on 219. That way it’s still deforming, but it’s not in frame, so who cares? :slight_smile:

Or, you can put a math node set to multiply after the mask node. Set a keyframe on the value of 1 on frame 220, and a value of 0 at frame 219. That will essentially deactivate it.

There might be a different way to achieve what you’re asking, but this is how I do it:

Open up a dope sheet window (and change mode to Mask) while you’re looking at your mask view in the video editor. Key the mask on the frame you want it (220), then back up to 219 and alter the mask so that it doesn’t show up (either move it off the screen, or if it’s the opposite then make it bigger than the screen), and key it there (219). Then when you render with the compositor, it will only show on 220.

edit: damn Hype beat me to it…! lmao

Thank you, both of you. :slight_smile:

I have to say, I’m hesitant to just key the mask out of the frame. I know, nobody’s going to notice, but I would really like to come up with a workflow that’s a bit more elegant. I like the multiply-idea, though. Will definitely try that and report back. Thanks a lot.

By the way: Isn’t this a problem that could turn up pretty frequently? I’m actually surprised that there isn’t any more direct option in the GUI for something like that.

@murrayTORONTO you CAN do that in the mask properties (mask layer panel) window as well!


Well shit! Haha. I guess that’s what he’s looking for. I don’t use it too often so I’ve obviously overlooked that part.

Ha ha, I’ve never needed to kill a mask before. But its nice to know that you can :wink:

Oh, wow, yes, that’s exactly what I was looking for. I have, in the meantime, worked around the problem by setting up a multiply-node as discussed above. But it’s good to know that there indeed is a simpler and more direct way to do this. I will definitely try that…

As to others not needing to kill a mask… Now that we are discussing this, I’m actually wondering, if I’m making things more complicated than they need to be. How comes I’m the first one to bring this up? Shouldn’t I be clipping mask points to trackers? Should I split the movie scene in parts before rendering? A part, where the mask is active and another one, where it’s not? How are others approaching this?

I’ve worked on feature films for 13 years now, and have done rotoscoping on Oscar winning movies, and I can tell you for sure that moving a mask out of the frame when it’s not being used is how 90% of professional compositors work. Not only does that effectively turn it off, but it also moves the unused mask out of the way so it’s not cluttering up the viewport, which can be a serious problem when you’ve got hundreds of little masks all over the place and overlapping.

The main reason to not use this technique is motion blur. If you turn on motion blur for the mask, on those frames where you move it out of frame, the motion blur is going to stretch hugely and create an undesired effect. That’s when I switch to the multiply node method.

It’s certainly easy (and elegant) to animate the render mask layer button, but this is kind of hidden. Not a big deal when it’s your own project and you can remember that’s where you are turning it on and off, but if you are working on a project with many other artists, where sometimes you will take over someone’s shot or they will take over yours, it’s much clearer to have a node in there. It’s easier to see and understand, and the artist won’t be spending an hour looking around for why that mask is magically shutting off.

When you say “clipping” mask points to trackers, I think you mean parent. Yes, if you can help your masking with parenting, go for it. Sometimes it’s useful, sometimes it’s not. It depends on the shot and what you are masking (and what is trackable).

1 Like

Hype is right, the other problem with switching visibility/renderability is that the icon can easily be lost. Especially when its over in the Outliner, where parenting can remove it from sight.