Blender Cycles OSL: Copper Material
Hi everybody. Today I'm going to show you a migration to OSL of my Copper Material : This is the Cycles version: As I did with my OSL Gold Material , I have migrated all the nodes information included in that material to the code, trying to minimize the overhead of the node system. This time the facing value is an input parameter in the script. So the OSL code is as follows: /* * Migrated from "http://elbrujodelatribu.blogspot.com/2013/07/cooper-material.html" * By: elbrujodelatribu */ shader node_metal_copper( color ForeColor = 0.8, color MiddleColor = 0.4, float Facing = 0.665, float ForeRoughness = 0.01, color BackColor = 0.1, float BackRoughness = 0.04, normal Normal = N, output closure color Metal = 0.0) { closure color ForeClosure = background(); closure color BackClosure = background(); // Facing colors - formula and code from Blender OSL code float aux = fabs(dot(I,(vector)Normal)); float...