Hair Shader works fine in Eevee but broken in Cycles

Issue #1641 resolved
zxz w created an issue

The first image is Cycles and the second image is Eevee.

I tried importing with BSDF and principled, both material methods resulted in this weird shading in Cycles.

Comments (15)

  1. zxz w reporter

    https://www.daz3d.com/natsuki-hair-for-genesis-8-females

    This is the hair that I used. I am not sure whether this hair has a custom shader or not, here is the surface tab for this hair.

    Although I did get error messages, I don't think they are about hair shaders.

    I am currently using Blender 3.6, but I tried with 3.5 and it is the same.

    Here is a blender file including only the hair: https://drive.google.com/file/d/1OrUmdPm14t41xg0LBA3-ieG2Pc1uLK6_/view?usp=sharing

  2. Alessandro Padovani

    daz studio 4.21.0.5, blender 3.6.0, diffeomorphic 1.7.1.1677

    Ok there are a number of issues.

    bug for Thomas. metal color with traslucency. There's a bug if we have metal with translucency, in this case the metallic color is ignored. Please note that 100% translucency ignores diffuse and this is ok the diffuse node is correctly pruned. But the base color is used also as metallic color if there's some metal and this is ignored.

    Test scene included metal-mix.duf, below iray then cycles as it is now.

    transparent bounces. The natsuki hair is very dense in terms of strands, so we need at least 64 transparent bounces for the light paths, while the default is 32.

    limitation. topcoat. The natsuki hair uses a weighted top coat to tint the hair, that is not currently supported. I really have to work on #1069 and get something out of it so we get a better support for the daz top coat. For now this is an intended limitation.

    To get the natsuki hair fine in blender you can turn off the translucency and top coat in daz studio, this will leave a nice tinted hair as shown below, it is also faster to render without translucency and top coat. But I promise to work on #1069.

  3. Thomas Larsson repo owner

    Fixed in last commit, for bsdf method. For the extended principled method there is nothing, because the translucency completely shadows the principled node.

  4. Alessandro Padovani

    Commit a76f382 works fine for bsdf.

    bug. principled translucency. For extended principled we can use mix = metallic. That is, the translucency only affects diffuse, not metal, this is how iray works. The single principled doesn’t support translucency so works fine.

    Please note that a metallic texture with a factor could be used and in this case it has to be plugged in the mix.

    # principled translucency
    mix = metallic
    

    errata corridge. Nope sorry I have to look better into this. Will let you know.

  5. Alessandro Padovani

    Ok I believe I got it.

    The setup is as below where we input the principled shader into the daz translucent group. This way translucency doesn’t affect metal but only diffuse, same as iray.

    Again please note that a metallic texture with a factor could be used and in this case it has to be plugged in the mix.

    # principled translucency
    daz translucent fac = iray translucency weight
    principled metallic = iray metallicity
    mix = iray metallicity
    

    errata corridge. I corrected for metallic = iray metallicity, I was previously convinced that it was squared but further tests shows it’s not, though the curve has something different. So this is my final revision. Sorry for the confusion.

  6. Thomas Larsson repo owner

    Implemented in last commit. The new setup is much simpler than the old one, especially when it comes to textures. Doing texture arithmetic is messy and error prone, so it is much easier if the factors correspond directly to iray channels.

  7. Alessandro Padovani

    The natsuki hair now works fine with the new top coat and metal fix. Both for bsdf and principled. Though the metallic curve is a little more bright in blender.

  8. Log in to comment