14

How can I make a radial checkerboard pattern like this in the shader editor?

enter image description here

deltaray
  • 964
  • 7
  • 19

2 Answers2

18

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.

The result

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.

Using a colorramp node to change the 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.

creating a 4 color checker texture

deltaray
  • 964
  • 7
  • 19
5

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:

enter image description here

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.

Robin Betts
  • 76,260
  • 8
  • 77
  • 190