Gradient Texture Help

I have been fighting the Gradient texture, and I just can’t get it to work right. Below is a combo screen shot, showing my results, along with the test node tree:


I want the gradient to be gradual, from top to bottom. But, no matter what I do, the gradient is just a narrow band. The object is 43 units tall, and the object origin is at the base. Scale and rotation have been normalized (ctrl-A). In the mapping node, X-location has been set to 21.5 (half object height) to center the gradient. Y-rotation has been set to -90, to get 0 at top, and 1 at bottom. Scale does not spread the gradient—it only moves the center.

What am I doing wrong?

use the generated coordinates, set the scale in the mapping node to 1 and location to 0.

Still doesn’t work. Object is now completely black.

or, use the generated coors, and the convert>separeteXYZ… one of the outputs is your gradient (no other node needed)

Thanks Secrop. That worked. I used the Z output of Separate XYZ. Object can still be scaled and rotated, as long as rotation is not applied (ctrl-A). Scale can still be applied, without affecting gradient.