Is it cropping? Is it masking? Halp!

mikerugnetta's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon

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

you can also alphablend on the gpu with a slab.

mikerugnetta's icon

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