Combine two Image Textures randomly by UV

Hi,

i search for a way to combine multiple (at least two) Image Textures for Diffuse Color in one Material.
I want to achieve hard edges, no smooth blending.

It should look like this, but without using two materials and without using extra subdivisions (like in this scene). Both Images has same size.


So, it should behave like this:
The material starts at a point and use Image Texture 1 until it reached the limit of this texture. If more Texture is needed, randomly decide between the couple of available texture images. choose one and begin from the start.

Any ideas?

My idea
was use the UV Node and Mathnode %1 (modulo with value 1), but the problem is the random node. It generates 1 random at “startup” (dont know the internal process) and after one random is generated, this number from the node is a constant.

Here is my demofile if needed.

Attachments

demofile.blend (578 KB)

Here is what I use to generate randomly colored square tiles:



You could convert to black and white and do a greater than check to select which texture is used.

Edit: Actually, you might want to use a mapping node instead of multiply and add nodes that I use. But the principle is to round the coordinates and feed that to a noise generator. Detail 0 is sufficient, play with the other parameters to find what gives you the result you want. My own version consists of some custom nodes, but this is approx what it would look like in simplified form.

It just worked ! Thanks a lot.
The trick was to feed the Noise Texture with the vector, the rest i had same.

note to everyone: seperate XYZ is equal to seperate RGB (watch the comments in source code)

Solved

Thanks a lot :slight_smile: