better dual lobe

Issue #25 resolved
Alessandro Padovani created an issue

tested with daz studio 4.12.0.86, blender 2.82, plugin commit 2c7b503

The actual dual lobe implementation is presented in #321 in the old tracker. That is conceptually fine but has differences with the iray dual lobe that we'll try to fix here.

https://bitbucket.org/Diffeomorphic/import-daz-archive/issues/321/

1. The first difference is in the fresnel effect. We implemented a daz fresnel custom group to better match the iray specularity and it works fine for glossy materials. But it doesn't seem to work for dual lobe. Luckily enough the default fresnel in cycles seems to work better though it's not entirely the same. So we can use it instead.

Below an example with roughness 1 and reflectivity 0. First iray, then the daz fresnel custom group, then the default fresnel.

Incidentally this comes with a simplification of the daz dual lobe custom group where we can use the default fresnel instead of the daz fresnel custom group. Please also note that I renamed the color channel to weight. We'll see why just below.

2. The dual lobe specular reflectivity in iray is not a specular color, it rather drives the ior. Below an example with specular reflectivity 0 then 1 in iray. That matches fine with ior 1.1 then 1.8 in cycles, that are the min max values we use for glossy materials.

So below are the new equations for the daz dual lobe custom group v2

weight = dual lobe specular weight
ior = dual lobe specular reflectivity * 0.7 + 1.1
roughness 1 = specular lobe 1 roughness
roughness 2 = specular lobe 2 roughness
fac = dual lobe specular ratio

Then below an example of the new dual lobe in action. I used the G8 Emiyo character because she gets a very aggressive use of dual lobe. First iray, then the old dual lobe, then the new dual lobe where I fixed the torso material. You can see it's not perfect because the fresnel effect is not entirely the same, but it is much better anyway.

So the new dual lobe together with the volumetric skin in #24 gets us decent iray skins at last.

Comments (4)

  1. Thomas Larsson repo owner

    Should work now.

    I also change the renamed weight socket to a float This led to an error, because Blender still remembered the old node group where it was a color slot, so I needed to restart Blender to avoid this error.

  2. Alessandro Padovani reporter

    Commit 8e95c18 works almost fine, there’s a minor issue. When the reflectivity texture is multiplied by a factor, the plugin doesn’t account for the factor. Below an example. Also it is possible to use the multiply add node to optimize a bit.

    Below the fix

  3. Alessandro Padovani reporter

    Commit e5fe4f6 seems to work fine, marking as resolved.

    As a side note the cycles dual lobe seems to work even better than the iray one. That is, the skin reacts better to lights with white reflections as a real skin does. Below an example with V8, first iray then cycles with the default hdri.

    Please also note the ear translucency that seems to work better in cycles as well. That is, iray scatters the translucency even outside of thin zones while cycles doesn’t.

  4. Log in to comment