Gradient texture position

Hi, it’s the first time I post here, I hope to do right. So the problem I have is that the gradient texture gets messed up as soon as I apply the position to the object as in the first image, in the second image the brake disk is without applied position. Now I was wondering, how do I get the same result as the second image having the position applied? Thank you.


This is the second image since I don’t have to post it since I’m a “new” user >>> https://postimg.cc/XrGzLs88

Object coordinates are distance from object’s origin in object’s axes. When you apply position, the the object’s origin moves to the world origin. To compensate for applying position, subtract the current object position (in world space) from your object coordinates.

I think the main problem here is the strategy used for getting the job done. Feeding coords through a gradient like that is something I’ve never seen before, and it’s not something I would consider other than in a happy accident Bob Ross moment :smiley:

I would split it into three tasks; the main disk surface (flat faces, center hole, and circumference), the off center holes as a separate material, and the slots as a separate material if they don’t penetrate the disk.

Main disk - radial based aniso shading. Circumference and center hole needs to be treated separately from the flat faces, so a normal separation to drive a mix would be appropriate. If you want procedural noise, this is not trivial to setup but possible.
CC: Object coords (3D) → cylinder mapping conversion (2D) → cylindertoplane conversion (3D) → smooth voronoi.
FF: Object coords (3D) → disk mapping conversion (2D) → cylindertoplane conversion (3D) → smooth voronoi.
Color of smooth voronoi → separateHSV, using fraction of H to drive aniso rotation. S and V can be used to drive whatever you want, i.e. roughness and color.
These are then mixed with the normal separation. Radial tangent used to drive aniso tangent.

Hole and slots:
The holes and slots are easier but require a little bit of UV work since tangents has to be UV driven in this case because it is not aligned with the radial. If the holes have a chamfered edge (they should), this should be assigned this material as well, as it indicates a drilling operation. These should have clean quad geometry, whereas the disk itself can contain messy geometry. The general setup becomes:
UVMap.AnisoHoles (2D) → cylidnertoplane conversion (3D) - smooth voronoi. Same deal as above for HSV usage if you want.
This technique can also be used on through slots. For sunken machined slots, I would have to know the toolpath and tool used. But you didn’t provide an object to try out with so I just ignored the slots here.


BrakeDisc.blend (2.5 MB)

1 Like

I tried this solution and unfortunately I didn’t solve it. I understand your speech anyway.

I thank you for taking your time and sharing this file, I will certainly study it a lot, unfortunately, however, I am still very scarce so I do not understand many things well, I hoped to solve my problem more easily, in the end I still do not look for great realisms, but at least I wanted that circular effect with a few knots and without applying the position I had succeeded.

Thanks all the same to you, I solved, in the node tree I was wrong to position the node mapping, it had to be placed before the gradient texture and play around with it.

Yeah, sorry, I should have mentioned that it has to be mapped first thing. And what you actually need is its position unrotated, unscaled. The basic idea is to apply the inverse of its object transform-- but since you’re just applying position, you only want the translation component of that inverse.

The other thing that you can do, if you want to use some object coordinate space but change your object’s space (like by applying position), is to use an empty. Give it the same transforms as your object, parent it to the object, and use it for your object coordinates. Now you can change your object’s origin to your heart’s content (with “affect only parents” perhaps) and you won’t change your material.

I will also try this method in the future. Thank you.