I'm trying to figure out how could I make all the vertical gradients the same size around the mesh. It's a simple D form mesh to keep it simple. The upper mesh on the image uses Y-axis and the lower is X. At both of the beginning the sizes are closely the same but as it turns the difference starts to grow between the size of the gradients. I assume I should you somehow that X and Y together. Is it even possible to do this?
1 Answer
To have a uniform vertical gradient around an arbitrary shape, we need some notion of length. The easiest way to get that I can think of is to UV unwrap the mesh.
In edit mode, mark one of the vertical edges as a seam, selected all the faces, pressed u to unwrap and then chose Unwrap. Finally, manually scale the UV to fit the bounds will let us make horizontal gradients as well.
Now the Texture Coordinate node's UV output will give numbers in the range $ [0:1] $ around the circumference of the mesh. I removed your Mapping node as it was extraneous. The scalar input of the Scale node is the number of gradients.