bagginsbill opened this issue on Sep 29, 2010 · 74 posts
bagginsbill posted Wed, 29 September 2010 at 3:03 PM
Let's add a parameter to specify the overall reflectivity and use it in both.
I'm going to set it's initial value to .5.
reflectivity = PM(.5, "Reflectivity")
I use it in the Blinn node:
specular = Blinn(WHITE, .02, .5, 2 * reflectivity)
And I'll use it to alter the output of the fresnel calculation:
fresnel = TrueFresnel(ior) * reflectivity
Putting it all together, the script is:
reflectivity = PM(.5, "Reflectivity")
specular = Blinn(WHITE, .02, .5, 2 * reflectivity)
specular = PM(specular)
color = PMC(Color(.3, 0, 0), "Color")
diffuseColor = AGC(color)
diffuseValue = PM(.8, "Diffuse Value")
diffuseValue = diffuseValue * Sub(1, Clamp(specular))
diffuse = Diffuse(diffuseColor, diffuseValue)
ior = PM(1.5, "IOR")
fresnel = TrueFresnel(ior) * reflectivity
reflect = AGC(Reflect())
combination = Blend(diffuse, reflect, fresnel) + specular
output = GC(combination)
surface = View(output)
The render is attached.
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)