Forums > Jitter

GL Blending Options on a Videoplane

August 9, 2013 | 2:01 am

Hi All -

I know this is a much-discussed topic – but after reading some of the previous discussions, I’m still a bit confused..

I’ve attached a patch that has two GL sections – one is just a qt.movie into a chromakey slab and the other is an isosurf in a chromakey feedback arrangement.

They are mixed together via an xfade slab.

What I would like is for the isosurf feedback to crisply overlap the background image, without blending and whitening the image.

I realize that another chromakey slab could remove the white background from the feedback channel and impose the video, but this potentially creates different kinds of sloppiness – especially if I decide to change the color of the isosurf or the feedback starts to get heavy.

Is there a better way to do this?


August 9, 2013 | 2:21 am

Hi there, I had the same problem, just use jit.gl.pix. This works on 4 texture layers and keeps the alpha channel data intact.
Just open it up and add the 2 inputs together, add a param object call it crossfade and your done.


August 9, 2013 | 3:35 am

Hmm… I’m not super familiar with the gl.pix object – it seems to have the two inputs added together already and it seems to be using the feedback slab as an alpha mask? Can you show me what you mean?


August 9, 2013 | 12:28 pm

you don’t need to use chromakeying for this.
you simply set the @erase_color attribute of jit.gl.node to 0 0 0 0

then you can overlay the isosurf texture directly onto the background image using to gl.videoplanes with blending enabled.


August 9, 2013 | 6:42 pm

Thanks Rob!

It does seem that the feedback produces a very different outcome in this arrangement, though. Is it possible to gain a similar effect with a chromakey slab?

Throwing one in the effect chain does seem to produce the desired result, initially – but the background image disappears when I go full screen…


August 11, 2013 | 3:54 am

If I use the Fullscreen mode to reset the Chromakey color, it seems to work alright.. Not sure if this is the most efficient way to pull this off.. Any idea why it works this way?


August 12, 2013 | 12:19 pm

Is there a good tutorial on dealing with layering and planes?


August 12, 2013 | 3:24 pm

feedback effects are generally pretty sensitive to rebuilding the context (which is what happens when you go fullscreen).

what are you curious about regarding layering?


August 13, 2013 | 4:08 am

I’m just in over my head, I’m afraid.

Here’s a patch using the layering idea you showed me – but I can’t get it to behave the way I’d like – the top layer seems to be working as an either an alpha mask or a pretty faded layer, rather than a hard superimposition. (Depending on the erase_color)…

I feel a little guilty taking up forum space and your generosity with this – is it possible to contact you for freelance work?


August 13, 2013 | 10:23 am

again, if you want a hard-mix, then why do you need the chromakey?
setting gl.node @erase_color to 0 0 0 0 does exactly this.
when i remove the chromakey slab in your patch, i get this.

granted, since you are using jit.noise as your texture, certain alpha values will be transparent on the individual cube textures. if you don’t want the cubes transparent, jit.pack a 3 plane noise matrix with a 1 plane, all white matrix as the alpha plane (which is the first plane for jitter matrices).

– Pasted Max Patch, click to expand. –

August 13, 2013 | 10:24 am

and no need to feel guilty, this is what the forum is for.


August 13, 2013 | 1:17 pm

Huh…even after removing the chromakey slab, I still get a weird-looking pack, image attached..

As for the chromakey – it just seems to have a very substantially different characteristic than xfade feedback, since it doesn’t lose strength with each reiteration. The xfade is blending a difference between the input image and the feedback reiterations.

Attachments:
  1. abcd

August 17, 2013 | 9:44 pm

Oops – I think I posted that last post on a different account.. still struggling with this issue, though. Is it maybe better dealt with via a specialized slab?


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