Ghostship's superfly hair shader

  • Poser Ambassadors

    Conversely specific proof that Mix is wrong and diminishes the output by half is here:

  • Poser Ambassadors

    And just in case any more noobs have ideas about Scatter, let me reiterate this:

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


  • For those who are new to Cycles / SuperFly i can recommend ’The Cycles Encyclopedia’. A well made ebook (comes in three languages) that does not only explain the shaders but also gives you some information on how the render engine works and what the different rays types are all about (camera -, gloss -, diffuse ray etc.). Don't worry, you don't have to have a master in mathematics to read it :-)

  • Bill, would you ADD refraction + diffusion?

    TranslucentBsdf is pretty much a RefractionBsdf node with roughness value 1.
    You can even build tricky-glass settings with TranslucentBsdf.

    I would not be contradicting you if I hadn't done literally a thousand tests already.

    There is also the fact that human hair is translucent and doesn't lambertian diffuse.
    In your hair shader you already use AnisotropicBsdf to render the internal (colour) refraction.
    The DiffuseBsdf simply isn't part of human hair.
    But it's perfect for synthetic, cosplay wigs, which btw are not translucent.

    I must also warn everyone the AnisotropicBsdf in your hair shaders is missing an important bit and that's part of what's making it look wrong, because for some reason the Cycles AnisotropicBsdf node does not do UVmap tangents unless you explicitly tell it to do so.

  • @noobalien Show us the shader, you've shouted but not provided any proof. 3D is at best an approximation of reality.

  • @amethystpendant
    I'll try render some scenes and material room captures with all the bits that I've used to make a shader. It's a bit complex because it uses a PBR set up to control the first specular, then it calls back the IOR for the second specular and then it goes to the third transmission element which in this case is a TranslucentBsdf.

  • 0_1548899179176_monster.png

    Here's the spaghetti monster in all its noodly glory.
    It only uses two image maps: one for transparency and one for colour.
    This one has a Clay node (DiffuseBsdf is the same) which lets you choose whether you want natural hair or synthetic fibers.
    I've tested every stage of the shader hundreds of times and I'm quite confident on its accuracy but of course it would be excellent if anyone can debug and improve it.

  • This post is deleted!

  • 0_1548899905916_Translucent_Shader_Translucent.png
    This is obviously translucent because you can still see the cylinder props behind the plane.
    It's the starting set up when you want to render a plastic packaging, a shower curtain, baking paper, wet translucent clothing...

    Add both, the effect is lost:

    This is why you don't add both DiffuseBsdf and TranslucentBsdf.

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

    I'll create a new version with those as defaults and also the fix for the bump map (actually it wasn't an issue in my plugin, it was that the bump was being reset by EZSkin3 before my shader was added, because I was using the same bump and colour map the change to the original also affected mine, it didn't happen if the bump map was different (I think it might be because it is also feeding the reflection channel and those are checked after the data ones so it might have been set correctly, then incorrectly))

    Well I just got LF set up with one of Biscuits hairs that I love playing with as far as "style", so when you have a new version of your hair shader, I'd like to play with it, because even with a material set by, I think, didiPixel, there's still no burned in shine. ;)

  • Let's see under backlighting:

    You can still see the prop shapes and you can still guess their colour.

    But once you add both DiffuseBsdf and TranslucentBsdf, something unexpected happens:

    Diffusion spills reflected light back to the light source, reflecting and illuminating props!
    You can see how it simply looks wrong.

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

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


    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:

    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.