Cell noise style random mosaic squares

Hi,

I’d like to achieve a procedural cell noise type that’s existing of randomly tinted squares, like a random mosaic:

This used to be an option among the procedural textures of the 2.79 internal Blender renderer.

Does anyone know how I could achieve this in Eevee / Cycles?

Thanks in advance for your help.

It should be easy to do it with a bit of math, but we lack of a good way to get uniform ranged randomness…
So the best alternative is to use the brick texture:

1 Like

Nice, thanks!

The only drawback is that like in 3ds Max the Brick texture is a 2D procedural texture, so you need UV mapping, and the sides aren’t seamless like in a 3D procedural texture. :neutral_face:

making this pattern in 3d is not so difficult:

1 Like

Cool, thanks, @Secrop! :+1:

Hi @Secrop,

I tried your node setup, but it turned out to be unstable when you animate the camera angle. But I tried the setup below by @CarlG, and that turned out to be stable, regardless of the camera angle.

Thanks again for your help.

We need a noise generator in the “math” node for sure.

This kind of texture has its own flaws in some types of geometry, specially when a face coincides with grid structure, causing some artifacts due to floating point calculations…
Also, all answers you got for this, here and in the other thread, will suffer from the same problem (since all answers use more or less the same math).
But apart from that I don’t see any other ‘instability’ with it.

To overcome the zfighting, you can scale the texture a bit, so that all faces fall inside each cell and not at their boundaries (again, this will also work in the other setups you got).
Also, in case of Eevee, you should use the ‘Rendering’ instead of ‘LookDev’, as the later uses low resolution floating point calculations for speed up viewport rendering, and that makes zfighting even more visible.

That’s what I meant with “origo sensitive”. Unmute the color add node and dial in some random number and you should be able to move the problem area away from the visible surface.

Hi @Secrop and @CarlG,

You’re right. I already found out myself that the artifacts (previously known as ‘unstability’ :wink:) are comparable to two coinciding polygons, and can be easily solved by either adjusting the size or adding a Mapping node and slightly shifting the Location.

Thanks again!