Forum: Poser - OFFICIAL


Subject: Glossy materials with true Fresnel effect using matmatic

bagginsbill opened this issue on Sep 29, 2010 ยท 74 posts


bagginsbill posted Wed, 29 September 2010 at 3:02 PM

One little problem we have is that the Reflect node doesn't deal with lights. It only reacts to props and figures. We need to use a node that generates specular reflections of our directional light sources.

For 99% of materials, the best node to use is Blinn. It is very versatile. And it has the Fresnel effect built in, although not expressed in a way that is as easy to deal with as IOR.

Let's start simple. I'm going to add a Blinn node.

specular = Blinn(WHITE, .02, .5, 2)

And I want it on the left side of the shader tree so I can mess with it in the material room. The PM function will move it over there as if this node was a parameter.

specular = PM(specular)

Now I need to do one other thing. When the specular effect is strong, the diffuse effect should be weak. There is no perfect way to do this in Poser, but I have a hack that works pretty well. I treat the output of the specular node as if it was a number and use that to calculate the complementary amount of diffuse reflection.

diffuseValue = Sub(1, Clamp(specular))

Putting this all together, the script is:

specular = Blinn(WHITE, .02, .5, 2)
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)
reflect = AGC(Reflect())

combination = Blend(diffuse, reflect, fresnel) + specular
output = GC(combination)
surface = View(output)

The attached image shows the results. Very convincing.

Experiment with different values of Eccentricity, SpecularRollOff, and Reflectivity.

Eccentricity is basically how big the highlight is. Lower values produce a smaller highlight.

The SpecularRollOff is the Blinn node's equivalent to IOR. Lower values will decrease the perpendicular reflection value.

And Reflectivity is the maximum reflectivity or shininess of the surface.


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)