Implementing Open GL render into a Video Mixer

    Aug 28 2013 | 4:03 pm
    I am trying to implement some Open GL rendering into a live video mixer for a project I am working on. In this example, I am using Andrew Benson's "Scramble" patch from the jitter recipes, and trying to be able to blend it's output with movies using a 3 way video fader. I plan on using different renders in the final patch, but this is just an example. Does anyone have any advice?

    • Aug 28 2013 | 5:40 pm
      Please start by doing "Copy compressed" instead into here. That'll help.
    • Aug 28 2013 | 5:44 pm
      Sorry for the long code. Here's the compressed code:
    • Sep 02 2013 | 7:09 pm
      in order to turn a gl scene into a matrix that can be processed with standard matrix operators like jit.op, you should use
      you've done this in your patch, but you haven't connected the matrix output from gl.asyncread to your jit.op video mixer.
      doing this makes your patch work as expected.
      however, reading back an opengl scene from the GPU to the CPU (which is what gl.asyncread does) is not a very efficient technique. a much better solution is to use for each channel of your video mixer, and overlay the videos onto the 3D scene, controlling there color with the @color attribute.
      make sure you set @depth_enable 0 @blend_enable 1 on your
    • Sep 03 2013 | 11:26 pm
      hi, i have a problem which I believe is similar, if I understand. I am trying to process every colorchannel separatly and then blend them together in the end. however, I end up with a picture that is not very bright and where the colors don't match the original.
      I think there must be a trick with blending everything correctly?
    • Sep 04 2013 | 6:04 pm
      you need to change the blend mode to make this work.
      on each of you, set @blend add.
      you can then adjust the amount using the actual RGB color value for each layer, rather than the alpha value.
    • Sep 06 2013 | 12:07 am
      hey, big thanks for your help, sounds exactly what I was looking for!!
      now, so I added @blend add to each videoplane, but now I can't get the different videoplanes to blend at all... I tried deleting the @layer attribute, then it works again but looks like before. would I have to adjust the RGB color val in a different way than I did until now?
      sorry, I feel quite thick...
    • Sep 06 2013 | 3:28 am
      I am now trying to send the output of two separate video mixers to two separate videoplanes in the same window. I have named all render destinations with the same name. I am not really sure what has gone wrong here...
    • Sep 06 2013 | 5:58 pm
      @Mativa - you need @depth_enable 0 on your videoplanes
      @Jpratcliffe - your patch works as expected for me.
    • Sep 10 2013 | 9:26 pm
      @rob ramirez - still no luck... also, the attribute @blend add doesn't seem to exist, tried @blend_add too but nothing... do you think you could modify my patch and show me how it's done? sorry if this is kind of bold, I am getting desperate...
      ps, maybe it doesn't work because i am still on max5?
    • Sep 10 2013 | 10:17 pm
      @blend is not available on max 5.
      use @blend_mode 1 1 instead