OSL - It's Nuts (or rather ... Bolts)

So on The Area message board I got a question; "Could you write an OSL shader that made threads on bolts". 

 I pondered for about thirtysix seconds, and said "sure, that should be possible". Typed a few line of OSL into the editor, and, bam, the result ... well... see for yourself :)

It's a very simple shader, it doesn't really follow the proper physics of bolt design (using a sine curve for the shape of the thread itself) but it's fun to use.
Interestingly, you can use OSL shaders in non-rendering context, like the "Displace" modifier, as done here:


I even made a short video to demonstrate this. And as a Fun Excercise, it is being rendered in vRay, Arnold, and the Nitrous viewport at the same time. Enjoy :)

NOTE: My vRay settings were COMPLETELY WRONG FOR INTERACTIVE RENDERING. PLEASE DON'T TAKE T HIS AS A "PERFORMANCE COMPARISION" IN ANY WAY ! !


The shader itself? Of course it's on GitHub!

Just click here :)

/Z

Comments

Popular Posts