Forums > Jitter

how to color based stuff multiplied by ?

January 4, 2013 | 10:54 pm

I’m drawing very basic shape using
these latter are used with
position, scale are okay.

I have a problem to color them using a color_matrix feeding
I tried to specify glcolor or not in the commands passed to … all the same.

is there an alternative to to draw very basic lines ?
is there another way ?

any leads would be interesting for me.

January 7, 2013 | 10:30 pm

drawing basic lines can be done with @drawmode lines or

January 10, 2013 | 11:18 pm

I guess my problem is a double problem.
As you mentioned, mesh drawing seems to be my way here (for other reason)
But I am still not okay with coloring stuff using my instances "multiplied" by remain grey.

January 10, 2013 | 11:42 pm

I’m okay without to color gridshape using the required float32 RGBA matrix feeding

I don’t know why I cannot color through a color matrix feeding the gl multiple
and it is the same with
I’m missing something probably like the elephant inside the room…

January 11, 2013 | 1:51 am

post your patch

January 11, 2013 | 9:31 pm

here it is, Rob.

– Pasted Max Patch, click to expand. –
January 11, 2013 | 10:30 pm

ok, the reason the gl.mesh is ignoring the color values from gl.multiple, is because you are sending it color planes from outputs a 12 plane matrix when matrixouput is enabled. planes 9-12 are color info, causing gl.mesh to ignore color from gl.multiple. if you don’t pass these color planes, it will work as expected.

simply insert a "jit.pack 1 @jump 8" between the gl.gridshape and the gl.mesh. this will pass only the first 8 planes (3 position, 2 texcoord, and 3 normals). won’t work with gl.multiple colors, due to the way the object draws itself.

January 12, 2013 | 12:15 am

there is a solution a bit tricky ;
remove "glcolor" message to sketch;
replace "color" to "attr.color" on multiple object

– Pasted Max Patch, click to expand. –
January 12, 2013 | 9:12 am

Thanks Rob and matmat.
Ok for the 12 plane matrix, I knew it, I got it in this case.
I didn’t know about attr.color. This sounds the way to control each object color.

THANKS a lot.

January 23, 2013 | 1:35 pm

Hey all!
I’m having a similar issue. I tried using "attr.color" instead of color but it still won’t do the trick. Could you help me out here please?

– Pasted Max Patch, click to expand. –
January 23, 2013 | 2:14 pm

for your patch you don’t need to use "attr.color", you can simply use "color"

– Pasted Max Patch, click to expand. –
Viewing 11 posts - 1 through 11 (of 11 total)

Forums > Jitter