Forums > MaxMSP

Moving mask

August 20, 2011 | 9:51 am

First of all, I’m almost a total noob in Max.

I want to make a black moving rectangle to cover the screen, moving from right to left to use it as a mask to cut an area of a video but haven’t figured out how to.

Any advice on it?

Thanks!


August 23, 2011 | 12:03 pm

Two ways I’ve used before (and I’m not saying they are the best but they suited my needs) was to use a a jit.lcd to draw a mask onto an image that would be shown on a jit.gl.videoplane – this allows both image and mask to exist on the same plane so they can be moved about in 3d space. Alternatively if you want the image and mask to be seperate (i.e. the mask on a plane in front of the image so both can move in 3d space independently) you could draw a mask into a jit.gl.sketch. Look at the help for both of these and they should get you started.

Garrett


August 23, 2011 | 5:02 pm

Hi
here’s a REAL basic way:

– Pasted Max Patch, click to expand. –

Brendan


September 5, 2011 | 1:25 am

@Garret: I’m not getting how to make what you say… could you include an example patch, please? Thanks!

@n00b_meister: I don’t get a word of what you’re saying…

Really, I’m a novice in Max and probably I’m just trying to do something far from my abilities but I guess somehow I’ll do progress and get it working… somehow…

Well, here’s what I have so far:

– Pasted Max Patch, click to expand. –

September 5, 2011 | 8:16 am

In view of keeping the forum tidy, here’s what I posted on your other thread which is what I think Garrett is talking about in that you can replace jit.gl.gridshape with jit.gl.sketch and draw your own mask instead of using a shape. GL stuff can be tricky to get your head round for a novice so check out the tutorials if you are having trouble.

– Pasted Max Patch, click to expand. –

September 5, 2011 | 10:07 am

Thanks again, Luke… it’ve certainly been of much help.


May 6, 2012 | 1:47 am

Hi all,

Is it possible to do the same but instead mask a person who moves around the plane?

Luis Marques


May 10, 2012 | 7:06 pm

If you want to use a video of a person as a mask then here’s one way to do that using the ‘binary-man.mov’ footage attached (stolen from this forum as it makes a good test video for just this sort of thing!). To get this sort of footage you can either shoot people against a blank background (or greenscreen) and do some processing which can be tricky to get right without good conditions, or do something a bit more clever with the Kinect (Zachary Sidess’ tool can help you here: http://cycling74.com/forums/topic.php?id=37285)

Anyway, heres the patch and the mov:

– Pasted Max Patch, click to expand. –
Attachments:
  1. binaryman.mov.zip

May 11, 2012 | 1:40 pm

Yes, this will help, although, what i find more complicated is to define a person silhouette whit precision…

Luis Marques


May 11, 2012 | 2:05 pm

Yes, its a great deal to do with lighting and a good background, and even with Kinect it can be tricky. Good luck!


Viewing 10 posts - 1 through 10 (of 10 total)