gl.multiple color matrix problem with gl.sketch


    Jan 25 2011 | 1:22 am
    hi...
    im trying to change colors using the color matrix glparam of a gl.multiple that have associated a gl.sketch and theres no way to do it... but this works fine if i change to a gl.gridshape object...
    theres any special consideration i should have to do it with a sketch object?
    thank you very much!
    best!

    • Jan 27 2011 | 7:42 pm
      This isn't possible, since jit.gl.sketch works differently than a single object. I would use Javascript, or poly, or jit.gl.sketch itself for rendering multiple instances of another jit.gl.sketch.
    • Nov 20 2011 | 10:13 am
      Sorry to bump this. Is there anyway to use roundedplane in gl.multiple? Because seems only gl.sketch has the roundedplane command.
    • Nov 21 2011 | 12:31 am
      you can can use gl.multiple and gl.sketch together, you just can't use @glparam color with the multiple.
    • Nov 23 2011 | 10:47 am
      Thanks, but I want many roundedplane with different colors.
      Because the positions and dimensions of these rounded plane is fixed, can I pre-render all these rounded plane with the same color into a matrix and down sampling it into a 1-0 matrix so I have a black-white matrix. Then I can multiply it by a color matrix to get the final product. Will this way hurt the performance/frame rate, if the dimension of the matrix is thousands by thousands?
    • Nov 23 2011 | 11:16 pm
      as joshua said, probably best to use javascript of poly~ for this.
    • Nov 24 2011 | 4:55 am
      So assuming I want to use poly~ to draw multiple gl.sketch object, does that mean I draw on a single gl.sketch object in the ploy~ patch? That's what I do in the attached patch. I generate a 6 plane matrix (2 planes for position and 4 planes for color), then iterate the matrix using jit.iter and send the resulting list to the poly~ patch. The poly~ patch receive the list and draw a single rounded plane. The patch run well for the first several seconds and then the frame rate drops.
      Also, do I need to mute and unmute the poly~ patch even though I have no audio in the poly~ patch?
      [attachment=177215,2961]
    • Nov 27 2011 | 8:29 pm
      hi larme.
      you are not using poly~ correctly.
      in this case, you don't need poly~ at all. you can use a single jit.gl.sketch object.
      here's your patch modified to do this:
    • Nov 28 2011 | 6:35 pm
      Thanks. It now works!