problems adding chromakey to movie over jit.gl.videoplane

Mar 7, 2013 at 6:38pm

problems adding chromakey to movie over jit.gl.videoplane

Hi – I’m trying to composite two videoplanes in jitter with chromakey, but I’m getting a stack underflow error:

jit.gl.texture: error disabling transform: GL Error: Stack underflow

I followed the chromakey example in Jitter (#10), and already had a working patch with blending of alpha video and the videoplane, but I can’t get it working with a selectable chromakey. I feel like there must be something small I’m missing. I’ve attached my patch. If anybody knows what I’m doing wrong, I’d love the help.

The first (left) videoplane is pulled in from openFrameworks with syphon

Attachments:
  1. blender.maxpat
#66942
Mar 7, 2013 at 6:59pm

As I’ve been reworking the patch, I’ve also seen this error:

jit.chromakey: doesn't understand "jit_gl_texture"

#240935
Mar 7, 2013 at 8:06pm

hi. the problem is you are trying to use a jitter-matrix operator (jit.chromakey) to operate on gl-textures (the output of syphon is a texture, not a matrix).

the solution is to use a jit.gl.slab object (which can take matrices and textures as input) to perform the chromakey.

here’s a patch to get you started.

– Pasted Max Patch, click to expand. –
#240936
Mar 7, 2013 at 9:20pm

Such a big help Rob, thanks.

#240937
Feb 7, 2014 at 11:47am

this is really a helpful patch, thank you Rob Ramirez. I for some reason foot that the output of syphon is a texture and was making myself crazy. I went ahead and added the syphon part if anyone is interested in this.

– Pasted Max Patch, click to expand. –
#280354

You must be logged in to reply to this topic.