Rotation in mapping node

Hello! I'm stuck with the rotation in mapping node (headphones material) :) Is there a way to understand why granite dots becomes so stretched when we rotate them using x-axis? when I rotate a uv-map in uv-editor using x-axis the result is different. I understand that uv-editor is 2-dimensional but still can't get why the rotation in mapping node with the same axis is different. I mean,

1) I would never thought I can use granite texture to achieve such result
2) I can't see how to extrapolate this example and use the technic in different cases cause I can't understand why granite dots become so stretched

  • spikeyxxx replied

    Hi Marfa,

    That is an understandable confusion. Here's what's happening, the UV Texture has X and Y axes like this:

    Headphones_1.png

    So rotating around the X-axis gives (with lazy pictures; this is the orthogonal top view):

    Headphones_2.png

    When rotating 90°, you can only see a line, hence the (infinite) stretching of the texture.

    I hope that answers your questions

  • spikeyxxx replied

    Okay, I couldn't resist; here's a 3D view of the rotation:

    Headphones_3.png

    2 loves
  • Omar Domenech replied

    So it stretches it because the coordinate is moving through 3D space even though you can't see it? In that last picture that would be an example of rotating in the mapping node? 

  • Martin Bergwerf replied

    Yes indeed Omar,

    You rotate the UVs around the X-axis in the Mapping Node.

    The same effect could be achieved by scaling the Y coordinates. Rotating around the X-axis 90°, would have the same result as scaling the Y to 0. 

    Every Y component (with the same X)) of the UVs is being mapped to the same value.

    This only works because the UVs are 2 dimensional, but they live in a 3 dimensional world. Just like a Plane in Blender; you can look at a Plane from top orthographic view and rotate around the X-axis and it would look the same as scaling the Y.

    Addendum:

    This is not completely correct, the UVs do not have a Z component, so they would also be 'flattened' into the XY 'plane'. So rotated around the X and having the Z component removed (or set to 0).

    But incorporating that in the 3D picture would make it less clear, I think.

    1 love
  • Omar Domenech replied

    This is great info Spikey. I can totally picture that in my head and it makes sense visualizing it that way. 

    1 love
  • Marfa Razmakhova(marfa.out) replied
    Thank you guys! That helps
    • 🤟
  • Josh Tryon(namelessjay) replied

    Wow! Thanks, Martin! I think that's the clearest explanation I've seen of these controls. It makes a lot more sense now

    • 🤟
  • Martin Bergwerf replied

    I'm glad that was helpful Jay nnamelessjay