multiple matrix layer slowdown


    Mar 28 2006 | 8:02 pm
    Hi there - I'm relatively inexperienced with Jitter, and I was trying to do the following:
    I have 6 different images that I need to move around on a white background. The way I've been doing this is based off Tutorial 16 - rendering the images to a named matrix in the appropriate order. However, I have a .js function that determines the order in which the images need to be layered at any given time. As of now, this function spits out a list that I stick, rather arbitrarily, in a [zl join] just to have somewhere for a metro to bang a jit.qball into it regularly.
    Aside from this difference, I think I've implemented everything pretty much as the tutorial patch has, but I've noticed a big slowdown and chunky reaction times to the instructions for the images to move around. The relevant part of the patch is included below - I haven't included the .js file but hope that this is enough to diagnose the issue...
    Thanks for any help!
    Liam
    max v2;

    • Mar 28 2006 | 10:56 pm
      This will be much faster using several instances of
      jit.gl.videoplane. Trying to decompress and composite 6 videos in
      realtime on the CPU will be relatively slow. Almost always faster on
      the GPU.
      -Joshua
    • Mar 30 2006 | 2:06 am
      Excellent - thanks for that. Definitely snappier.
      I'm onto my next task, which is to figure out how to composite several of those images together (via slab, I was thinking...?) but still be able to move them around the screen individually. I've seen a couple instances in the examples of multiple movies being read into a jit.qt.slab, but I need to get at each image intermediately to position them.
      I've tried this using both matrices and videoplanes - matrices are still slow (and I couldn't figure out how to erase jit.gl.render properly after moving them around), and the videoplanes seem to require the same name as the videoplane that the jit.qt.slab is feeding into...meaning I can't composite them together, but they rather overlay one another.
      Feeling very uncertain that this is the right way to go about it...any help is, as always, greatly appreciated! Thanks!
      Nasty sample patch:
      max v2;
    • Mar 30 2006 | 2:58 pm
      foo is not the name of the jit.gl objects, it's the name of the render
      context. Check out the Jitter tutorials on this subject. Try using a
      videoplane for each QT movie. Your videoplanes will composite if you
      start playing with the blend_mode attribute, e.g., send the following
      to the inlet of a videoplane and play with the number boxes:
      If your patch still isn't doing what you want it to, think about your
      render order. (I like to write it down on a piece of paper.) You want
      to:
      1. erase jit.gl.render
      2. Do Stuff, e.g., draw videoplanes with movies on them, move them
      around -- again, check out the GL tutorials to learn how this works --
      6. bang jit.gl.render to write the whole thing out to the render context
      best,
      dan
      --
      ***
      http://danwinckler.com
      http://share.dj
    • Mar 30 2006 | 3:55 pm
      Thanks Dan - I think I've found a solution, thanks to your nudge towards playing with the blend_mode attribute. This obviates the need for the jit.qt.slab objects in my simple case.
      I think there were several other issues in trying to use a videoplane before and after the jit.qt.slab (bad). I was indeed using a videoplane for each movie, as you suggested, but this setup of before and after the slabs was definitely my stumbling block.
      Anyhow, thanks for the tip!
      Liam