jjroland opened this issue on May 08, 2007 ยท 212 posts
bagginsbill posted Wed, 09 May 2007 at 10:20 AM
Attached Link: The Fresnel Effect - Glass, Paint, Plastic, and Metal
jjroland:There are 5 typical interactions that light makes with most materials. All of these can be mixed together in various combinations to simulate different types of materials. Each photon that strikes a surface actually only does one of these 5 hings. But millions of photons can hit the same spot and each will choose what to do independently, but overall, as a group, they follow well known statistical patterns. Poser nodes can implement these interactions following various rules. Putting them together in the right amounts creates believable materials.
The five interactions are:
Unless you're using a very expensive program like Maxwell, you're not actually simulating photons. In Poser, we have a number of different nodes that each offer a subset of the simulation of these phenomena, simplified to a statistical model based on the overall probability of these events ocurring. By manipulating the colors and numerical values on these nodes, you're describing a broad range of behaviors.
Software simulations of direct light and indirect light are very different computationally. In the interest of speed, many of these interactions are ignored unless you use additional nodes. Further, some interactions cannot be simulated in Poser at all, because there are no nodes to do them. Some of these interactions require ray-tracing - a potentially expensive operation. Still others require something called "photon mapping" - Poser doesn't do this at all except for the Gather node, which totally crap. But I digress. So we have to think about the key issue of direct illumination (photon left a light and has struck the first surface in the scene) versus indirect illumination (the photon has interacted with some other surface before arriving on this surface).
For example, since lights are not real objects in your scene (not usually anyway) you can't see them in reflections from the Reflect node. The Reflect node (which requires raytracing) only simulates reflection of indirect light, i.e. a photon that left a light source and has struck some other surface first. Thus, the Reflect node alone will not show any indication of light sources. The particular case of direct light source reflection is handled (much more cheaply, without raytracing) by the specular nodes. This is what specular reflection is in a 3d renderer - the direct reflection of a light source.
A word of warning about Diffuse in Poser - it is NEVER accurate, because it only calculates for photons coming from light sources, direct illumination. It does not include light bouncing or originating from other objects. Better renders do take this into account for diffuse calculations - this is generally called "global illumination" or GI for short. It is the absence of GI that mostly makes Poser renders fail to look completely real. We work around the issue with Image Base Lights, but that's a cheat and only gets you about half way there. But I digress ... again.
The PoserSurface (or root node) has built into it a number of simulators as well as channels to plug in additional ones (nodes).
The Diffuse_Color and Diffuse_Value implement interaction #3. (This is the same as placing a Diffuse node into your shader). For a mirror or water that isn't dirty, #3 never happens, so the Diffuse_Value should be 0.
The Specular_Color, Specular_Value, and Highlight_Size implement specular reflection (#2 from a light). You probably aren't seeing lights reflected in your cloth plane because your light isn't coming in the right direction for it to bounce into the camera. Based on the preview, it looks like the light is coming forward from behind the camera and a little to the left. When that hits the surface, it will not come back to the camera but continue going away. If you want to see specular reflection on the surface, point your light down and backward, so the light bounces up into your camera.
The Ambient_Color and Ambient_Value simulate light being emitted from your surface, instead of arriving from somewhere else. We don't need those for water or a mirror.
The Transparency parameters simulate #5 - the photon just passes straight on through. When set to 1, 100% of the photons go through. When set to .5, 50% of the photons go through. However, you'll never "see" a light through transparency - you'll only see other objects in the scene. How to simulate seeing a light, like the sun, through an object is beyond the scope of this thread. You could use this for water, but it won't look right, because water bends the light. I see a lot of renders in the gallery using Transparency for water and it sux. Also, people are often confused by the meaning of transparency - it should mostly be used to mean "no surface here". The Transparency input modified almost all the other settings, and does so in non-intuitive ways, particularly when values between 0 and 1 are used. Be careful with this one. For water, glass, etc. don't use it unless you're saying "no surface here".
The Translucence_Color and Translucence_Value are for simulating Diffuse refraction - where light goes into a material and gets partially absorbed, and partially scattered, and comes out the other side. It is very limited and only works for very thin objects. Also, it only handles direct illumination.
The Reflection_Color and Reflection_Value are just channel inputs and don't do anything on their own. You must plug one or more nodes in to make them work. Nodes you should use here are Reflect, Sphere_Map, etc. A word of warning: these inputs are modified by the checkboxes Reflection_Lite_Mult and Reflection_Kd_Mult. I won't even bother to explain those. Just remember this: ALWAYS TURN THOSE OFF - ALWAYS. They will never help you get what you want, which is realism. With those items turned off, the Reflection input just gets added to the rendered color, unless you have Transparency on as well. Don't use transparency with reflection unless it is 100%, meaning "no surface here".
I noticed that you have BOTH of those nasty checkboxes turned on. TURN THEM OFF. Because you said you do have raytracing on, I believe you're getting blackness because of Reflection_Kd_Mult. It is multiplying the reflections with the result of the internal Diffuse calculation (a pointless operation). Because you have the internal Diffuse_Color set to BLACK, you're Diffuse calculation is always BLACK and you're getting BLACK on all reflections.
The Refraction_Color and Refraction_Value inputs also do nothing on their own. You must plug one or more nodes in to make them work. Nodes you should use here include Refract, Fresnel, etc.
Bump and Displacement are used to simulate non-smooth-and-flat surfaces. Beyond the scope of this thread.
The Alternate_Diffuse and Alternate_Specular inputs are for plugging in nodes. Use them when you want a different version of diffuse or specular reflection, such as Glossy or Clay. When using those, you should turn off (set to 0) the built-in Diffuse_Value or Specular_Value.
Now certain nodes only operate if you are using Firefly renderer and have raytracing enabled. Nodes that require raytracing include AO, Reflect, Refract, and Fresnel. (Fresnel is a combination of Reflect, Refract, and EdgeBlend)
Acadia is right that I recently said to stop using Fresnel. I did a render with some eye glasses on a figure, and it showed the iris in two places - double refraction (not reflection as Acadia said). But I will say that until now I never saw this problem and for clear water the Fresnel node has always been fine. But I suggest you get used to using Reflect and Refract with EdgeBlend - you'll have more control and always get the right result.
Acadia and Angelouscuitry also rightly pointed out that you must have something to reflect. A sky dome, or a room type environment complete with walls and ceilings all around are important.
When the Reflect node calculates that there's nothing to reflect, it then uses whatever is plugged into the "Background" parameter. In your case, you plugged in a simple gray color. This is pointless - you could just as well have put in gray directly in the Reflect.Background parameter. But the real purpose of the parameter is to plug in a Sphere_Map node and then plug an ImageMap into the Sphere_Map, and make sure you have a panoramic image in the ImageMap. What that does is say "look, if you can't find anything to reflect, use this image, but pretend its a sphere surrounding the whole scene". The shader posted by pjz99 has the Sphere_Map plugged into the gray color, which again is pointless. That's a lot of extra calculations just to come up with GRAY. My habit is to put hot pink into the Reflect.Background parameter. Then if I forget to completely enclose my scene, or there's a hole in it somewhere, the surface will show a hot pink reflection in the render, and that's my cue that I forgot to do something important.
Same thing with the Refract.Background - put a Sphere_Map and a panoramic image, or put hot green to tell you when you're hitting nothing.
Finally, the only type of material that does near perfect reflections at all angles is a mirror or a very shiny metal like chrome. All other reflective materials do not reflect the same amount in all directions. This is called the Fresnel effect and is absolutely necessary for realism. The Reflect node does not implement the effet. The Fresnel node does. But you should learn how to do it properly yourself, for a number of reasons. Please follow the link to my tutorial.
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)