How to randomly shift texture on objects

To shift the texture randomly on different objects, the easiest way is to change its location along any of the axes by a random value.

To change the texture coordinates, let’s add the “Mapping” node to our node tree and connect it to the “Vector” input of the desired texture.

To access the individual coordinate axes, add the “Combine XYZ” node and connect it with the “Location” input of the “Mapping” node.

Now, changing the values ​​in the “Combine XYZ” node fields we can shift the texture to the desired offset separately along any of the three axes.

Let’s add the “Texture Coordinate” node to set the origin of the texture and connect it with the “Vector” input of the “Mapping” node.

To get a random number, let’s add an “Object Info” node. The “Random” output of this node generates a random number for the current material. Since the range of this random value is limited from 0 to 1, add the “Math” node and switch it to the “Multiply” mode. By connecting the “Random” output to the upper “Value” input of the “Math” node, we multiply the generated number by the number from the lower “Value” input. So at the “Math” node output, we get a random number in the range from 0 to the number from the lower “Math” node input.

Changing this value, we change the range and, accordingly, the number by which the texture shifts.

Nikita

Author: Nikita

Blender add-ons developer and articles writer.