"SSS Direction" -- What Does It Do?

margravemargrave Posts: 543

I spent the past few days searching for a solution (that doesn't involve post-work) to the blue UV seams that appear when using spectral rendering.

And to my surprise, I discovered the solution is as simple as setting "SSS Direction" to -1.0.

But now the question becomes, what is SSS Direction?

After reading the official doc pages, I get it's like the normal vector of the scattering effect. But I don't get what that means in practical terms, and I have no eye whatsoever for whether a skin shader is realistic or not. Is -1.0 a good value? Is it too waxy or ashen? Why does it make the blue UV seams go away if the SSS is facing directly outward? Is this basically just a roundabout way of disabling SSS completely?

Post edited by margrave on

Comments

  • Richard HaseltineRichard Haseltine Posts: 70,075

    I believe -1 is literally back scattering, 1 is forward scattering, and intermediate values are off-axis.

  • FishtalesFishtales Posts: 5,269

    SSS Direction - This property is used to determines whether the surface scatters toward or backwards from the light. 0 is Isometric, or almost no scattering - like water. Negative numbers (-) backscatter to the direction of the light source. Positive numbers (+) forward scatter away from the direction of the light.

  • Richard HaseltineRichard Haseltine Posts: 70,075

    Fishtales said:

    SSS Direction - This property is used to determines whether the surface scatters toward or backwards from the light. 0 is Isometric, or almost no scattering - like water. Negative numbers (-) backscatter to the direction of the light source. Positive numbers (+) forward scatter away from the direction of the light.

    Thank you, I was unsure (and wrong) on the meaning of intermediate values

  • FishtalesFishtales Posts: 5,269

    Richard Haseltine said:

    Fishtales said:

    SSS Direction - This property is used to determines whether the surface scatters toward or backwards from the light. 0 is Isometric, or almost no scattering - like water. Negative numbers (-) backscatter to the direction of the light source. Positive numbers (+) forward scatter away from the direction of the light.

    Thank you, I was unsure (and wrong) on the meaning of intermediate values

    I got it from the Document Centre :)

    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/interface/panes/surfaces/shaders/iray_uber_shader/shader_general_concepts/start ;

  • margravemargrave Posts: 543

    Richard Haseltine said:

    I believe -1 is literally back scattering, 1 is forward scattering, and intermediate values are off-axis.

    So how much scatter should a realistic skin shader have? What's the consequence of going too far towards -1.0? And how does reorienting the direction solve the visible UV seams issue?

  • AnimAnim Posts: 179
    edited April 8

    margrave said:

    And how does reorienting the direction solve the visible UV seams issue?

    I am not sure if the direction does help at all. According to my tests the Transmitted Color seems to be the root cause. But I only tested with the standard ubershader not the new skin stuff and only with a simple test scene. It might be that it does not work for other situations.

    As long as the Transmitted Color is pure gray (R,G,B channels are all set the same) it seems to be ok.

    011_seam-issue.jpg
    359 x 355 - 29K
    011-b_seam-issue.jpg
    600 x 400 - 65K
    011-c_seam-issue.jpg
    600 x 400 - 106K
    012_seam-issue.jpg
    359 x 356 - 27K
    012-b_seam-issue.jpg
    600 x 400 - 66K
    012-c_seam-issue.jpg
    600 x 400 - 104K
    Post edited by Anim on
  • AnimAnim Posts: 179

    Regarding the SSS Direction:

    I am trying to understand that as well.

    • it is most obvious if the facing surface does not receive much direct light and the angle of the incoming light is relevant as well
    • higher values emphasise the transmitted color (at 1 the scattered color seems to be gone)
    • lower values emphasise the scattered color
    • it reacts to a lot of the other surface settings

    I don't have an answer for a "standard" value regarding skin. Some write -0.63 but I think the textures and the other SSS and translucency setting have such a heavy influence that there is not a standard value at all.

    The filenames of the attached renders explain the change in the sss direction. E.g. 001_sss-dir_-1.0.jpg ".  ... dir_-1.0" ... means SSS Direction = -1

     

    000_sss-dir.jpg
    729 x 756 - 93K
    000-b_sss-dir.jpg
    902 x 631 - 27K
    001_sss-dir_-1.0.jpg
    600 x 400 - 103K
    002_sss-dir_0.0.jpg
    600 x 400 - 102K
    003_sss-dir_0.5.jpg
    600 x 400 - 104K
    004_sss-dir_1.0.jpg
    600 x 400 - 102K
    005_sss-dir_-1.0.jpg
    600 x 400 - 82K
    006_sss-dir_0.0.jpg
    600 x 400 - 74K
    007_sss-dir_1.0.jpg
    600 x 400 - 74K
    008_sss-dir_-1.0.jpg
    600 x 400 - 65K
    009_sss-dir_0.0.jpg
    600 x 400 - 65K
    010_sss-dir_1.0.jpg
    600 x 400 - 61K
    011_sss-dir_-1.0.jpg
    600 x 400 - 93K
    012_sss-dir_0.0.jpg
    600 x 400 - 92K
    013_sss-dir_0.9.jpg
    600 x 400 - 97K
  • nonesuch00nonesuch00 Posts: 14,936

    So if it's scatters towards the light that means if reflective and aways from the light refractive? Or at least superficially seeming so?

  • margravemargrave Posts: 543
    edited April 8

    Anim said:

    Regarding the SSS Direction:

    I am trying to understand that as well.

    • it is most obvious if the facing surface does not receive much direct light and the angle of the incoming light is relevant as well
    • higher values emphasise the transmitted color (at 1 the scattered color seems to be gone)
    • lower values emphasise the scattered color
    • it reacts to a lot of the other surface settings

    I don't have an answer for a "standard" value regarding skin. Some write -0.63 but I think the textures and the other SSS and translucency setting have such a heavy influence that there is not a standard value at all.

    The filenames of the attached renders explain the change in the sss direction. E.g. 001_sss-dir_-1.0.jpg ".  ... dir_-1.0" ... means SSS Direction = -1

    I've been doing more research, and based on my (admittedly-limited) knowledge of SSS I think "SSS Direction" is sort-of like the dot product of the light rays hitting the skin.

    At 1.0, they go straight through with no scattering.

    At 0.0, they are perpendicular to the light rays, and aligned with the surface they're hitting, forming a circle with maximum scatter.

    At -1.0, they are perfectly reflected and travel straight back out with no scattering.

    If that's correct, then I think--think-- the ugly SSS seams are the result of the scattering. Based on some Blender answers for a similar problem and some griping about Iray bugs on other softwares' message boards, I don't think Iray recognizes that the surfaces are supposed to be one mesh. It thinks the arm ends at the shoulder, and that blue seam is caused by the scattering bleeding past where Iray thinks the arm "ends", as if there was an edge there. Hence, when you set the SSS Direction to -1.0, there's no seams because all the light rays are being reflected exactly back the way they came without any scattering.

    Post edited by margrave on
  • margravemargrave Posts: 543

    Anim said:

    margrave said:

    And how does reorienting the direction solve the visible UV seams issue?

    I am not sure if the direction does help at all. According to my tests the Transmitted Color seems to be the root cause. But I only tested with the standard ubershader not the new skin stuff and only with a simple test scene. It might be that it does not work for other situations.

    As long as the Transmitted Color is pure gray (R,G,B channels are all set the same) it seems to be ok.

    I tried the (0.99, 0.99, 0.99) trick with Aiko 8, but unfortunately it made her face no pasty white with vivid red lips like a geisha. So unless I figure out how to counter that, it's a no-go, I'm afraid. 

  • AnimAnim Posts: 179
    edited April 9
    Hence, when you set the SSS Direction to -1.0, there's no seams because all the light rays are being reflected exactly back the way they came without any scattering.

    I am not sure but there seems to be more involved. In the below render the dir is set to -1 but the seam is still there if transmitted is not a pure gray walue.

    Which shader are you using - iray uber or the new one that came with G8.1 ?

    014_seam-issue.jpg
    363 x 261 - 20K
    014-b_seam-issue.jpg
    600 x 400 - 105K
    014-c_seam-issue.jpg
    600 x 400 - 83K
    Post edited by Anim on
  • margravemargrave Posts: 543
    @Anim I used the default Aiko 8 materials, and I also tried it with an iSourceTextures figure, Ingeborg. I'll have to experiment with it some more when I get a chancd tomorrow.
  • PaintboxPaintbox Posts: 1,244

    This article is very enlightening :

    https://www.fxguide.com/fxfeatured/pixar-deep-dive-on-sss-siggraph-preview/

    All about SSS

  • AnimAnim Posts: 179

    Informative article. I read it in the past but forgot about it. This time I bookmarked it and understood what it is about smiley

     

  • SevrinSevrin Posts: 5,405

    I picked up Skin Shading Essentials Tutorial | Daz 3D a while back, and it got into a great amount of detail about what all the various settings do and how they interact with each other.  Turns out there's a lot to this skin business.

  • nonesuch00nonesuch00 Posts: 14,936

    Anim said:

    Regarding the SSS Direction:

    I am trying to understand that as well.

    • it is most obvious if the facing surface does not receive much direct light and the angle of the incoming light is relevant as well
    • higher values emphasise the transmitted color (at 1 the scattered color seems to be gone)
    • lower values emphasise the scattered color
    • it reacts to a lot of the other surface settings

    I don't have an answer for a "standard" value regarding skin. Some write -0.63 but I think the textures and the other SSS and translucency setting have such a heavy influence that there is not a standard value at all.

    The filenames of the attached renders explain the change in the sss direction. E.g. 001_sss-dir_-1.0.jpg ".  ... dir_-1.0" ... means SSS Direction = -1

    Oh, so it is like I thought. Very good explanation and examples you made!

  • AnimAnim Posts: 179
    edited April 11

    Sevrin said:

    I picked up Skin Shading Essentials Tutorial | Daz 3D a while back, and it got into a great amount of detail about what all the various settings do and how they interact with each other.  Turns out there's a lot to this skin business.

    Yes indeed smiley The more I test the more questions I have. But I start to get it. Its quite interesting how the shader parts work. And it seems the way they influence each other is complex but not a miracle (the MDL handbook helped to get a more in depth understanding http://mdlhandbook.com/).

    Post edited by Anim on
  • AnimAnim Posts: 179

    nonesuch00 said:

    Oh, so it is like I thought. Very good explanation and examples you made!

    Thanks, I could share the scene if somebody is interested and tells me how to export it so other can use it. I found save as scene asset but am not sure if that works regarding the obj files and pathes.

  • cajhincajhin Posts: 152

    Interesting topic, and thanks for the renders.

    I can only contribute link to the source spec: https://raytracing-docs.nvidia.com/iray/mdl/specification/MDL_spec_1.6.2_05Aug2020.pdf

    It says in 21.3 Volume Scattering: "directional_bias– Influence of light direction on scattering. Range:[1,1], with 0 specifying isotropic behavior,1 forward scattering, and1 back scattering."

    My understanding: this is a bias, so it sets a probability for the direction of a scattered light ray. 0 does *not* mean 'no scattering', but 'scattered totally randomly'. -1/1 reduces SSS to simple transmission(?)

  • AnimAnim Posts: 179
    edited April 11

    According to my tests scattering always happens. Even at dir = +1 or -1 the sss and translucency have influence. It never acts like transmission without scattering. The dir indeed controls whether the light scatters away from the light source or to the light source. At -1 it scatters to the light, at +1 it scatters away from the light and values inbetween mix the direction accordingly. I think that is also what you said, right?

    This testing is boring (and I am still scratching my head about some things), but I start to have fun in making materials with less guessing and endless trial and error smiley

     

    020_volume_back-light.png
    600 x 425 - 217K
    021_volume_front-light.png
    600 x 425 - 202K
    022_volume_side-light.png
    600 x 425 - 187K
    023_volume_side-light.png
    600 x 425 - 203K
    024_volume_back-light.png
    600 x 425 - 250K
    025_volume_front-light.png
    600 x 425 - 201K
    Post edited by Anim on
Sign In or Register to comment.