Better skin shading

Please, i beg of you… get in touch with the guys at Marmoset, and get them to help you create a good skin shader, because the current solutions you have are terrible.

Are you sure? Because i dont think so. See the below screenshots.

*Disclaimer: These screenshots were created by The_Distiller. I dont take any credits for these. *

Yep, those are the best examples for a skin shader in the UE4. :smiley:

and yet they all come across as grey and lifeless, i can’t think of how to explain it other than, it just doesn’t feel “fleshy” or “alive”. his skin is grey, palid, and dead.

i think the biggest reason for that is that the shader itself (preintegrated skin) is a simple half lambert, it doesn’t have any kind of gaussian diffusion for the various colour channels (ie: red scatters further than green which scatters further than blue), it uses the same BRDF as it does for any other material (which is inaccurate, skin behaves quite differently).

this is the UE4 shader code for preintegrated skin:

		L = normalize( L );

		float OpacityFactor = InGBufferData.Opacity;
		float3 PreintegratedBRDF = Texture2DSampleLevel(PreIntegratedBRDF, PreIntegratedBRDFSampler, float2(saturate(dot(N, L) * .5 + .5), 1 - OpacityFactor), 0).rgb;
		return PreintegratedBRDF * InGBufferData.SubsurfaceColor * SubsurfaceExtinction;

the important part here is the “float2(saturate(dot(N,L) * .5 + .5), 1 - OpacityFactor)” it’s literally just a half lambert shader, there’s nothing uniquely “skin” about it.

Notice how much more alive the skin in this image looks?

that’s down to the different diffusion profiles used for each colour channel, along with normal smoothing.

The SSS probably does need some work.

@ryanjon2040 The screens you showed, as I said before in the other forum, they look too much like rubber skin. Doesn’t look like blood is flowing through the skin.

As good as that skin might look, Marmoset is a renderer, not a game engine, and doesn’t have all that extra overhead.

It is fully possible to use your own custom lighting models in UE4. Just select subsurface and plug your “node-code” into emissive. There were some good implementations in UE3, some of them hideously expensive though (like that D3D shader or whatever it was that used 6 blurred normal maps).

Epic did also state during the Rendering Twitch Stream that they are working on the skin shader.

Since Epic is already working on a better skin shader, we simply have to wait and make the best of what’s available right now. Here’s another effort of mine from a project soon to be released :]

Looks like you are having fun Distiller. ^^

Yeah, you might say that ;]

To be clear here, i’m not trying to say Distillers work is bad, it’s not. But i’m sure even he’d agree that the shader could use some love.

Also, while yes, marmoset is “just a renderer”, their method (or similar) of skin rendering is being used in quite a few different engines, take a look at things like the order 1866, or second son.

As far as i can remember Nick and Martin already said in the Twitch stream that SSS is going to be improved in the future.

I definitely agree Almighy_gir, the skin shader is far from a desirable state! I hope it’s improvements aren’t too far off!

I have an amazing skin shader, (not for public view yet), made entirely in UE4, so it’s possible if your artist’s know what they’re doing.
I never made mine, but got it from a kind gentleman on the UDK forums and he translated it for UE4

Can you post a screenshot of how it looks in engine?

Here’s SSS_test_01 and I’ll post more in a while. just tweaking the settings now.
As you can see, the ear is slightly transparent, as would be expected with SSS, but it’s now causing a problem with the beard, (looking like it’s overlaid, rather than blending) 936c80630aa8f622ff52c60a23613f257c7b1f33.jpeg

Another thing to note, I’m blending out the spec on the beard so it’s not shiny, (like the face) using a mask.

Here’s one from a different angle, 33c6f8e957a204a9ec7d1cdc62c619fbfd701bf7.jpeg

Gone a bit too far now with the settings, so many experiments are needed before it’s usable :wink:


Well well, this looks amazing!
Are you using baked maps ( for example from Zbrush ) for SSS or you’re using a mix of plain colors to get this effect?

The issue here is lack of full forward rendering path.
It’s just hard to pull off things like Opacity, SS and more importantly custom lighting model in Deferred Path.

I think some form of Forward Rendering path will come first (like Indexed Forward Rendering, Tiled Forward Rendering), and from that point on, there will be work on current shortcomings of rendering. Like translucency or skin.

As far as I remember from rendering stream, implementing those changes will take at least couple of months, since there a lot of research for possible solutions involved, then integrating and evaluation those solution withing engine. I honestly wouldn’t expect anything big earlier than August or September.

Skin is hard to do and the one thing I noticed is the over use of spectral lighting that tends to make the upper surface look like plastic and mask the sub-surface.

Skin adsorbs light and does not reflect it as a hard surface would. Would be a better choice to not use spec at all.

One of the things I remember from back in the bad old days before we had SSS in rendering packages was that you could get decent results by transforming the diffuse color based on the amount of light that’s falling on the surface. It’s not SSS but it can help a ton.

Generally shadowed areas should be ‘warmer’ and areas that are most well lit will tend towards yellow or blue.

The other thing to think about is driving some very soft specular highlights in a way that does NOT consider the micro normal map. You do get some spec off of things like pores and the like, but if you drive a big soft specular highlight that doesn’t consider the little bumps on the surface you kind of get rid of that waxy look.