Ghostship's superfly hair shader



  • @amethystpendant I just checked and the zip is not available.



  • Indeed Translucent and Diffuse HAVE TO be mixed and not added, @noobalien is right about that.

    The reason is that a physical plausible shader has to be energy conservative. You do not even have to make a test render, the reflected light (diffuse or reflective) cannot be transmitted to the rear side at the same time and vice versa.

    @noobalien Thank you for your shader! Right now I don’t have the time to play with it but you should consider creating a new thread for it as this one was about having a simple hair shader that renders fast.



  • @noobalien I agree that would be good for a shower curtain, but what you are dealing with is transparency. What we are talking about is translucency, take a leaf, hold that up in front of an object and you cannot see through it to anything behind, but, if there is a light source behind you can see some light passing through, and shadows of objects between the light source and the leaf, totally different effects. the reason your second one fails is that there is no light source behind your plane.



  • @nagra_00_ said in Ghostship's superfly hair shader:

    @noobalien Thank you for your shader! Right now I don’t have the time to play with it but you should consider creating a new thread for it as this one was about having a simple hair shader that renders fast.

    Actually it's about providing a plugin to make applying a shader easier.



  • @pelagius said in Ghostship's superfly hair shader:

    @amethystpendant I just checked and the zip is not available.

    Just checked and it is definitely still there, weirdly it has been "viewed" 22 times but only downloaded 16, maybe people didn't like the look of the zip file :)

    @Miss-B Will get it out tonight.



  • @amethystpendant said in Ghostship's superfly hair shader:

    @noobalien I agree that would be good for a shower curtain, but what you are dealing with is transparency. What we are talking about is translucency, ...

    @amethystpendant you are right transparency and translucency are not the same optical effect but the energy balance is always the same.

    Here the easiest example that came into my mind:

    Put a square upright on a white ground and apply a diffuse shader with 100% white to the square. Place a mirror behind the square and a infinite light in front that is parallel to the ground (that way the ground is not illuminated by the infinite light).

    What we get is a square that reflects 100% of the incoming light. The reflected light is illuminating the ground in front of it and in the mirror we see that the rear of the square is black. Nothing special so far.

    Now we add a Translucent shader (again with 100% white) and connect it using an AddClosure node. The front view of the square did not change after doing that. But in the mirror we can see that the back of the square is now white (same amount as on the front side). Further more the back is illuminating the ground just like the front side does. In short we magically doubled the amount of light. 100% on the front and 100% on the back of the square.
    Thats a nice effect but not physical plausible. To get such a behaviour in real world the square has to be a light emitter (a special kind of).



  • A quick render of the example without the mirror. Square with diffuse + translucent on the left.
    0_1548936018428_translucent2.jpg



  • @nagra_00_ Okay I'm convinced, however I still believe it should be an add but that the sum of the 2 should be less than 100%, you are using 100% white on both, that is where the conservation of energy fails not in the addition. So you could use a mix at say 75% diffuse and 25% translucent, but that still wouldn't account for loss of energy, one of the colour chips would have to be less than 100% white to compensate for normal loss. So if you had 75% white on the diffuse and 15% white on the translucent and added them, you would end up with a 10% loss of energy due to scattering / conversion to heat etc.



  • @amethystpendant Thats right but why not use a MixClosure? First of all its a warranty for conservation of energy. You can always tweak the input values of the diffuse or translucent shader as you like.

    And while i have some spare time some fun with the Cycles / SuperFly SSS node.

    SSS is a volume effect but the SSS node is not a volume shader. Here an example to prove it:

    A thin cube with SSS and two squares. The one in the left is behind the cube and produces a shadow. The square on the right is placed inside the cube and is just ignored.

    0_1548938188848_SSS_isNoVolShader.jpg

    Next example, SSS shader applied to a hollow cylinder (with volume) placed on the ground. I put a point light inside and here what you get:
    0_1548938236715_cyl_sss_render.jpg

    The cylinder is glowing just as expected but does not illuminate the ground, funny isn’t it. So when you are in need of a glowing object that does not emit any light into your environment the SSS node is your friend.



  • @amethystpendant
    "what you are dealing with is transparency. What we are talking about is translucency"

    Weird you say this because the shader does not use transparency. It uses TranslucentBsdf.

    "What we are talking about is translucency, take a leaf, hold that up in front of an object and you cannot see through it to anything behind"

    Correct.
    Green won't let you see through it as well as white.
    Mix with DiffuseBsdf to your desired amount of translucency.

    "the reason your second one fails is that there is no light source behind your plane."

    I showed both frontlighting and backlighting.

    @nagra_00_
    Thank you for understanding and providing additional renders to demostrate the different results.



  • @noobalien said in Ghostship's superfly hair shader:

    @nagra_00_
    Thank you for understanding and providing additional renders to demostrate the different results.

    You are welcome. Just a short note: You should not compare refraction and translucent shader as you did in an earlier post. Those are completely different things. Refraction happens at the bounding surface when light travels trough two medias with different IOR. Translucent is more like a simplified SSS that works without volume.

    BTW would you mind to upload your hair shader somewhere?



  • Right, re-claiming my thread! :o)

    Here's the amended plugin with the defaults as set by @ghostship (only right as it is their shader) It also has the fix for the weird GC correction on Bump maps

    Ghostships EZSkin3 Hair Plugin

    Hope it helps

    0_1548958169578_GSNew.png



  • @amethystpendant Thank you for this plugin!
    I have a question that you may can answer. Is it possible to create a EZSkin Python plugin that does use compound nodes?



  • @nagra_00_ said in Ghostship's superfly hair shader:

    @amethystpendant Thank you for this plugin!
    I have a question that you may can answer. Is it possible to create a EZSkin Python plugin that does use compound nodes?

    To be honest I don't know, I can't see any reason why not all the plugin does is create the nodes and wire them up, so it should be possible to effectively create the compound node then add it to the tree and wire it. You might have to drop down to the actual material rather than @Snarlygribbly's mathelper object but again that should be easy enough.

    [Edit] @Snarlygribbly made the source foir EZSkin3 public so you could even extend his internal objects



  • Just a CF here is the same hair using my @bagginsbill hair plugin at default but using the same colour and bump maps as the rebder above

    0_1548962685841_BBBase.png



  • @amethystpendant The script works well and looks good. Here are two renders, one with skydome only and the other with added area lights and backdrop.
    0_1548996481101_HairScriptTest.jpg


  • Poser Ambassadors

    @amethystpendant @ghostship
    Thank you for this awesome shader. Just render out an image and I am blown away. Pure awesome.


  • Poser Ambassadors

    Here I use the hairshader on Felicita hair on Lafemme.
    Love this shader.
    0_1549027381970_The smile smart copy.jpg



  • @ladonna Beautiful, I love your lights and colour palette!


  • Poser Ambassadors

    @kalypso Thank you. This the HDRI Spruit Sunrise from HDRI Haven with one Area light at the side where the HDRI sun comes from to give it more "sun shine look" .Scale 300 and Intensity 30%