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



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

    @nerd3d said

    I know this is a bit off topic because it's for strand hair but in the very last update of Poser there's a bunch of new strand hair shaders and a fix for the UV mapping of strand based hair.

    Whoa! Wait! huh???? Geez, how long have I been dead????

    Don't feel as if you're alone Earl, as I had no idea those shaders existed either.


  • Poser Ambassadors

    @bagginsbill - this is far I got a while ago attempting a leaf shader using Cycles nodes. Test renders using single 100% infinite + black Construct, one with light behind & one in front; had height maps in the material too but took them out for clarity. Was going by the demo here on the Translucent BDSF.

    The idea was to combine translucence with specular on the front side of the polygon only. Not sure if this is entirely relevant but any criticism would be welcome!

    0_1489518447251_Leaf shader.PNG

    0_1489518471882_Leaf front.png

    0_1489518495381_Leaf backlit.png



  • @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.

    0_1489521306787_upload-b19e1efd-074a-416c-a1c1-54df14391a69


  • Poser Ambassadors

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

    0_1489521586087_upload-7f0518ca-71e7-4e71-a5d9-025fdd0c6f21

    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.

    0_1489522784990_upload-9e1443fd-538e-43c0-a69a-b49192303d9a


  • Poser Ambassadors

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

    0_1489522873383_upload-9819fc29-eff0-4114-9e6e-d41482a81abc


  • 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

    0_1489522994158_upload-b73c56f3-ea58-4fc4-af68-4095eb981fe3

    And this is front-lit

    0_1489523046192_upload-abd79f2c-9301-4db9-b3a0-f6f7b319879d


  • 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.

    0_1489523217223_upload-81e731e2-3335-44cf-b0ba-2a0fb40d7eda


  • Poser Ambassadors

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

    0_1489523274414_upload-6ee75d2c-207c-4383-930a-afa232f67426


  • Poser Ambassadors

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

    0_1489523376307_upload-5c9de5a0-73dc-4adb-99fc-cda62817b832

    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.

    0_1489523514077_upload-82dcac76-fae6-4ec0-a307-56bb747ee16b

    0_1489523593999_upload-b0f937e4-558a-41f8-a25b-5daa0d654b57


  • 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.

    0_1489523805666_upload-0a5b3ba4-ddb1-4c82-ac89-2da96281889d


  • Poser Ambassadors

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

    Back-lit
    0_1489523907685_upload-8b621a0c-4879-4d03-b5a3-259dedb3db1c
    Front-lit
    0_1489524017648_upload-9d1d053b-2fc2-4487-9a0f-6e667368a3e4


  • 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.

    0_1489524448807_upload-bf9f76f0-7b47-4e35-9df7-534b6a013a41


  • 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!