3
$\begingroup$

I know how to assign a color ramp to a single dimension (I.e. How to make a color gradient from red to white along the x axis)

What I am stuck with is how to make a color gradient based on a circular rotation.

For instance, if I had a circle, 0 would be red, PI/2 is yellow, PI is green, 3pi/2 is blue with the gradient working its way around.

$\endgroup$

2 Answers 2

4
$\begingroup$

You can set a Gradient Texture to Radial for this. Here i combined it with the Object Output of the Texture Coordinate Node, but depending on your geometry you might have to put a Mapping node behind it. enter image description here

$\endgroup$
0
$\begingroup$

Looks like you'll have to convert to polar coordinates using the math nodes. Doesn't sound fun, but it is possible. Here's the equation.

θ = tan-1 ( y / x )

Actually that would be around the z axis, but you get the idea.

If you need help figuring out how to do it check out this tutorial from blender cookie https://cgcookie.com/archive/custom-uv-transformation-nodes-cycles/

$\endgroup$
1
  • $\begingroup$ Welcome to the site. Answers here should be more then a link. As an example your answer would be great with a picture of the math nodes needed for that equation. Also you might want to explain how to use polar coordinates. $\endgroup$
    – David
    Jan 26, 2017 at 0:07

You must log in to answer this question.

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