We need a hair shader like this for Poser ... Shader gurus?

  • @caisson why the use of add closures instead of mix closures? Don't they make for more light coming out than in?

  • Poser Ambassadors

    @ghostship - it's been quite a few months since I made it! IIRC the translucent BDSF only works when the light source is behind the object; when the light was behind using the MixClosure it was blending the two & I wanted the translucence to kind of override the diffuse. It just seemed to work using Add rather than Mix (though I could be doing it wrong).

    I made the texture maps too & am careful to clamp values now with Superfly - around max 220 sRGB to min 40 sRGB; making the texture brighter had a big impact on the translucency. I got to the point of using a different map for the translucent BDSF & then confused the hell out of myself. Kinda like the way this looks apart from the specular, not happy with that.

  • Poser Ambassadors

    @ghostship said in We need a hair shader like this for Poser ... Shader gurus?:

    @caisson why the use of add closures instead of mix closures? Don't they make for more light coming out than in?

    This is a common misconception. You add two shader sub-trees when the effects they create are mutually exclusive, and/or when they are already in correct proportions such that the sum of them is the actual physical response. For example, specular and diffuse reflections can and should be added if each has already been scaled in proportion to the Fresnel effects.

  • Poser Ambassadors

    Experimenting in SuperFly (SF) immediately creates some unexpected issues we don't have in FF.

    First, the environment reflects light towards my ribbon no mattter which way the "sun" is pointing.
    So I needed to make everything other than the ribbon black.

    Second, the geometry is making an unexpected artifact. I'm seeing this in certain setups more than others.

    This is using a Cycles Root node and just the Translucence BSDF, front-lit (light is behind camera hitting the front of the ribbon).

    I expected this to be completely black. Instead it's striped.


  • Poser Ambassadors

    I rebuilt the ribbon with smaller/more polygons and the stripe artifacts went away.


    This shader, using only the TranslucentBsdf, is not working the way I expected.

    Here it is lit from front. I expected black - it is not. However, I'm suspicious that this is self-lit. That is to say, because it is a ribbon, some of the translucence coming from front (facing us) to back (facing away) is then bounced down and up to other parts of the ribbon which then bounce back towards us.


  • Poser Ambassadors

    Lit from behind it is more what I expect, but I still see some light in the shadows.


  • Poser Ambassadors

    Aha - this seems to confirm my hypothesis.

    I presumed that that non-black shadows were due to secondary bounces of the ribbon illuminating itself from the other side of the light source.

    So - I set max bounces to 0, thus preventing any of those and sure enough the ribbon now behaves as we expect.

    This is back-lit


    And this is front-lit


  • Poser Ambassadors

    OK so keep in mind - I have ARTIFICALLY prevented secondary lighting bounces here. This is not how real life behaves but it is helping us see exactly what the shaders do.

    Here is a green translucence, front-lit, showing that the TranslucentBsdf does NOT produce any front-lit reflection whatsoever.


  • Poser Ambassadors

    Meanwhile, back-lit, we see what we expected to see.


  • Poser Ambassadors

    Conversely, the DiffuseBsdf only responds to front-lit situations.


    I won't bother showing you the back-lit DiffuseBsdf - trust me it was black.

  • Poser Ambassadors

    As I said earlier, MixClosure is the wrong way to combine these. You need to add them.

    Here I use MixClosure and here's what happens.

    Half the time it samples the DiffuseBsdf. Half the time it samples the TranslucentBsdf. The result is half as bright as it should be from either side.



  • Poser Ambassadors

    The AddClosure produces the right result. On EVERY sample, it will use both of the Bsdf nodes. Only one of them will respond to the light, but it's entire response should be used. The other one will produce black.

    NOTE WELL: What I just described is an artifact of me using only one light source and me not letting the light bounce around!!!!!!!! In the usual situation (multiple light sources and all of it bouncing like crazy from everywhere to everywhere) both Bsdf nodes will fire and contribute to the solution at all times. You cannot and SHOULD NOT be selectively firing them using ray variables. Just let the renderer handle it.


  • Poser Ambassadors

    This is the outcome with multiple bounces (4 actually).


  • Poser Ambassadors

    Earlier the scatter was mentioned. We're talking about single layer polygon, with no volume here, so keep that in mind.

    What does scatter do for a back-lit ribbon? Nothing. It is only responding to front-lit data, just like the DiffuseBsdf.

    Everybody, write this down. In SuperFly, transmapped hair does not exhibit translucence (i.e. back-lit light transmission) when relying on a ScatterBsdf - you're wasting your time.


  • Poser Ambassadors

    I just established that Scatter does not produce translucence from a single-layer polygon. A volume is required.

    But I want to make something very clear. (Which is hard because it's a double negative. Stop drinking before you read this)

    I did not say that the scatter has no effect. I said it doesn't produce the translucence effect. It still may (and I'm not going to prove it) generate front-side scatter, which is where light goes through front-to-back, moves over a bit, and then comes out back-to-front.

  • Sounds like you're getting what you want or expect from one side, but not the other. What would happen if you had two ribbons back to back?

  • Poser Ambassadors

    @eclark1849 said in We need a hair shader like this for Poser ... Shader gurus?:

    Sounds like you're getting what you want or expect from one side, but not the other. What would happen if you had two ribbons back to back?

    If there is a volume, then you do get back-lit translucence as well as front-lit normal lighting, all from the one scatter node. That's why we use it.

    But - it won't do that for hair, and the topic is hair, which is a single-layer no matter if it's trans-mapped or strand hair.

  • @bagginsbill said in We need a hair shader like this for Poser ... Shader gurus?:

    Stop drinking before you read this)

    Now you're going to far!

  • @bagginsbill
    Dear BB. So now we have the translucense clear and ready for Superfly.
    Then there is the rest of the hair shader. I suppose your final solution a few posts back should go into it - together with what you did before Key West and all.
    This is shaping up very nicely

  • Hm it sounds more like stick with FFF for now.

    ... the extra F being short for... well you now what :D