gl.multiple color matrix problem with gl.sketch
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!
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.
Sorry to bump this. Is there anyway to use roundedplane in gl.multiple? Because seems only gl.sketch has the roundedplane command.
you can can use gl.multiple and gl.sketch together, you just can't use @glparam color with the multiple.
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?
as joshua said, probably best to use javascript of poly~ for this.
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?
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:
Thanks. It now works!