Skin Material Improvements

Issue #1064 invalid
Midnight Arrow created an issue

While working on a character’s skin, I believe the default material import settings can be improved.

This is a render of the skin textures/settings in Iray:

This is default Blender import, tonemapped with the procedure I outlined in #1063:

The skin by default doesn’t look as “soft” as the Iray render. After performing test renders, I believe the scatter density (exported as 13333.3) is too high. Here is the same figure with a scatter density of 6000.0 and a scatter anisotropy (which I think mimics the SSS Direction property of the Uber shader) of 0.25 (increased from 0.0) to reflect light towards the camera more. The skin, especially the nose, looks softer and closer to the Iray render. The shadowed sections also have a more pronounced green tint, again closer to the Iray render.

Another problem is the dual lobe specular. By default it comes in too rough. Lowering both lobes roughness by 0.1 makes it match the Iray render better, judging by the rim lighting below the ear. But the highlights on the forehead and cheek are too bright and concentrated now. The fresnel doesn’t seem correct. It needs to be adjusted to spread the specular points out and soften them but fresnel isn’t even exposed in the material editor.

Full Iray settings:

Comments (9)

  1. Alessandro Padovani

    The material conversion is not intended to be “always perfect” if this is what you expect. It is intended to be “near enough” for most cases.

    Then of course you’re welcome to try to improve things. But we need equations to match iray and cycles with a wide sample of materials. Usually you go with testing the possible range of values in iray. Proposing changes on a single case material is meaningless, it may work for this material but not for another.

  2. Midnight Arrow reporter

    To dig deeper into these material issues, for the past few days I have been experimenting why a character I created appears so much brighter than the HDRIs I used to light her.

    This is Angharad 8, default export, same HDRI as before, https://polyhaven.com/a/delta_2. Cycles is a physically based renderer, it follows the conservation of energy. A material cannot be brighter than the light shining on it, yet we see these skins are much brighter and more saturated than the low contrast backgrounds, even though it is expected for a PBR renderer that the skin will take on the light (the HDRI) shining on it. This is not something tonemapping can fix, since it violates the laws of nature.

    When plugging a diffuse texture map directly into a diffuse shader, bypassing the exporter’s node tree, the texture is almost pure white. Unsuitable for use.

    The exporter uses gamma nodes set at 3.5 to boost the strength of texture maps, to increase the color detail.

    However the flaw here is that this gamma gain pushes the textures up out of the color range of the HDRI, violating the conservation of energy by making the skin material brighter than the light shining on it.

    Instead what should be done is to darken the textures with a hue saturation node. If we darken them by setting the value to 0.286 (the inverse of 3.5), then we also reveal the color detail, but in a way that keeps it within range of the HDRI.

    I have thrown together a shader based on this, and (per Alessandro’s request) tested it against a variety of HDRIs and characters from different PAs. The shader is not perfect at all, but in all cases lowering the diffuse texture by 1/3.5 made the skins fit the tonal range and contrast of the HDRI much better.

    HDRIs used:

    https://polyhaven.com/a/delta_2

    https://polyhaven.com/a/secluded_beach

    https://polyhaven.com/a/sunflowers

    https://polyhaven.com/a/urban_street_01

    Angharad 8 (Daz Original)

    Esme HD (Colm Jackson)

    (Top row, original face material with my shader on the body. Bottom row, all my shader.)

    SASE Brenna (Sabby/Seven)

    Evangeliya (iSourceTextures)

  3. Alessandro Padovani

    @Midnight

    I really do appreciate the passion you put into this.

    That said, your custom skin setup will not convert the daz skins. Using the textures with gamma correction is a workaround to use sss instead of the iray volumetric skin, that will mostly give different results than daz studio, but allows the users to easily edit/fix the skin and use the principled shader. Then sss was introduced for the bsdf option too under request by @Engetudouiti, that does more or less the same as your setup allowing the user to mix sss and translucency instead of using the volumetric skin.

    That personally I believe makes little sense because if the user wants to edit a custom skin then the way to go is to use the principled shader. Not to add sss to the bsdf option. But it doesn’t harm I keep it disabled that’s the default.

    As a last note, gamma correction of the textures has really nothing to do with energy conservation, it just “shifts” the texture colors.

    edit. p.s. I mean there are a lot of wonderful skin setups out there for blender, with multiple sss layers for a realistic skin effect. But they don’t convert the daz skins. Your setup doesn’t either. So why one would use your setup instead of another ? The choice is pretty vast and of personal taste.

  4. Midnight Arrow reporter

    The shader I made is a proof of concept for why my solution works. I think the principle behind it can be integrated into the current shader network. I am studying the Daz Uber shader to try and figure out how it works, so I can do better at reimplementing it inside Blender.

    The obvious reason to implement this fix is (as I mentioned at the beginning) every time you use an HDRI with the currently existing shader, your character will glow like a radioactive mutant. Their skin reflects far more light than exists in the environment, breaking the principles of physically based rendering. The skins must be toned down to look plausible, or else any properly made HDRI is useless.

  5. Alessandro Padovani

    Again, there’s nothing new in your setup. You can mix sss and translucency with the actual bsdf translucency group proposed by Engetudouiti, and check “fake translucency“ in the global settings to use the same texture for diffuse and translucency. That’s what you do. Then personally I believe using principled is better if one wants to make his custom materials, that’s what the principled option is for.

    Adding custom shaders to bsdf makes little sense since the bsdf option is intended for automatic conversion. That your setup doesn’t.

  6. Midnight Arrow reporter

    I’ve spent the past two days reverse engineering the Uber shader and comparing to the shaders made by Blender Foundation for their open movies.

    @Alessando You are correct the exporter preserves the Uber shader accurately. Issue is, the Uber shader is itself bad (or encourages bad practices among PAs). Its diffuse plus translucency workflow introduces an unacceptable level of darkening and contrast into the skin textures so it becomes unusable with HDRIs or physically based rendering at all. The same issue persists inside Daz Studio. Changing the skin shaders to scatter only and turning the translucency down helps match the skin tone with the HDRI better, but it’s not ideal since the SSS effect wasn’t made to work without translucency.

    So yes, this is a “technically correct” export of Daz Studio’s flawed, non-PBR method.

    I will be making my own shaders from now on, based on the Blender Foundation skin shaders, rather than waste more time dealing with Daz3d’s sloppy work.

  7. Alessandro Padovani

    Yes iray is sloppy at PBR compared to cycles, in that it allows for a series of non-pbr features that unfortunately most PAs are keen to use. I totally agree the skin shader in iray isn’t optimal, and that most PAs don’t understand the iray materials. But don’t tell to the daz PAs 😂😜 .

    The skin shaders you get from the blender artists are certainly better than iray, especially those with multilayer sss. But again there are a lot of them so it’s a matter of personal taste and they don’t convert the daz skins.

  8. Alessandro Padovani

    we don't add custom shaders because they don't convert iray and there's the principled option for editing materials

  9. Log in to comment