3
$\begingroup$

Is there a way to randomly rotate an image texture randomly and keep its mapping scalable? Im sure this has already been asked but can't seem to find it. If someone can redirect me to the appropriate thread/question that would be awesome.

If not here is the texture im trying to achieve:

enter image description here

I created a tiled image in illustrator and imported it into blender as an image texture. I have ran my nodes to get the image texture scalable but can't figure out how to randomly rotate it.

Here is what I have achieved:

enter image description here enter image description here

This is what my current node setup looks like. The top part is for an added procedural texture to create more roughness outside of the image texture.

Node setup

Also here is the image texture I created in illustrator:

enter image description here

BLEND FILE:

Any help would be greatly appreciated. Still trying to figure these nodes out and the math behind them. Thanks in advance!

$\endgroup$
3
  • $\begingroup$ It would be helpful if you could append your blend file to our upload facility. I'm too lazy to recreate all those nodes ;) $\endgroup$
    – Moog
    Nov 21, 2019 at 20:31
  • $\begingroup$ @Merlin I uploaded the blend file for ya and everyone else! totally forgot to do that! $\endgroup$
    – A_Weber
    Nov 21, 2019 at 20:43
  • $\begingroup$ This question perhaps would have been harder to answer when it was asked. I don't think vector rotate existed then, but I could be wrong. $\endgroup$ Mar 13, 2021 at 9:00

1 Answer 1

1
$\begingroup$

I just faced a similar issue, so I took a look at your file. In the Tile-able image texture frame, you start with a Mapping node into a Separate XYZ. I added the following nodes between them.

enter image description here

This all centers around the Vector Rotate node. To explain, we start by taking the Vector output from your Mapping node into a Voronoi Texture with a Scale of 1. We have to add another Mapping node in between to align the grid with the original output.

enter image description here

Now we can take the Color output and multiply it by some number and throw it into the Angle input of the Vector Rotate node, and we can take Position and put it into the Center input. However, we must include yet another Mapping node in between to correct the transformation we made previously. If we don't, the locations are all off.

enter image description here

This does introduce a slight issue. The corners of the repeated image will show up as in the following image.

enter image description here

So you may have wondered what this mysterious noodle coming from the Distance output is. I used this with a Color Ramp set to Constant to generate a mask that we can subtract out of your image and solve for these corners.

enter image description here

enter image description here

Your original Mapping node can be used as a control for x & Y Location, Z Rotation, and X & Y Scale.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .