How to get a gradient on an angle in cycles nodes? I used some of the suggestions to create a mesh with 2 materials transitioning using a gradient. I can't seem to figure out how to make the transition on an angle rather than horizontal or vertical. Here's the shader setup and the model.


I want the transition from red to gold (in the center section) to start in the upper left and extend to the lower-right above the blue, as indicated by the white arrow.
What you did is "quite" correct, you'll probably just have to find the right transformation parameters for your scene. But with this kind of setup it's not easy to figure them out.

I see you are using a Diagonal Gradient texture type, but at the same time you are also rotating the input coordinates, so as you are rotating something that is already rotated... well, it's easy to get lost.

I would suggest to use a simpler node tree, based on a Linear type, that lead to a behaviour that it's easier to predict, like the floowing.



But my real suggestion would be to use use an Empty to control the Texture Coordinates for the Gradient. This way you'll be able to visually adjust the orientation, the location and the scale of the texture.

Use the Arrows empty's type and remember that the texture lays in the XY plane (so empty's Z axis sould point toward global X).



Here's the shader in action: