Page 1 of 1

Making a fast and realistic skin material

Posted: Tue Dec 23, 2014 1:00 am
by OnoSendai
Hi all,
In this post I will document how to create a reasonably fast and reasonably realistic skin material.

This will be a sub-surface scattering (SSS) material, which is absolutely essential for capturing the properties of real skin.


Outer layer - Coating material

We will use a coating material for the top layer of materials. The coating material gives some specular reflection to the skin.

Roughness
I'm using a roughness of 0.7 currently for the coating, but you can tweak this. The best value will depend on several factors - how oily you want the skin to look (more oily should be a lower roughness), and the detail of your bump, normal or displacement map. In general, the more fine detail in your bump/normal/displacement map, the lower the coating roughness need be, as more of the spreading of the specular highlight will be done by the map-driven surface geometry.

Displacement
Displacement should be applied to the coating material, because the coating material is the top/parent material.

If your displacement map is 'grey-centered', which means that a grey value of half the maximum value, e.g. 128 out of 256 corresponds to no displacement, then you will want to have a negative c texture value, equal to -b/2.
For example, in my material, I have a c value of
c = -0.003, e.g. -3mm.
The b value is 0.006, e.g. 6mm.
The texture exponent (gamma) should be 1.
This means that a displacement map value of 128 (mid grey) will be mapped to a displacement of 0mm.
A displacement map value of 0 (black) will be mapped to a displacement of -3mm.
A displacement map value of 255 (white) will be mapped to a displacement of 3mm.

You may need to tweak these values - they may be a bit large for some displacement maps. It depends on how much of the texture value range is actually used by the displacement map.

Inner layer - Diffuse transmitter

Using a diffuse transmitter material as the inner layer is *slightly* less realistic that just using a single glossy transparent material for the whole thing, but speeds up rendering.

Diffuse transmitter colour map

The colour map for your skin, assuming you have one, should be applied to the diffuse transmitter material, in the 'albedo' parameter.

One very important thing is to make sure you set the texture exponent to 1.0 or 1.1, instead of the usual 2.2.
This is because multiplication by this texture will be performed twice, once as light enters the skin, and once as it exits.

The diffuse transmitter material should have an internal medium:

The skin medium

This is the medium in which the SSS takes place. We will use a uniform scattering coefficient (e.g. wavelength independent) for faster rendering. I am using a scattering coefficient of 5000 m^-1, e.g. a mean path length of 1 / 5000m^-1 = 0.2mm.

You can lower this value (e.g. to 1000 or 500) for faster rendering, but you will find the skin light starting to get quite 'blurry' as it scatters further under the skin.

The medium absorption spectrum gives a red colour for scattered light, simulating absorption by blood vessels.

Skull model
The renders below use a skull model below the skin, which is helpful in a couple of ways - it stops light from scattering right through the head in an unrealistic way, and it also speeds up rendering by stopping rays that hit it. It is recommended to use a skull model if you can.

Peformance
Even though I have called this a 'fast' skin material, it might be more accurate to call it a medium-speed skin material. It still uses unbiased multiple scattering SSS, just in a faster way due to the use of materials. Hopefully it should give a good trade-off in terms of accuracy vs rendering speed.

Download
You can get the skin material here: http://www.indigorenderer.com/materials/materials/1337

There are two placeholder textures - the displacement map on the coating material, and the colour map on the diffuse transmitter material. You should replace these with you own maps.

Some results
These are using the 'infinite head' model + textures courtesy of Infinite Realities Ltd.

Re: Making a fast and realistic skin material

Posted: Thu May 05, 2022 2:56 am
by Ascensi
I'm surprised you don't support custom SSS textures to define allowable areas and suggest using a skeleton instead. There is more that's in the way such as muscles.

Anyway, in other programs I mostly use Displacement textures as SSS maps since the lighter areas are elevation areas and are often thinner.

What I'm additionally interested in is transparency for use with SSS, I've created some pretty photorealistic waves with light hitting them from the back but there needs to be translucency to show something that might be inside it like a fish etc. Is this currently possible? I haven't seen any Indigo updates lately and makes me think Indigo is dead :(