# How can you make a scratched metal procedurally?

I want to use a type of scratched metal thing to use for a robot I'm working on, but I want to know how to do it in a procedural way, just using nodes and math, is there any way I can do that? This is a picture of what I want it to look like, but, just less scratches, so if anyone has a way, please tell me.

• What are the parameters you would like to control? – Carlo Jan 5 at 23:42
• – Duarte Farrajota Ramos Jan 5 at 23:54
• scratch amount, size, and how deep – yeetman Jan 6 at 0:27

If we take a Voronoi Texture set to Distance to Edge, and do a Math -> Less Than operation we get this map:

We can use another Voronoi Texture set to F1 to generate a map that lets us subtract out most of the corners.

Note that we are using the same scale for both Voronoi Textures, and we are clamping the Math -> Subtract operation to prevent our values from falling below 0.

The Less Than threshold controls the thickness of scratches, the Greater Than threshold controls how much of the initial map we remove.

You can stack up as many layers of this as you want:

And then plug it into a Bump node with distance set to -1 to sink it into the mesh instead of pushing out.

Here's a setup attempting to resemble your reference image.

Use texture paint. Press U on the keyboard-in order to texture paint as you'll need to UV unwrap the object (probably just use simple UV project unless You know specifically what you want).

Then go into the texture paint tab and go into edit mode. If you want depth to the scratches just create extra faces around the color using F.

• The question asked specifically how to this procedurally. What you are describing isn't a procedural workflow. – user3399 Jan 6 at 10:35