• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Daz Subsurface Scattering: How it Works

MidnightArrow

Member
Aug 22, 2021
496
415
In the course of reimplementing the Uber shader inside Blender (https://f95zone.to/threads/blender-art-show-us-your-blender-skill.72143/post-8534140), I discovered a lot of technical detail about it that isn't covered or is poorly explained by Daz's documentation and other internet sources. Since subsurface scattering is one of the densest parts (no pun intended), here's a "simple" breakdown of how it works.

To start with, a 3d object is divided into a surface and a volume. The surface is the mesh, the volume is inside the mesh. Usually the volume is a void but it can have stuff filling the space like fog. 3d engines use BSDFs or bidirectional scattering distribution functions to calculate light striking surfaces. If light bounces off a surface, that's done by a diffuse BSDF. If it goes into the surface, that's done by a translucent BSDF. Neither of these can do anything about light passing through the volume, only light hitting the surface. So if you use a translucent BSDF the light will get blurry on the surface but move through the volume in a straight line. Uber shaders like Iray's are just very complicated networks of BSDFs chained together with variables to tell it how much "weight" each BSDF should add to the overall look of the object.

For first stage of human skin, the surface, Daz Studio uses a diffuse-translucent mix controlled by the translucent weight option. If base color effect is set to Scatter Only then it's a simple linear mix between the diffuse (base color) BSDF and the translucent BSDF. If it's set to Scatter & Transmit it does some Photoshop blend modes to darken the base color texture by the translucency weight and create a mask for the translucent BSDF to better simulate light entering the skin. Scatter & Transmit is good for giving skin softness but Scatter Only can be used if you like the "harder" airbrushed glamour model look of Mousso characters. Scatter & Transmit Intensity does the same thing as Scatter & Transmit but brightens the texture back up to the level of Scatter Only. So if you have a Mousso figure and want to enable Scatter & Transmit, you set it to this instead so your texture map doesn't get five shades darker.

The Daz docs mention complicated stuff like "lets light into the transmission layer" or "absorbs the remainder of the reflectance" and so on, these are only fancy ways to say "a diffuse BSDF is diffuse and a translucent BSDF is translucent". The diffuse BSDF (the base color map and it's tint and the SSS reflectance tint too) is the light that reflects off the surface, the translucent BSDF (the translucent map and its tint) is the light that passes through the surface into the volume.

The problem with this method, translucency is meant for paperthin objects like leaves to let light shine through. Since the translucent BSDF cannot control light inside a volume the blurred light will shoot straight through and come out the other side. Some models by Cherubit have this problem if you put a bright light behind them, they light up like a fucking gummy bear. Iray doesn't have real subsurface scattering, it fakes it using volume shaders to "consume" the light a few centimeters into the surface. That means every Daz figure is basically a giant leaf wrapped around a very dense fog.

This is why SSS is so fucking complicated.

The transmitted measurement distance is how far light can go into the volume before it stops and turns into the color you set as transmission color. When light hits the surface, the translucent BSDF lets it in as white light (assuming the light isn't tinted). But skin absorbs different wavelengths of color differently. So eventually it turns into the transmission color inside the volume at the distance you set for transmission (in centimeters, but the new 8.1 skin shader uses meters instead). Internally it uses exponential decay to imitate light losing energy, so it starts strong but peters out the deeper it penetrates. So if you transmission distance is 1cm and your transmission color is blue, the skin will be very blue since the absorption is just below the skin surface. But if distance is 100cm (a whole meter, longer than all but the girthiest of human torsoes), you will see pretty much the translucent effect as if the transmission was off, since the distance is now very so far inside the skin, the light entering hasn't lost energy yet.

Practically this means the transmitted distance is how far you want your subsurface bits to glow. You set your translucent weight how you want it (say 0.5), that lets light pass though the skin surface into the volume. You set scattering to 0 and use transmission distance to find the sweet spot where the translucent color goes deep enough to make the ears and nose glow, but the main body doesn't. The absorption volume "eats" the light sent in by the translucent BSDF and stops it from continuing out the other side. Since the translucent color and the transmission color are mixed together, if both are similar like both strongly red, transmission color won't do shit and the light will carry on through (the Cherubit problem). In fact many Genesis 3 figures have very deep red tints for their translucent maps which ruins the SSS effect due to the math of mixing them with transmission color. The translucency color should be a tint, you shouldn't try and darken the whole map with a value like (0.4, 0.0001, 0.0002). Just set this to a nice peach for caucasian skin like (1.0, 0.29, 0.17). The transmission color should be a nice blue tint since you're trying to cancel out the translucency after a certain depth, you need to counter it.

The SSS Reflectance Tint is an "extra" RGB multiplied against the base color. It does the same as setting the base color directly, it's just a convenience so you can keep your base color pure white. If you make this pale blue (like 0.3, 0.45, 0.45) it'll tint the skin blue and help you see the pink translucent light passing through better.

Finally the scattering is where the real skin tone comes from. When the light enters skin it loses forward movement and "scatters" in all directions, making the rosy glow we see. The only difference between mono and chromatic mode is, mono mode reuses the translucent color for the glow and chromatic lets you add another tint. The SSS Amount controlling the strength becomes SSS Color which is an RGB value, but it's still internally does the same math against the distance to calculate the effect. Scattering distance is the point inside the skin the light scatters. You'd think it was same as transmission distance but due to the convoluted way SSS is handled, it's not. The transmission distance factors in the skin bits you want to be seethrough, scattering distance doesn't. This should be lower, like one half to one fifth (in centimeters, remember), from the transmission distance. Finally SSS Direction is which way the light tends to scatter. Negative numbers are back the way it came so a value of -0.5 is good here.

You may be asking now what a "good" method for SSS is. And the answer is: there is none. Using a translucent shader to make a character seethrough and a fog volume to stop the light going through is such a fundamentally strange way of doing it, I can't say there is any "good" way. This is all hacks to make it seem Iray is suitable for character renders when it really isn't, since they didn't bother putting subsurface scattering as its own BSDF into the engine. For the best (of the limited) options, it's a matter of deciding how soft you want a figure's skin to be and what color it should glow with base color effect, translucency weight, and translucency color. The "subsurface scattering" part is all figuring the measurements in the volume to return the translucency color back out the way it came.
 
Last edited:

stabrepete

Member
Dec 5, 2020
163
926
I discovered a lot of technical detail about it that isn't covered or is poorly explained by Daz's documentation and other internet sources.
I feel like daz is the most used under documented program ever. ive been using it on and off since the V4 days and all of the advanced stuff there is almost no info.
 

pollenart

Newbie
Apr 19, 2019
92
217
You didn't buy enough NFTs, so Daz Staff aren't gonna get off their asses. Assuming there are any people working for this company, I view that company as run by a skeleton crew, probably a front of some kind. We'll never know.
 

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,292
I know you have me muted but you will read it anyway.
Volume & translucency barely isn't new concept (execpt you came from Blender I guess).
You completely miss the Transmitted color and how it's central into Uber/SSS.
That's where real weirdness is lol (and your basic control like radius and density).

The current design is conceptually wrong. SSS is controlled by SSS Amount not translucency weight.
No
 
Last edited:

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,292
Since my post was a bit obscure.
Pay close attention to HSV value. It's not just a color (It is but hey. Maybe the most underlooked values).

nJG79N2lhk.png
 
Last edited:

MidnightArrow

Member
Aug 22, 2021
496
415
You didn't buy enough NFTs, so Daz Staff aren't gonna get off their asses. Assuming there are any people working for this company, I view that company as run by a skeleton crew, probably a front of some kind. We'll never know.
It's a front for the CEO's crypto investments, probably. I like to think he sits in his office all day watching the crypto value plummet, a bottle of vodka in one hand and a loaded pistol in the other.
 
  • Haha
Reactions: pollenart

Deleted member 1121028

Well-Known Member
Dec 28, 2018
1,716
3,292
Sounds like nobody cares.

One thing you should try is set your (V) value (of HSV) to 255. Then 254, then below 240 (iirc) to picture how it works.
Ofc keep your Tranlucency quite high (~.75). (S)aturation control SSS density, (H)ue the SSS tint.
 

OsamiWorks

Member
May 24, 2020
186
194
This is a really long write up, with subsurf scattering you just need to monke brain more

"Number low, glow under skin weak, like plastic,

number high, glow under skin strong like radiation poisoning"