gl.multiple color matrix problem with gl.sketch

Jan 25, 2011 at 1:22am

gl.multiple color matrix problem with gl.sketch


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!

– Pasted Max Patch, click to expand. –
Jan 27, 2011 at 7:42pm

This isn’t possible, since works differently than a single object. I would use Javascript, or poly, or itself for rendering multiple instances of another

Nov 20, 2011 at 10:13am

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 at 12:31am

you can can use gl.multiple and gl.sketch together, you just can’t use @glparam color with the multiple.

Nov 23, 2011 at 10:47am

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 at 11:16pm

as joshua said, probably best to use javascript of poly~ for this.

Nov 24, 2011 at 4:55am

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?


Nov 27, 2011 at 8:29pm

hi larme.
you are not using poly~ correctly.

in this case, you don’t need poly~ at all. you can use a single object.

here’s your patch modified to do this:

– Pasted Max Patch, click to expand. –
Nov 28, 2011 at 6:35pm

Thanks. It now works!


You must be logged in to reply to this topic.