Just trying to get my head around some attribute stuff. I managed to make these tiles randomised but I was wondering if anyone might know how I could make them checkered. I was thinking I could use the base mesh point number to control an attribute, and access that from a colour node, but I cant figure out a way to do that.
updated wrangle code with comments: ————————————————————
f@test = ch(“rows”)%2; //use this value to determine if the row count is odd or even
//test which row we are on and shift the value for every other //row by an amount based on if the rows are odd or even if( int(@ptnum/ch(“rows”))%2 ) @Cd = clamp( @ptnum%ch(“modder”),0,1); else @Cd = clamp( (@ptnum+(@test+1))%ch(“modder”),0,1);
//Size the copied grid based on the distance between two points //multiply the results by the grout size ( 0.95) @pscale = distance( vector(point(0,“P”,0)), vector(point(0,“P”,1)) ) * 0.95;
Cool! Thanks man! I noticed if I put += on the @Cd it would add to the existing colour too which is nice. I'd like to learn how to code in that a little better, I'm just starting though. What language is it written in?