SSS Radius Default Setting

Issue #17 closed
Arie Leo created an issue

I noticed that the material created by the import plugin, on the Subsurface Scattering node the radius setting for all RGB channel are 0.0001.
Can we get the default setting for the SSS radius as follows?

R = 1.0
G = 0.35
B= 0.1

This is the SSS radius that used by default on Arnold Subsurface Scattering Shader which give a nice scattering on render

Comments (14)

  1. Alessandro Padovani

    I’m actually doing some tests on sss searching for a good match with iray. As for blender 2.82 and below it seems the chromatic radius only works fine for primary colors, that is, red green blue cyan magenta yellow. Any combination outside primaries gives odd results. So I’d rather go with pure red if we want a natural reddish sss.

    But this also have to match with iray so it may not be a fixed value at all, since iray gets its own chromatic sss too. Though I see that on common characters it tends to use a reddish tint. That includes almost any G8 character. While conversions from G1 to G3 gets the mono sss so no tints there.

    This is just to say that’s not that easy.

    Also in my tests iray seems to be a real dual-layer sss so I don’t know how far we can go with cycles .. may be it’s better to stay on practical cases instead of general conversion and do some tricks to match the common characters.

    https://blender.stackexchange.com/questions/73581/real-multilayer-sss-in-cycles

  2. Alessandro Padovani

    It seems that most issues with the chromatic radius go away if I use random walk instead of christensen. Also using the branched path tracing seems to deliver much better results in far less iterations. So these could be the recommended settings to deal with sss in cycles.

    Below a chromatic issue I have with a blue tint that goes away with random walk. You see a preview but it’s the same in the final rendering with far more iterations. It seems christensen can’t converge with certain tints.

  3. Thomas Larsson repo owner

    I finally got around to do something about this. There is now an option in the Materials settings to use the Arnold defaults. By default the radius in the duf file is used. It only matters if the volumeteric method is set to SSS.

    There seems to have been some confusion about the scale. The importer changed both the Scale and Radius slots of the SSS node with the global scale factor. This must be double counting, and now only Scale is changed. In the principled node the SSS radius is still scaled, since it has no overall scale slot.

    There were also a bunch of 0.1 factors in the code, which are now removed. The internal units in DS is centimeters, but apparently I thought that the SSS radius was defined in millimeters. Since G8F use the radius = 0.12, it has to be centimeters.

  4. Alessandro Padovani

    In my opinion it doesn't make much sense to use the arnold settings. First because arnold is another engine with a different implementation of sss so what works fine in arnold doesn't necessarily gets the same results in cycles. Second because the uber shader has already its sss radius and scale so we should try to convert those instead of using other values.

    An approximate equation that makes some sense is below. But since iray uses true volumetrics and not sss, this is a very rough approximation.

    cycles sss scale = iray scattering measurement distance / 100
    if iray chromatic mode
        cycles sss radius = sss color /* rgb components */
    else if iray mono mode
        cycles sss radius = sss amount /* "gray" value but can be greater than 1 */
    endif
    

  5. Alessandro Padovani

    UPDATE. In relation with #384 in the old traker that's the sss volumetric option, the translucency weight has to be taken into account to approximate the iray skin. Below there's what the plugin does with the Victoria 8 skin as example both for the bsdf and principled options. That's good enough but doesn't take into account the sss color. Also note that for the principled shader the scale is baked into the radius.

    Then I may suggest to use the following equations that should be fine with #384 and also take into account the sss color, plus the scale is always baked into the radius for better consistency.

    # for sss volumetric plus principled
    cycles sss color = translucency color
    cycles sss scale = translucency weight
    if iray chromatic mode
        cycles sss radius = sss color * scattering distance / 100  # rgb components
    else if iray mono mode
        cycles sss radius = sss amount * scattering distance / 100  # "gray" value but can be greater than 1
    endif
    
    # for sss volumetric plus bsdf
    # here the mix factor is used instead of the scale to match the principled shader
    cycles sss mix =  translucency weight
    cycles sss color = translucency color
    cycles sss scale = 1
    if iray chromatic mode
        cycles sss radius = sss color * scattering distance / 100  # rgb components
    else if iray mono mode
        cycles sss radius = sss amount * scattering distance / 100  # "gray" value but can be greater than 1
    endif
    

    Please note that in the equations above for the bsdf nodes the mix factor is used intead of the sss scale since this seems to be the only way to get a rough equivalence with the principled shader.

    Below some tests with various degrees of scattering distance and translucency weight. First principled then bsdf. Blender scene included.

    Again this only relates to #384 that's the sss volumetric option. If thin walled is on there's no volume and translucency can be used instead of sss as for #389 and #395, thus getting a good match with iray. Since the sss volumetric option stills a rough approximation of the volumetric skin and may work or not depending on the skin.

    https://bitbucket.org/Diffeomorphic/import-daz-archive/issues/384/
    https://bitbucket.org/Diffeomorphic/import-daz-archive/issues/389/
    https://bitbucket.org/Diffeomorphic/import-daz-archive/issues/395/

  6. Thomas Larsson repo owner

    OK, I think that this has been implemented. Although my test case only has mono mode, so the chromatic mode remains untested. Some questions:

    1. Iray SSS radius is completely gone from the equations now. Is that ok?
    2. To get the cycles SSS radius, you divide by 100. Is that conversion from centimeters to meters, or is there some other reason for that factor?
    3. What if there is iray SSS but no translucency? In that case your equations give no cycles SSS.

  7. Alessandro Padovani
    1. What do you mean by iray sss radius ? I can only see a color/amount and a scattering distance there. That are both taken into account.
    2. Yes it is for conversion from cm to m.
    3. If there’s no translucency then there’s no sss. That is, iray needs translucency for sss to work. Thin walled off means either solid glass if refraction weight = 1, or sss if translucency > 0. Then if we got both refraction and translucency it seems glass wins. That is, the translucency color seems to have no effect on glass. Then if both refraction and translucency are zero then thin walled off does nothing.

    Anyway that again is a very rough approximation because we can’t replace volumes with sss so I guess we have time to improve things. But that’s a start. Going to check the new commit.

  8. Thomas Larsson repo owner

    Sorry, some of my functions had misleading names, or rather a mix of the BLender and Daz names. So the function that gets the scattering measurement distance was actually called SSS radius. The name confusion actually caused a bug.

  9. Alessandro Padovani

    As far as I can test commit 063715d seems to work fine we could mark as resolved. Though this may be hard to test extensively I tried to check the main cases. I still believe that the arnold option doesn’t make much sense but it doesn’t harm either.

  10. Log in to comment