Jit.gl.videoplane layers using transparent alpha

Sep 18, 2010 at 12:48am

Jit.gl.videoplane layers using transparent alpha

Hello,

I’m trying to have my patch render two side by side videos which are rendered over a white layer. The idea is that when the video matrices are in their normal position they cover the white layer. But sometimes we move them vertically – then you should see white above or below them.

I figured I could do this with alpha-blending in opengl, and I even thought I found the answer on this forum, but it’s not working consistently for me. Although it seems to always work in a floating window, when I go to fullscreen the results are inconsistent. Sometimes it works; other times the whole frame renders white.
I’ve played around with different depth_enable and blend_enable settings, but it doesn’t seem to work. I haven’t worked all that much with the jit.gl stuff, so it’s likely I’m missing something basic or documented elsewhere, but I can’t seem to find it. Render portion of patch is attached – thanks for any tips!

Attachments:
  1. render.maxpat
#52351
Sep 18, 2010 at 1:11am

for managing layers, use the @layer attribute for your videoplanes and make sure that your white layer is behind the videos.

alternately, check out the @erase_color attribute of jit.gl.render. You could just set this to erase_color 1. 1. 1. 1. to achieve the white background.

-Ben

#188146
Sep 19, 2010 at 12:04am

Aha… thanks! @layer seems to be the thing I was missing… so far so good!

#188147

You must be logged in to reply to this topic.