Ivan DeWolf has created this very cool tooled steel .osl shader.
“The only real controls are cellmult, and the xalph and yalph. xalph and yalph control anisotropy, as they are standard OSL microfacet closure controls (try setting both to 0).”
float lineMag = distance(lineStart, lineEnd);
float U = dot(testLoc-lineStart, lineEnd – lineStart) / (lineMag * lineMag);
return lineStart + U * (lineEnd – lineStart);
color attenColor = color(0.9,0.8,0.7),
float xalph = 1,
float yalph = .1,
float cellmult = 2,
point Ploc = P,
vector Normal = N,
output closure color Metal = 0.0)
vector centerLoc = round(Ploc * cellmult)/cellmult;
vector spinCenter = nearPtLine(Ploc, centerLoc+Normal, centerLoc -Normal);
vector anisoDir = normalize(spinCenter-Ploc);
Metal = attenColor * microfacet(“beckmann”, Normal, anisoDir, xalph, yalph, 15, 0);
Some tests using mashed instances of standin/procedurals (logos) that have the clip_geo shader assigned to them. The original logo has a toon shader assigned to it.
Some attempts at producing a hatching style effect using UberNoise.osl (cell) -> toon.mask_color. In some cases the effect works better when Camera (AA) samples are low (3) as it tends to break up the edges around the highlights and creates more of a sketch style.