Let’s begin by adding a Vector Rotate node to a proper coordinate, which is a UV map in this case.
Then add 2 Separate XYZ nodes.
Add a Vector Rotate before the second separate XYZ node.
Add a value node and a Round operation then multiply them together by using Math nodes.
Multiply the X of the first Separate XYZ node to the Value node.
Multiply the Y of the second Separate XYZ node to the multiplication of Value and Round.
Do it one more time but in the opposite way.
Now snap the Y1 to the increment of 1 by using a Math node.
Divide it to the width value by using a Math node.
And add it to the X1 by using a Math node.
Do the opposite thing for X2 and Y2.
Combine the offsetted X1 with the Y1.
Do the same thing for X2 and the offsetted Y2.
Then mix the 2 vectors together.
Snap the offsetted X1 to the increment of 1.
Then use a modulo operation of 2 by using a Math node to create an alternate mask.
Use the mask as the factor of the mix node.
You can map your texture from it. But the texture will be stretched to fit the cells.
If you don’t want that, first, combine the scale value as X and the multiplication of scale and width as Y.
Then combine the multiplication of scale and width as X and and width as Y.
Mix them together and use the mask as the factor.
Divide the first Mix node by the second Mix node by using a Vector Math node and now you have an unstretched map that still takes in account the old location value. In other words, the texture is still on the original coordinate we used in the first place but only offsetted.
If you want your texture to be specified on each cell independently, use a fraction operation in a Vector Math node after the new coordinates mix vector. Now each cell has its own coordinate.
The texture is still stretched though.
To unstretch the map, divide the fraction by the multiplication vector.
To generate a height map, first subtract the X and Y of the fraction vector by 0.5 by using a Vector Math node to center them. The value now goes from -0.5 to 0.5.
Scale them 2 times by using a Vector Math node. Now the value goes from -1 to 1.
Use an absolute operation in the Vector Math node to mirror them.
Invert the map by subtracting it from 1.
Separate and use the smooth minimum operation in the Math node for the X and Y to generate a height map.
Clamp multiply it to adjust the bevel.
Increase the smooth distance to have round corners if you like.
Mute the division to “stretch” the map by clicking on it and pressing M, if you like.
To generate a random value for each cell, first snap the new coordinates mix vector to the increment of (1 1 0) by using the Vector Math node.
Add a White Noise Texture node and now you have random values for cells.
You can have more random maps by using a Separate XYZ or another White Noise Texture.
To make it different between objects, add a Vector Math node after the snap operation and use any operation with the Random output from the Object Info node.
Now you have a Herringbone map which you can scale, change the width, rotate and skew.
You can map your texture by using the vectors from the new coordinates frame, generate a height map and a random value for each cell.