Page 1 of 1

Contribution - advanced SSS shader

PostPosted: Wed Jan 14, 2015 4:48 pm
by magicman
Hiya!

Lets work together on this one! I've created an advanced SSS shader. To use : plug in diffuse texture, also a specular texture would be nice but I don't know of one so I use a flat value for now. Plug in a bump map I know there is one floating around. You can also plug in the sweat map (needs more node work) and plug in the tan map (seems to work okay). Make sure the SSS value is set to 1.0.

Please give comments!

--edit--

Cruel fate does not allow blend attachments... How can I upload?

Re: Contribution - advanced SSS shader

PostPosted: Wed Jan 14, 2015 5:41 pm
by magicman
Here is an example. We seem to be lacking in textures. Does any one know of a good "specular" map?

Re: Contribution - advanced SSS shader

PostPosted: Wed Jan 14, 2015 6:35 pm
by SaltyCowdawg
magicman wrote:Cruel fate does not allow blend attachments... How can I upload?



Perhaps just post screenshot(s) of the node setup? I've been working on a SSS shader myself to some success.

Re: Contribution - advanced SSS shader

PostPosted: Wed Jan 14, 2015 6:49 pm
by magicman
Unfortunately the node set up is quite complex.

That will not stop me from posting it anyways! Basically how it works

1)The diffuse texture is split into 3 different textures by manipulating RGB curves,
- a basic diffuse pass through,
- a below skin fatty layer (yellowish)
- deep scattering (reddish with more tex blur)
and combined

2) Fresnel based 2 layer relections

3) Various added parameters such as "tan" and "sweat" maps.

mhmat_ss1.jpg

mhmat_ss2.jpg

mhmat_ss3.jpg

Re: Contribution - advanced SSS shader

PostPosted: Thu Jan 15, 2015 2:40 pm
by SaltyCowdawg
dude! You've gotten further along than I have. I like the fatty layer addition as well Great idea. How do you adjust for ethnicity differences? For instance your fatty layer is going to be "less yellow" for a fillipino character and more so for a Japanese character just to name two that come to mind.

Shouldn't the sweat layer's visibility be driven by lighting and not a static map? In my distant memory working in my father's photography studio I remember we went to great lengths to change light angles to minimize glossiness when doing portrait photography.

OBTW: I've yet to completely figure out how to duplicate photo studio lighting *correctly* in Blender. I can come really close but trying to bounce light off of a surface doesn't always work the way I'd expect it to.

Re: Contribution - advanced SSS shader

PostPosted: Thu Jan 15, 2015 3:38 pm
by SaltyCowdawg
sss-v08-node-setup.PNG
Experimental SSS MH Skin Shader


Since you showed me yours I'll show you mine.... :-)

I got an inspiration by a post by petege who I don't seen having posted since, but my main criticism of what he had was a lack of SSS shading in their setup. So I started with that they had and built on it and I'm still tweaking on it. Also reading articles around the internet on various blogs and such I brought what I was reading back to my humble experiments.

Here is what I get for a result keeping everything as neutral as possible.

sss-shader-current-tech.png


I like what I have but it isn't completely optimal in my opinion. Later today I'll try to graft some of your ideas into my own setup and see it improves on it.

Re: Contribution - advanced SSS shader

PostPosted: Thu Jan 15, 2015 9:50 pm
by SaltyCowdawg
mh-sss-study-201415-1645-checkpoint.png


Here I've added all the elements of your shader to mine minus the two speculars. I might get around to adding them later tonight but SWMBO has me shopping for faucets tonight.

Re: Contribution - advanced SSS shader

PostPosted: Fri Jan 16, 2015 4:16 pm
by SaltyCowdawg
Looking at the two speculars I am not sure I understand what you are doing. Seems you're using the output of the Fresnel input node as a color to be mixed with the specular color? How does that work?

Re: Contribution - advanced SSS shader

PostPosted: Sat Jan 17, 2015 4:39 pm
by Aranuvir
Hi magicman,

the rendering result of your shader is very impressive. Perhaps make the skin a little bit smoother.
I'd like to try out your node set up, but the second image of the node set up is mostly illegible.

Re: Contribution - advanced SSS shader

PostPosted: Tue Jan 20, 2015 7:53 pm
by magicman
SaltyCowdawg wrote:Looking at the two speculars I am not sure I understand what you are doing. Seems you're using the output of the Fresnel input node as a color to be mixed with the specular color? How does that work?


Hey,

The way it's working is using the grayscale colour value of fresnel, and multiplying with the color of the specular map. So its using colour of the gloss shader is the "strength" of the reflection effect.

The deepest shading node is taken from another example of a sum of gaussian based SSS shader. I basically encapsulated that into my own.

I use my sweaty map in another thread to add sweat beads. It is to be "added" with the bump channel to make the sweat beads bump out.

I use the a tan map I quickly painted in blender, but it can also be used to add freckles. So I combine a voronoi noise texture with color ramp to make tiny dots, and apply them to the tan map channel. Note that the tan map only affects the top and second layer of the skin (perhaps should only affect the top).

And I'm not 100% sure but I don't see why the middle layer should be different colour for different skin type. As far as I am aware, the darker skin is only on the top layer caused by melanin. That being said, in practise, I used the top 2 layers (tan map).