Jit.world / Jit.gl.render - Multiple videos / Multiple errors


    Dec 08 2017 | 8:32 am
    I am having trouble with my patch. In one hand I have few videos that I encapsulated in a patch to select witch one I want, when the video 1 is finished I would like to bang a subpatch that I found here on the forum (really cool, with kinect and multiple objects) and to fade in on my previous video, etc. On one screen, for a projection.
    So how I can do, because my jit.gl.render is in my subpatch for all the things. How I could do the best use of jit.world or/and jit.gl.render ? Am I wrong ?
    Could someone help me with that? Here is the patch...

    • Dec 08 2017 | 8:46 am
      I forget to send the patch, here it is :
    • Dec 11 2017 | 7:32 pm
      hi Marie.
      the first thing to understand is Textures vs Matrices. Textures are processed on the GPU and are generally much faster and more efficient. you output textures from jit.movie with @output_texture 1 (which your patch is doing). However once you output textures, you need to only process using texture objects (jit.gl.slab and jit.gl.pix). In your patch, you are sending the texture output from jit.movie directly into a jit.matrix object. this is bad and will greatly impact your FPS.
      simply removing that jit.matrix will fix improve performance.
      the easiest way to mix two streams of video is with an xfade object. since you want to keep everything on the GPU, you must use a jit.gl xfade. simply use [ jit.gl.pix @gen xfade ] to use a jit.gl.pix based xfader. you can plug the movie output into the left, and the kinect output into the right.
      hope this helps.
    • Dec 11 2017 | 7:43 pm
      to learn more about this stuff, open a Reference Window and search for an article named "GL Texture Output"