Hi All,
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.
Any ideas??
Thanks,
Pete
Trying to make a Checkered Floor
2858 6 3- peteski
- Member
- 517 posts
- Joined: 12月 2013
- Offline
- sidenimjay
- Member
- 702 posts
- Joined:
- Offline
- sidenimjay
- Member
- 702 posts
- Joined:
- Offline
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;
—————————————————————————
————————————————————
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;
—————————————————————————
- peteski
- Member
- 517 posts
- Joined: 12月 2013
- Offline
- goldfarb
- スタッフ
- 3455 posts
- Joined: 7月 2005
- Offline
- peteski
- Member
- 517 posts
- Joined: 12月 2013
- Offline
- mestela
- Member
- 1743 posts
- Joined: 5月 2006
- Offline
-
- Quick Links