Is it cropping? Is it masking? Halp!

Feb 7, 2009 at 10:29pm

Is it cropping? Is it masking? Halp!

So I’ve RTFM’d and forum searched and there is something my brain is not putting together. My technique might be flawed at the foundation, so bear with me:

I’d like to have two videoplanes on one screen: one live image from a camera, one prerecorded. The same size, one on top of the other. If they are both at full size – all you see is the prerecorded video because it is being rendered on top of the live image from a camera. (it is important to other parts of the project that both images be resizeable and translateable, but the prerecorded video is always on top).

From here, I’d like to be able to crop into the prerecorded video to *reveal* the live footage *below*. No fancy shapes – quadrilateral coming in on all sides is fine.

The closest I’ve gotten is to use jit.lcd to crop away the image but this leaves a black matte around the footage being cropped – the video feed “below it” is not revealed.

Below is an example patch illustrating the two-videoplanes-one-render system I’m using. Any advice would be greatly appreciated. I just can’t seem to get this one.

Best,
-M

– Pasted Max Patch, click to expand. –
#42172
Feb 8, 2009 at 12:38am

plenty of ways to go about this.
you probably want to alphablend the two videos using a matte that you create.

maybe this helps:

http://www.cycling74.com/forums/index.php?t=msg&goto=118861

you can also alphablend on the gpu with a slab.

#150877
Feb 8, 2009 at 4:47am

A font of knowledge as always. Thanks for the tips, I’ll check these out. On first glance these look like exactly what I need.

-M

#150878

You must be logged in to reply to this topic.