Color ramp unexpected results?

Hi. I am trying to do a “simple” thing. Just use a color ramp to drive the opacity of my mesh.
I just added: Texture coord > Mapping > Color ramp

Questions:
1- Why my gradient is always tilted in this situations when I need a color ramp and the object parameter of my texture coordinates? Is there anyway to just set the color ramp to be always from -Z to Z direction ? I use this set up constantly and it is somehow a little bit … to tilt the rotation all the time in order to be straight.

2 - Why I am not being able to see the Ease transition in my mesh object and also the blue color is not showing.

3- Is it possible to make the color ramp extremes are exactly the entire Z of my mesh?

Thank you

You forgot gradient texture, you are feeding vector data directly into color input:

The reason the setup is not working, is because you’re giving the ColorRamp a vector (3 coordinates) input, when it can only operate with normal numbers (in the range from 0 to 1).

  1. Additionally to what Formats64 said, you can also use the Separate XYZ node to split the vector up into its X-, Y- and Z-components.
    Using the z-component to drive the color ramp gives the gradient in the Z-direction.

  2. Probably has to do with the ColorRamp simply not working wit the vector input, but I’m not certain about this.

  3. Using the Generated texture coordinates instead of the object coordinates will map the gradient perfectly over the extends of your mesh.

  1. Adjusting the mapping rotation adjusts the gradient’s angle.
    1.1) You need an object selected to use object coordinates. I’d recommend using UV coordinates or generated coordinates.
  2. The mapping node outputs a vector map which is used for placing textures. A vector output should be connected to a vector input, like the purple input on the gradient texture.
    2.1) The color blue is probably really small sandwiched in-between the black and white. The mapping node wasn’t designed to make gradient textures.
  3. You can have full control over all the colors on your mesh once you understand how to use the nodes properly & learn the right techniques.
1 Like

No. If a reference object is not specified it will use the object rendered. The thing to be aware of is if the origo is center of object, you will get x, y, and z containing negative coordinates. I use object coords all the time to specify texture dimensions in physical values. Generated texture coordinates will stretch according to the bounding box dimension with origo in a corner.

However, since this is a rotating object you might want to have control of, I would suggest using object coords using an empty (or the base) as the reference that is not affected by the rotation. Separate out the z and use either map range or math(mul add) before feeding it to the ramp.

2 Likes

I didn’t know that! Thanks for the correction.