Blender Cycles OSL: Gold Material
Hi everybody. Today I'm going to show you a migration to OSL of my Gold Material : In that article I used a mix of colors I called Colombia Gold . Here I have called this mix as Egypt Gold . This is the same node setup in cycles without OSL: In most of the posts you can find in Blender Artist , the OSL code is used to get a pattern or a texture. This time I have migrated all the nodes information included in that material to the code, trying to minimize the overhead of the node system. So the OSL code is as follows: /* * Migrated from "http://elbrujodelatribu.blogspot.com.es/2013/01/gold-material.html" * By: elbrujodelatribu */ shader node_metal_gold( color ForeColor = 0.8, color MiddleColor = 0.4, color BackColor = 0.1, vector Normal = N, float ForeRoughness = 0.01, float BackRoughness = 0.04, output closure color Metal = 0.0) { closure color ForeClosure = background(); closure color BackClosure = background(); /