idiot gl blending question

lyallmarcus's icon

So I've got two qt's or tiffs with alpha channels. And I want to use the alpha channels as clipping maps for videoplanes.

So I have transparent areas of one video plane that show the the other videoplane or background playing behind it.

Simple. Yes?

I know I have to use the blend_mode attribute but I'm obviously missing something.

Can someone point out the obvious to me?

The patch is setup to accept two tiffs or qts with alpha channels.

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


Joshua Kit Clayton's icon

Your patch works for me with depth_enable 0. Note that we don't want
to clip based on depth testing (as demonstrated in the
jit.gl.videoplane-xfade.pat example). Using depth testing (which is
on by default) will only render one video plane in your patch since
the video planes are both at the same distance from the camera.

The other thing worth noting is that right to left order is not
maintained necessarily with send recieve, so the other possibility
is that your left movie (which looks like the one you are assuming to
have alpha) renders first, and that the right movie renders second
(with no alpha, overlaying over the image). You will want to use
either two instances of send/receive (as demonstrated in
jit.gl.videoplane-example.pat) or use one receive with trigger to
force sequencing.

Lastly, you'll want to turn automatic off as demonstrated in as
demonstrated in jit.gl.videoplane-example.pat.

-Joshua