Search Unity

Question Is it possible to rotate and scale material sizes in URP Shader Graph?

Discussion in 'Shader Graph' started by nickhe2003, Jun 20, 2022.

  1. nickhe2003

    nickhe2003

    Joined:
    Jun 20, 2020
    Posts:
    15
    Back in Blender with my texture mapping structure, I was able to set the XYZ Rotation and Scale of the material in the Blender's shader graph. I'm currently planning to rebuild the material in Unity URP shader graph with the same textures, but I couldn't find a way to rotate and scale the material (so applying the material to some faces of the fbx model doesn't result in stretched texture). I tried to use rotate about axis, but then the mesh parts were rotated as well.
    Is there a way to only rotate and scale the material that's applied to the object's surface (so a different visual representation) without affecting the object itself? Thank you so much for your time and help!
     
  2. nickhe2003

    nickhe2003

    Joined:
    Jun 20, 2020
    Posts:
    15
    Someone on Reddit told me to use Tilling and Offset node for scaling and Rotate node for rotating, and they worked mostly!

    However, it seems like Unity only allows a one-axis (X axis) UV rotation for the rotate node, and using the Vector 3 node doesn't help either. Is there a way to set which axis to rotate around? Or is the 2D XY formation a fixed default for Unity shader graph?

    P.S. The reason I need XYZ rotation is that for example, a material applied top-down onto a floor may look perfectly fine, but as soon as you put it on a vertical 90-degree wall it becomes stretched. By rotating (a common technique in Blender), I'm hoping that it will look normal on the wall.