How can I make a radial checkerboard pattern like this in the shader editor?
2 Answers
One method is to use two checker textures, one driven by a radial gradient, and the other driven by a spherical gradient, then combine the two together using a mixrgb node set to difference. Here are the results and the node setup.
If you want something besides black and white, you can pass the output from the difference node into a color ramp with two colors.
If you want more than 2 colors, you can change the two checker texture nodes to be 4 different colors, then use a 4 node color ramp to adjust as needed.
- 964
- 7
- 19
-
2Very nice :). You can actually use the Black&white output as a mask for any other color combination. – jachym michal Dec 20 '21 at 09:24
-
Agreed.. but I'm still trying to get my head round the logic :) – Robin Betts Dec 20 '21 at 14:53
-
3I'm seeing four colors - is this just an optical illusion thing? – Arsenal Dec 20 '21 at 15:19
-
1@Arsenal Looks like there's indeed a fourth light blue shade: https://i.stack.imgur.com/MaB3n.png – SE - stop firing the good guys Dec 20 '21 at 15:44
-
+Jachym Michal Thanks for the idea, I found that using a color ramp worked and updated my answer. – deltaray Dec 24 '21 at 02:57
A method to get polar coordinates in general is to use the (0-1) output of a Gradient > Radial texture as X, and the Length of the XY coordinate as Y:
The blue nodes above are just to ensure X is always an even integer, and give the user a basic interface, should you want to group the cluster.
- 76,260
- 8
- 77
- 190





