alternative to submatrix

    Mar 19 2013 | 10:04 pm
    I am using this patch to subdivide a video content into two projectors (will be more in the future), and I notice that when using submatrix there is a decay in performance. I've searched on the forum and seen a couple of alternatives to submatrix using, but this approach is still very new to my understanding.. and I cannot connect them to the cornerpin keystone patch.
    Can someone advice please? Thanks in advance!!!

    • Mar 19 2013 | 10:38 pm
      what about jit.scissors?
      also, you may try for keystone correction.
    • Mar 19 2013 | 11:01 pm
      jit.scissors cuts a single matrix in an uniform fashion, but I need the submatrix dimensions and offset features.
      on the other hand is just awesome!!! thanks!!!
    • Mar 20 2013 | 9:57 am
      This is an approach to using with a gen patch as a substitute to submatrix. Now, how can I give videoplane attributes like position, scale, rotation and alphablend?
    • Mar 20 2013 | 6:16 pm
      i may not be understanding what you are trying to do, but the most efficient way to "subdivide" a matrix to different geometries is probably to share the same texture, and use tex_coords to control what part of the texture is drawn where.
      if you'd rather use cornerpin, simply replace the videoplanes with gl.cornerpins.
      if you want to use both videoplanes and cornerpin, render the videoplanes to a texture using @capture 1, and send the output texture to the cornerpins.
    • Mar 21 2013 | 12:13 pm
      thank you for helping!! i apologize if I am not able to express what I need..
      following your advice, if I replace the videoplane by the cornerpin, the cornerpin object doesn't recognize the messages tex_plane_s and tex_plane_t, wich I would really like to have
      I have also tried to follow your second advice, to render the videoplanes to a texture using without any success.. I understand that I can capture the texture with the and use it for another purpose, but it just doesn't work, will you be able to help me solving this?
      this is as far as I can go :
    • Mar 21 2013 | 12:16 pm
      just to clarify what I really need, is exactly to use (two or more) subdivided matrix, each one on its own geometry with videoplane properties, plus cornerpin properties
      thank you so much for helping!!!
    • Mar 24 2013 | 12:56 am
      this patch gives a significant improvement on cpu performance, loading a movie at 3072x768 using the submatrix I have 11fps, with this patch I have 16fps.. not bad!
    • Mar 24 2013 | 9:16 am
      You can get a significant performance boost working in UYVY colormode while on the CPU and then converting to RGBA when entering the GL domain.
    • Mar 29 2013 | 11:22 pm
      @ LSka, why do you say that when entering to GL domain one should convert to RGBA? normally I use UYVY all the way.. please explain
      @ Rob Ramirez, I think I finally managed how the gl.node works! thank you for pointing the direction!!
      this patch shows a bit of compositing textures inside other textures using gl.node, it is a pitty that cornerpin values aren't stored inside the presets
    • Mar 30 2013 | 9:51 am
      @Guilherme: GPU always processes data in ARGB. UYVY colormode is used to speed up data stream from disk to GPU. You can find some more info in this thread:
    • Mar 30 2013 | 10:01 am
      You can use number boxes instead of pattrui to store values in presets:
    • Mar 30 2013 | 1:28 pm
      ...I mean "attrui"
    • Mar 31 2013 | 9:47 am
      I was also mentioning attrui object, the thing in using the number boxes instead of the attrui is that if you use the mouse to set the corner pin the attrui automatically updates values, and the number boxes don't
      I will leave a patch showing a way to store values
      Regarding the UYVY, I have a question wich is, if using [ @colormode uyvy] and sending to a videoplane object, I need to set the videoplane colormode to uyvy, is this correct? normally it is what I do..
      or instead should I use a slab with a shader to perform uyvy to argb before sending to the videoplane?
    • Mar 31 2013 | 4:24 pm
      mr Joshua Kit Clayton once said:
      OS X supports a UYVY texture type, which undergoes a shader based conversion to RGBA as it is loaded into the GPU, but it doesn't do chroma smoothing or other color corrections, and Windows does not provide any. This is why cc.uyvy2rgba.jxs exists, and it should *always* be used with @dimscale 2 1 like the example example, to convert from half chroma horizontal resolution to full horizontal resolution.
      So using [ @file cc.uyvy2rgba.jxs @dimscale 2 1] should give you the best quality available.
      Maybe I found a solution for storing presets using pattr:
    • Mar 31 2013 | 7:07 pm
      we can use the pattr object's @bindto attribute to bind the pattr to any of a script-named jitter object's attributes:
    • Mar 31 2013 | 10:39 pm
      @LSka: thank you for clarifying this to me!
      @Rob: nice tip! thanks!!
      should we use multiple instances of the pattr object in case we need to store multiple attributes any script'named object?
    • Mar 31 2013 | 11:18 pm
      @LSka: using [ @file cc.uyvy2rgba.jxs @dimscale 2. 1.] made my FPS jump from 19 to 30! I think this is the 1st time I am using a shader knowing exactly what it is doing!
    • Apr 01 2013 | 2:49 pm
      is there any way to set the background to be transparent?
    • Apr 01 2013 | 3:33 pm
      @erase_color 0 0 0 0
    • Apr 01 2013 | 4:01 pm
      awesome! thanks!!