Change single value in 2d spread


how can i change a position in an 2d spread. i have a grid with colored quads… now i want to change the color of one random position every frame.

“change a position in a 2d spread” or “change the color” ?

I want to change the color value at a random postion every frame.

first i generate a 2d array with random values (0,1,2,3 for possible colors) for each quad of the chessboard, then i want to substitute the color value at a random position…

Every frame? Okay!! :D Okay, well, first you need a colorspread, that has the ‘basic’ color of all your quads. If you use 1 color, simple use Resample (color). Then you make a Random (value) node, put it on Integer, and set the scale to the amount of quads you have, minus 1.

Now use a Setslice (color), feed it with the color spread and connect the Index pin to your Random (value) node. Connect that to the color pin of the Quad, and there you go…

edit: oops I didn’t read the part about the checkerboard, can you post an example patch that shows how far you already are?

Not sure if you need checkerboard pattern, otherwise here is pretty close to what West was saying…

RandomColors.v4p (5.1 kB)

setslice did it… i am soooo stupid.

No you are not, you are just learning! ;)