Shader node reflection model setup inaccuracy?



  • 0_1501223164577_Shader_hierarchy.jpg

    While these three shader setups are basically the same, they don't produce the exact same results. I can't really tell which one is the best/correct one.

    Supposedly, the roughness value should correlate to the interval between the fresnel black & white colours with grey values instead, but I can't find such reflection percentages anywhere. Many papers claim the front face reflection for dielectrics is "about 4%" and therefore "near 100%" in the edges, but is this factually correct?



  • @noobalien One thing I have found out about Poser and reflections. You need something in the environment to be reflected. just like in the real world. How can you tell what's wrong with a mirror if you can't see what it's reflecting and how that reflection looks?



  • If we were talking about mirrors there are many ways to do so.
    Pick any of these:
    0_1501260293432_mirrors.jpg

    Eccentricity, Softness and Roughness are >0 because these are meant to be ordinary mirrors.
    Distribution is GGX but you can use Beckman if you really want such sharpness.

    It still says naught about the shaders I posted, which are clearly not mirrors.



  • @noobalien as @eclark1849 said: you need something in the environment for the shader to reflect so we can see what the thing is doing.
    you might take a look at this tutorial for the information you need about this and and then download my free shader that does this

    my free shader based on this tute
    http://www.sharecg.com/v/86231/browse/7/Material-and-Shader/Poser-11-Superfly-Uber-Shader-1


  • Poser Ambassadors

    @noobalien - my (possibly faulty) understanding is that 1) everything has specular (or more properly reflectance I guess), and 2) at a strong enough grazing angle all surfaces will act as mirrors & reflect 100% of light. However, the rougher the surface (at a very small scale) the more spread out the highlight; the smoother the surface the sharper & tighter the highlight. So a smooth body of water will appear mirror-like at a grazing angle but a stone will not (unless it has been polished).

    Surface reflectance for dielectrics is given as a range of 2-8% with gemstones reaching up to 16%. In a metal-rough workflow where the metalness map determines metal & non-metal surfaces the non-metals are averaged to 4% (a metalness map is generally black or white; intermediate values can apparently cause shading artefacts in game engines).

    Some sources - Marmoset Toolbag on PBR theory, practice & converting textures & Allegorithmic's PBR Guide.

    What about rendering with the Physical Surface root node & Cycles root + nodes as a comparison?

    Hopefully @bagginsbill will see this thread ...



  • I don't understand why would some people get the idea that this is "if a tree falls in a forest" kind of philosophical question, when it isn't.

    A mirror is still a mirror inside a dark, closed vault.

    There's no need to see a render to notice the three shaders are different because the image shows that indeed the three shaders are different.

    Circumstantial conditions such as auxiliary maps or environment were deliberately left out.
    Specular node ks_microfacet was chosen because it has separate color, roughness and value (Ks) inputs, while it seems to match GGX distribution.

    @caisson
    Thank you, this is closer to the answer I'm looking for. Hopefully Ted can see this and give his input on it.


  • Poser Ambassadors

    @noobalien - I know that when Cycles was integrated as Superfly a lot of time & effort went into matching the existing Poser nodes to the nearest equivalent Cycles nodes as far as possible. I've been doing (Diffuse + Gloss) + Fresnel when using Cycles nodes, here's what I've come up with -

    0_1501274234564_refl test.PNG

    Seem to get a very good match between the Poser & Cycles roots using Superfly with this setup.

    I'm using the Fac in the MixClosure & the Blending value in the Blender nodes for the % reflectance value. Also, if I plug in a texture or procedural for roughness I have to change the value in ks_microfacet to 1 to get it to match the Cycles node setup.

    Still hope @bagginsbill will see this as I'm not entirely confidant that this is 'correct', but hope it may be of some use ;)


  • Poser Ambassadors

    Well - you've certainly started an interesting topic.

    While these three shader setups are basically the same, they don't produce the exact same results.

    But they're not actually the same and therefore we should not expect them to produce the same results.

    Many papers claim the front face reflection for dielectrics is "about 4%" and therefore "near 100%" in the edges, but is this factually correct?

    The statement is correct, but only for perfectly smooth surfaces.


  • Poser Ambassadors

    Before we get started I'd like to change the setup to something with a bit more control.

    We want to create a "furnace". This is an environment where the amount of light arriving in any direction to any point is exactly the same. When the arriving light is a constant, analysis and experiments are a lot easier.

    If you don't have my environment sphere, get it here:

    Environment Sphere Link

    After you unzip and install in a runtime, load the "EnvSphere" prop.

    Go into the advanced material room for the EnvSphere and delete everything. Set the PoserSurface up like this to make it into a furnace.

    0_1501472415279_21e66d4b-27a2-4446-828f-c249a5ca9f2f-image.png


  • Poser Ambassadors

    The prop we use matters, too. The Poser Primitives "Ball Hi-Res" is junk, with a bad UV map.

    Go into Poser's Morphing Primitives and get the Ball from there.

    0_1501472569141_4dfb91a3-85a4-459b-9ad6-d582e94f9a3a-image.png


  • Poser Ambassadors

    I'm going to do small renders (300x300) for speed.

    Fill your image mostly with the ball. Place a simple Reflect shader like this on it and render.

    0_1501472682549_72683e04-7b90-4d45-844c-ba59faf1b650-image.png

    Surprise! There's some black smutch on the edge. WTF? This is an artifact, caused by the interpolation of normals on a rather course mesh.

    0_1501472743773_e2941da1-26eb-48f1-b474-798999f11306-image.png

    Apply 2 levels of subdivision like so.

    0_1501472783829_803eef34-1832-481e-8b94-d27e48d75c26-image.png

    Render again and the artifact is gone.

    0_1501472823809_426c442f-160c-4461-8120-49b706c8f716-image.png


  • Poser Ambassadors

    Now it should be apparent that the reflect node is sampling all over the place on the EnvSphere but everywhere it gets the answer, 1 (max white).

    Therefore with 100% reflection on the ball, it, too, appears to be 1 (max white). This is expected. It is, however, NOT physically correct, nor even plausible.


  • Poser Ambassadors

    There are numerous correct ways to make a glossy black surface, and an infinite number of incorrect ones. (Your odds of picking a correct one at random are near zero).

    Here's one way. This is how a perfectly smooth glossy (glassy) surface appears in a furnace.

    0_1501473088602_42262984-e23b-4143-82bf-8a110d75c68c-image.png


  • Poser Ambassadors

    Here is one of many correct ways to make a glossy surface with idealized Lambertian diffuse reflectance, with rgb 128, 20, 20 as the diffuse color.

    0_1501473208119_7c77b5ec-b3e2-44ae-9eba-4aad71552133-image.png

    The appearance in a furnace is correct. But we don't often experience furnaces so it looks funky.


  • Poser Ambassadors

    Just to preserve our belief in the shader, I changed the EnvSphere to use a nice HDRI and the render looks very plausible.

    0_1501473435567_ee6308ac-f3b2-4b7c-bfa5-8a3b13fb9e40-image.png


  • Poser Ambassadors

    Before we get into studying parameters and node arrangements, it will be useful to have a way to do two different setups in the same prop.

    Rotate your Ball using yRotate = 90 degrees.

    Now let's make a procedural mask for the ball that will give us black (0) for the left half, and white (1) for the right half.

    It should look like this.
    0_1501473727685_ab9800fc-bda8-44e4-b63e-fab44f6fec74-image.png


  • Poser Ambassadors

    Now we can use that 0/1 mask to give us a "control" sample and an experimental sample.

    Here I used it plugged in to a Reflect node Softness parameter. So, on the left, our known "control" is still as rendered earlier, with Softness 0. The left half is still completely white as we expect.

    0_1501474052549_af519c08-de85-43a6-ac14-b91a8da4015b-image.png

    The right half is something else though! The right half has Softness .5 because whatever you plug in is multiplied with the value, so .5 times 1 is .5.

    Interestingly the ball is not white. In fact, it's not even uniform. The center is darker than the edge.


  • Poser Ambassadors

    Change the experimental value to 1 and the difference is even more striking.

    0_1501474148656_75c6f2eb-4579-4766-938d-7e4612f50496-image.png

    I measure around 150 in the center, and 192 near the edge.

    I cannot explain this behavior. I presume it means that the legacy Reflect node, when running in SuperFly, is actually using one of the micro-facet reflection models, and not the simple direct sampling we're used to from FireFly.


  • Poser Ambassadors

    A quick test with the HDRI shows a surface that appears very much like a diffuse reflection.

    Except it's not the same. No model of diffuse reflection gets brighter at the edges - quite the opposite.

    0_1501474471212_5b410d7d-12ef-43d4-b9ca-6eed660118e6-image.png


  • Poser Ambassadors

    Here is a setup with a Diffuse node (rgb 150 150 150) on the left side and the Reflect node with Softness = 1 on the right side.

    0_1501474682638_84753f40-651a-4ab0-8d69-50e0c7b51b73-image.png

    Observe how at the center they're very similar, but approaching the edge they differ significantly.


Log in to reply
 

Looks like your connection to Graphics Forum was lost, please wait while we try to reconnect.