1
$\begingroup$

I have followed the setup in and got the expected result (bottom part of image).

However, if I duplicate the sphere, all the spheres will have the same colour and same wave texture (say, 2 of the blue spheres in the above image - but not, one whose wave texture is rotated - eg. the blue and yellow spheres have a wave texture that is slightly rotated).

I am able to have a different colour for the spheres (by using object info and color ramp), but I do not know how to have each sphere's wave texture have a different rotation.

Initially, I used randomize transform (specifically used a random rotation), but did not have any effect on the wave texture (the objects are rotated, but the wave texture isn't).

I then used a mapping node as in the following: connecting the vector output of mapping to vector input of wave texture (and changing the rotation of the mapping node).

This does change the rotation of the wave texture, but I have to manually specify the rotation and each sphere needs a new material.

So how do I have a single material that has a random rotation on the wave texture?

EDIT: I tried to "group the above node tree, apply it on x and y values (just as above) then the output of that applied on the x and z and finally the y and z", but none of the combinations work as I would like. I have linked to a blend file containing my trial and errors

$\endgroup$
4
$\begingroup$

You can use the Object Info Random Output as an angle for rotation of the texture in one or more axis. I understand your problem is that the mapping nodes doesn't have input, you can however use rotation transformation matrices to compute the vector manually, in one axis (z), it looks like this:

Node Tree

In three dimensions you can use the 3D Rotation Transformation Matrices to get:

enter image description here

The node tree is big, so here is the file to study it:

$\endgroup$
  • $\begingroup$ Wow! That seems like a complicated node setup. I'll try it and get back to you $\endgroup$ – peqhusus Oct 7 '17 at 18:39
  • $\begingroup$ @peqhusus The number 60 is arbitrary and it acts as a seed for randomness, just don't make it too small. $\endgroup$ – Omar Emara Oct 7 '17 at 18:44
  • $\begingroup$ The texture now has a good-enough random rotation around the global z-axis. Is there any way to also have the texture rotate around the x or y-axis randomly? (so that the band are not all latitudinal, but some longitudinal, and some a mixture of both - eg. diagonally) $\endgroup$ – peqhusus Oct 7 '17 at 20:22
  • $\begingroup$ Then for 3D rotation, would I use [x,y,z] multiplied with wikimedia.org/api/rest_v1/media/math/render/svg/… ? $\endgroup$ – peqhusus Oct 8 '17 at 16:30
  • $\begingroup$ @peqhusus Yes exactly. Matter of fact, if you group the above node tree, apply it on x and y values (just as above) then the output of that applied on the x and z and finally the y and z it will give you what you want. $\endgroup$ – Omar Emara Oct 9 '17 at 12:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.