Forum: Poser - OFFICIAL


Subject: the phong node

ice-boy opened this issue on Mar 19, 2009 · 91 posts


bagginsbill posted Tue, 24 March 2009 at 8:54 AM

A little demo of the 4 general-purpose specular nodes in Poser.

Left to right:

Phong, Specular, Blinn, Glossy

Behind the props is a mirror. The direct view of the props shows front-lit specular and the reflections show the back-lit specular. The main light is out front, so the reflection simulaneously gives us the point of view from behind, i.e. back-lit, in a single render.

I excluded anisotropic because it is not a general-purpose effect. And no, it's not for very bright and tight speculars like on the eye. That is possible with any of the specular nodes, but not at their default values. The anisotropic node is for microscopically grooved surfaces like brushed aluminum. We'll talk about that some other time.

Notice three of the four agree on the position of the hot spot. The Phong node does not. The Phong node does not use the viewer position (camera) as part of its calculation. This places the hot spot pointing straight at the light, which is wrong.

The Specular (#2) node is the same as the Poser Surface built-in Specular. It is what most people use. It is pretty good, but not great. I use it when I'm lazy, because it's there. Notice that the back-lit specular does not spread out. It should, for a material like this that is not microscopically flat and glossy.

The Blinn (#3) is the right node to use for this type of surface. Notice that the front-lit specular is darker than the others, and the back-lit specular is brighter than the others. This is the Fresnel effect. None of the others do this on their own, although if you add enough nodes you can get them to do so. Notice also that the back-lit specular spreads out around the rim of the sphere. That's how human skin behaves, as do many other micro-bumpy surfaces.

The chief difference between the Glossy and the others is that the hot spot does not exhibit much of a gradient. The Glossy node is helpful when trying to compensate for the fact that most of our basic CG light sources behave like tiny points. The specular reflection of a tiny point is a tiny point. But a glossy surface, such as patent leather, shows in real life rather large specular reflections of light sources that are not points at all. Even a light bulb, which is pretty small, is not a point, and most real-world lighting involves fairly large circular or rectangular areas for light sources. Yet if we use a point source, we will not get a big hot spot. The Glossy node is a cheat that helps with that. It makes a large hot spot even though the physics of our model says it should be a tiny spot.

I sometimes use the Glossy node for this reason. However, as it does not exhibit the Fresnel effect, I would combine it with other nodes to make it brighter when producing a rim lighting effect.

This render is with gamma correction. Without GC, the specular effects are difficult to get right, and the reflections would be nearly invisible on most monitors.

Further, I have simply plugged in the nodes without a more sophisticated treatment that respects the conservation of energy. In most shaders, I do a bit more than simply plug in the specular node into Alternate_Specular. Let's talk about that for a bit.

There are many CG articles on the net that talk about the specular reflection and diffuse reflection. Most get the description of the effect correctly, but almost all are absolutely 100% wrong when explaining how they happen, and why they appear to be different.

Here is one that does not get it wrong, and even points out that the others do get it wrong.

The Dimensions of Color by David Briggs

I suggest that you read that article about 11 times, or perhaps more, until you can repeat everything it says with confidence and understanding.

So a specular reflection is this: Light interacts with the air-surface boundary, and bounces off immediately in a new direction which is based on the the angle of incidence. The new direction can be smeared out a bit if the surface is microscopically bumpy. This is what mirrors do almost 100%.

Diffuse reflection is this: If the light ray/photon/wave does not bounce immediately, then it enters the surface and gets aborbed by the material. It can then do several things - it can become heat (jiggle the atom more) or it can elevate an electron to a higher energy level, or it can travel around inside and do more complex things. When an elevated electron comes back to normal (and it eventually does) it will emit a new photon, with a new color, and in a new random direction. Any direction has equal probability as any other.

Notice my description of the Diffuse reflection began with a qualification; "if the light ... does not bounce immediately". Effectively what that means is that you should model the specular effect as something that can happen first, with a certain probability distribution. When specular reflection is highly likely, diffuse reflection is highly unlikely. When specular reflection is less likely, diffuse reflection is more likely.

So a super accurate handling of the specular/diffuse effect would involve combining them into one calculation where one depends on the other. Poser nodes don't quite let us do this with that kind of precision. As a cheat, I generally subtract the output of a Blinn node from the Diffuse_Value of my diffuse node in some way. This is not physically accurate, but it is more correct than doing no coupling at all.


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)