Change color by radius So I am currently working on a CAD rendering and decided to give Blender a try instead of Keyshot. One part is a black ring with engraved writing (silver/white) on it (in the mesh since it is a stl import). I thought just like color by z hight it should be possible to assign color by radius -> lower parts of the ring white and higher parts black. So my approach was calculating the radius and input into a color ramp set to constant.



Also tried to add a Mapping Node to scale the vector etc. but no luck with that. I am quite new to blender so I guess my understanding of the texture coordinate object vector might be wrong. Switching the xyz outputs didn't help either.

Maybe someone could help me out here.
Your node setup looks correct, although it could be made slightly less verbose by making use of the Vector Math: distance node.



I've managed to make it work on a torus. Perhaps you should try:


Making sure the origin is in the centre of the ring.
Tweaking the ColourRamp slider's Pos values so that the results of the previous node operations fall in their vicinity. As of right now, yours are set to 0 and 0.077, it seems; for me the spot was around 0.9 .