Completed Nodes:
Create Edge Mask needed nodes:
Edge Mask Creation:
Enable on AO (not on by default in Eevee render (no raytracing), only work in Cycle render)
Set AO node as follow:
Tick inside and only local (don’t let the other object affects AO look), sample rate 8 is enough, reduce distance to only 0.5 something
Flip AO by invert color node (let exposed region as white, shadowed region as black)
Set stronger control by multiply and with map range with noise
(adjust noise texture and map range values)
Connect multiply to add node, change to greater than (remove all value greater than threshold)
AO Mask creation:
Noise texture affect AO value
AO Only local enable
Color ramp affect range of B/W
Map Range Min and Max value to serve as inverse node funciton
Connect to BSDF
Create Scratch Mask:
Basic set below:
In Voronoi Texture node, Change to Distance to Edge
In Add node after, change to less than, reduce threshold value to 0.010 (make as a thickness of scratches)
In Map Range node before bottom (2nd) Voronoi Texture (set as F1 for black spherical shapes), change mix max from/to values as below, now set the From Max value to determine how much lines should be masked
change Add node to multiply
Plug a constant valkue (here is 3) to both voronoi textures, so be sure they are the same
Connect extra texture (Musgrave) to Locaiton to Mapping, the vector values changes the shape of voronoi texutures and add randomisation
Add the multiply node (set value 10) at the end (let white value pop but keep black value constant):
Base Color Basic:
Use Mix rgb, set 2 colors (A as main, B as dirt color)
Use AO mask to pop out the different colors
Add 2nd Mix node set as greay white tone (to show the Scrach made before)
Create Add node to combine Scratch mask and Edge Mask
Connect it to 2nd mix node factor (a base color mixed with 2 masks should show)
Connect to BSDF
For Metaliic,
just connect already made 2 masks nodes (Add node) to BSDF Metallic input
Roughness
(to make 3 separated roughness: overall, dirt, metal, then combine them)
Set mid grey for black value, and light grey for white value in Color ramp
(to avoid fully reflective or fully rough)
Connect the color ramp to AO Mask output Fac, and with output:
Normal Map:
Prefer adjsut Distance than Strength on bump node, for more subtle result
Set nodes as above will add bump to all exposed areas (e.g. metal, scratch),
to hide those parts, set black (to cover metal edge part), and white (to cover scratch part) factors by using 2 Mix nodes, 1 set as black, 1 set as white:
Then add 2nd mix white node to connect to scratch
Set value over 1 (e.g .50) to make scratch more obvious
Connect to Bump node height input, tick Invert (so scratch is cut into the material, instead of lay on top)