Page 1 of 2

Suggest improvements to skin shader

PostPosted: Wed Jul 31, 2019 8:42 am
by joepal
As you may have seen, I'm working on ways to improve the skin shader in blender. The idea is that when you use the makehuman plugin for blender to import online from makehuman, it should optionally add some extra nodes to enhance the skin material. It should also add some convenience nodes to make it easy to tweak the material without having to change the node setup.

I have now made a demo blend of how the skin shader currently looks with all defaults and caucasian middleage skin texture: http://www.makehumancommunity.org/conte ... hader.html

This is just the first working version. I could really use some help with suggesting changes to the node setup. For example:

* Different defaults for settings (particularly in the skin pore noise chain)
* Other features to add. It's perfectly possible to have optional features.
* Any other ways to make the skin more life like.

Note that if the incoming skin from makehuman has normal map or bump map, these will already be included in the node setup. That's why there's a gap in the middle of the setup: so normal map etc can fit in. But as we don't have official skins with normal/bump maps, I opted to not include this in the demo.

This is how the skin currently looks (as rendered from the demo blend above) :

newSkinMat-demo.png

Re: Suggest improvements to skin shader

PostPosted: Wed Jul 31, 2019 9:03 am
by joepal
And to avoid confusion, let me reiterate some points from the original discussion thread:

* This skin shader is blender only
* It is only added when using the MPFB importer, ie it's not available for MHX or any other format
* It is optional. If you don't enable it, you'll get the standard diffuse texture + principled setup
* No changes have been done to have materials are handled in makehuman as such

newSkinMat-option.png

Re: Suggest improvements to skin shader

PostPosted: Wed Jul 31, 2019 10:18 am
by ecke101
There could be an option for subsurface scattering outside of the "SkinGroup". I always add around 0.05 sss with a strong red color... That's what makes the skin come alive I think.
But other than that I think the goal should be to have it set up as a PBR-shader with standard textures for SSS, roughness and bump added.

edit: Actually, separate textures for the face and the body would not be such a bad idea either. The resolution should be higher in the face than on the body and that would solve the problem.

Re: Suggest improvements to skin shader

PostPosted: Wed Jul 31, 2019 11:58 am
by ecke101
I made a texture for SSS (based on a makehuman diffuse texture) that I can share. It should be multiplied with 0.15-0.20 or something like that I think for the best effect... see image below.

Capture.JPG

sss.png

Re: Suggest improvements to skin shader

PostPosted: Wed Jul 31, 2019 2:29 pm
by joepal
Thanks @ecke101. I've tested out this, with the following result:

newSkinMat-sss.png


This would make a great optional. Do I understand it right that you share the SSS texture under CC0?

As note to self: this makes it important to also take import scale into account: When importing on 1 BU = 1 meter, I had to multiply with 0.02 rather than 0.2.

Also, should probably have used a lighter red as SSS input color, as the skin darkened significantly comparet to the last render.

Re: Suggest improvements to skin shader

PostPosted: Thu Aug 01, 2019 12:49 pm
by ecke101
Hmm it seems a bit strange that you had to change the multiplier as that only affects the color of the texture.
Honestly I have very little knowledge about licenses but if that one means it's free to use without any limits and doesn't collide with MaheHumans' license in some way then that's the one.

Re: Suggest improvements to skin shader

PostPosted: Thu Aug 01, 2019 3:56 pm
by SaltyCowdawg
What radii did you use for the subsurface radius numbers?

Re: Suggest improvements to skin shader

PostPosted: Thu Aug 01, 2019 6:04 pm
by ecke101
@SaltyCowdawg I used the default numbers, (1, 0.2, 0).. Didn't even know what they did until I looked it up now and it seems the default is good for skin as it will reflect more red.

Re: Suggest improvements to skin shader

PostPosted: Fri Aug 02, 2019 7:11 am
by joepal
ecke101 wrote:Hmm it seems a bit strange that you had to change the multiplier as that only affects the color of the texture.


That was my bad. In the end I multiplied the radius with 0.1 rather than further decreasing the subsurface effect.

For further reference, the right side of this picture is how it looks if you use a radius which is inappropriate for the scale (it looks as if the character has a lightbulb in the armpit) :

newSkinMat-sss-artifacts-light.png


ecke101 wrote:Honestly I have very little knowledge about licenses but if that one means it's free to use without any limits and doesn't collide with MaheHumans' license in some way then that's the one.


Thanks. Yes, CC0 is basically "do whatever you want with it".

Re: Suggest improvements to skin shader

PostPosted: Fri Aug 02, 2019 8:36 am
by joepal
Anyway, I've incorporated ecke101's sss map as well as SSS settings as an optional part in the skin shader. At import time, the default is to not enable SSS, but you can tick an extra checkbox to get it:

newSkinMat-sss-settings.png
newSkinMat-sss-settings.png (5.14 KiB) Viewed 10228 times


With SSS enabled and all values at default, the result looks as this:

newSkinMat-sss-draft.png


Here's a blend file with the resulting node setup. Again, suggestions for improvements to node chains and default values are very welcome.

SkinDemoSSS.blend
(8.94 MiB) Downloaded 623 times