I am struggling with something in the shader node editor that I thought should be rather simple, but apparently isn't. I want to map a linear gradient from the equator of a sphere towards the poles (white in the middle, black on the poles). I thought I could just separate the Z from the Object coordinates or the Y from the UV coordinates and plug it into a color ramp, but controlling the result is turning out to be very un-intuitive. When I use Object, I end up with an extremely narrow strip at the poles, and when I use UV, I have to move the stops on the color ramp almost on top of each other to narrow the gradient down. What is the optimal way to do this so that it can be easily modified?

Crushed color ramp with UV - Y axis

Extremely narrow gradient with Object - Z axis


1 Answer 1


Here is my result:


And here is my node setup:


The absolute value node works well here because instead of going from a large negative to a large positive, with zero in the middle (creating a standard linear gradient), we instead achieve a positive value on both the top and bottom of the sphere, with it linearly going towards 0 in the middle.

You can change the color ramp type to 'ease' to get a larger area of black in the middle if you want, and changing the emission value also affects it.

  • 1
    $\begingroup$ You have a perfect 1000 point rep, and I just can't do it... ...oh well, +1 for you :). $\endgroup$ Mar 15, 2020 at 23:19

You must log in to answer this question.

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