I don't know if there is such a OSL shader. But with Arnold's Toon shader, you can render stuff like that.
It looks good if we can remove the hatches and if it works like this for complex objects try it once(please download from here good file GrabCAD).as I found it the simlab-exporter for Sketchup is the best but it's not handy and does not quite for a heavy scene.
(seems related to the question at https://forums.autodesk.com/t5/3ds-max-programming/make-a-patent-drawing/m-p/12823562#M32301)
I doubt OSL can do this in a satisfactory way, as it normally is working only in a "local" (i.e. single pixel) rendering context, whereas for such drawing-like lines the renderer would probably have to search into a neighborhood of pixels. I know you can do some sort of silhouette outlines using the angle between the view ray and the surface normal but that is probably only the first step.
I agree with @wernienst that a full renderer such as Arnold (or vray) would be the best way to go for good results.
Hi mbreidt.could you please attach the example file( osl) and is it possible we can create the hatch effects on the wanted surface by material ID?
There is no OSL file I can attach, sorry. And as I said: if you use Arnold, why not use Arnold toon for it?
Can't find what you're looking for? Ask the community or share your knowledge.