Is it possible to give the procedural checkers more than 2 colors?

This is my first stack exchange post so my sincere apologies if i made a mistake.

I'm a really big fan of procedural textures and love to mess around with it and get different patterns. One of my favorites is the checkers texture. One thing that has always slightly bothered me is that i can only choose two colors, and that they're always in a checker pattern. I'd love to make some materials that give those old school pixel vibes.

Is it possible for me to make the procedural checker texture more randomized in hue, saturation and value? Thank you in advance.

Kind regards,

Dylan.

Brick texture can be tweaked to resemble pixels, It can be combined with a colorramp to get different colors in a randomized pattern.

• Thank you, i wasn't aware of this! While it's not 100% what i was looking for this will definitely help me a lot. – maplestick Aug 9 '17 at 12:25

You can feed a checker texture as the color to an other checker texture and play with the coordinates to create endless different combinations.

(click on the images to enlarge)

• Should be accepted... very nice and straightforward examples – bertmoog Aug 9 '17 at 20:34
• I feel there's got to be a way to make the selected colors randomly distributed rather than in a regular pattern.. – ajwood Aug 9 '17 at 23:00
• @ajwood i feel the same way – user1853 Aug 9 '17 at 23:45

Instead of relying on the checker node, we can make our own pseudo-checkers with randomized values between zero and one, then feed the result into a color ramp node, with constant interpolation.

Here it is, broken into a few steps:

1. Scaling up the texture coordinates, round them to integers, and scale them back down to the original range (I'm pretty sure this can be done with vector math, rather than splitting to scalars).

1. From here, we can combine these bars to a "stepped" coordinate space, and feed it into a noise texture (I feel that my math can be improved on; the stuff that I stuck in frowny frames shouldn't be necessary).

Here's the whole setup:

There's lots of room for improvement, but hopefully it gives you/other some ideas!

• i like the randomness in your approach. all our previous ideas had certain patterns. nice!! – yann Aug 10 '17 at 2:11
• Woah, that's incredible! – maplestick Aug 10 '17 at 11:40

This simple setup lets you choose your colors in one color ramp (with constant interpolation). You can double the setup to get from 4 custom colors to 8, 16, 32...

EDIT

The 10-color checker teture with custom colors

• I'm sure there is room somewhere to plug an object info->random node somewhere in this setup. Lots of fun! – user1853 Aug 9 '17 at 21:11

Was looking for something similar and building off of the previous answers found a very simple node arrangement for random noise, using pre-selected colors. That last part was important to me. I was trying to make a randomized lego-like sculpture.

This allows you to pick preselected colors in the ColorRamp by eye dropping them from your RGB nodes. You have control over how many and how much of each you want to show up. In this case I wanted a lego-like look so I applied the Remesh modifier, added a displacement for the top surface and unwrapped the model using Lightmap Pack. I scaled each UV island down to .1% using their individual origins, this insured that each face only showed one color. It isn't perfect, but it did what I needed it to do. Hope it helps.

A simple method not mentioned in the previous answers is to use a Voronoi Texture node with the randomness set to zero.

The following example uses a horizontal plane, so that it’s easy to use a 2D Voronoi texture, rather than the slower 3D one.

Shader node setup (for Cycles or Eevee):

Resulting render:

The colours produced by the Voronoi Texture node are random, but you can, for example, feed the output through a ColorRamp to control which colours you get.