Preamble: This series of blog posts is a braindump of some parts of my short journey in real time skin shading for my Master thesis, supervised by Dr. Tim Weyrich.
A part of my studies that fascinated me quite a lot was the biological background used in skin shading. Not sure if this aspect receives much love in games (let me know if you actively do use these concepts!), but I can see lots of potential, especially from an authoring point of view.
As a necessary disclaimer: I am not a biologist and although I love biology as any other science, my knowledge is fairly limited, so please correct me if I wrote something stupid 🙂
Main responsible for light absorption, and therefore for the skin colour, are chemical compounds called chromophores. There are two influential types of chromophore: Melanin and Haemoglobin.
Melanin is the pigment that most influences the skin colour and it is mostly found in the upper layer of the skin, the epidermis.
We can identify two types of them; the eumelanin is a dark or brown pigment and the pheomelanin that has a lighter, reddish-yellow colour.
Intuitively, a high concentration of melanin is found in dark skin where it is mostly eumelanin; on the contrary, in lighter skins such as the Asian or Caucasian ones, there is much less melanin and there is an higher percentage of pheomelanin.
Haemoglobin, found at dermis level, is a protein responsible for the transport of oxygen and produces a pink-purple nuance on the skin. Small amounts of heamoglobin correspond to a pale effect on skin colour, while an high concentration makes the skin appear more pink/red.
Chromophores in Computer Graphics
Wait, do we care about that much biology? As CG community we know that to correctly represent the world we have to study it thoroughly, so it should come at no surprise that to develop skin appearance models, looking at biological parameters can be useful.
[Donner and Jensen 2006] proposed a spectral shading model which permits the manipulation of chromophores via three parameters: Haemoglobin fraction, Melanin Fraction, Melanin type blend (that describe eumelanin/pheomelanin ratio) + they add a parameter for skin oiliness for the specular contribution.
These parameters are then embedded in the multi-pole model [Donner and Jensen 2005]. I described roughly the model in the previous post, but the important bit to remember here is that it describes a multi-layer material where each layer has a characteristic absorption coefficient. The model proposed by [Donner and Jensen 2006] has two layers, the epidermis with an absorption coefficient dependent on melanin factors and the dermis layer, where the absorption coefficient is dependent on the haemoglobin fraction. I’ve put the exact formulas at the bottom of the post.
This to me has a great importance. We can define the biologically-correct diffusion profile for any target we want!
But hey, don’t we use albedo textures? Yes, and they also contain fine scale details we want to preserve. The issue is that albedo textures include overall colour data and therefore melanin and haemoglobin pigments are already embedded. If we want to get our colour from chromophores, we must normalize the albedo colour by dividing each texel by the assumed total diffuse reflectance
Where R(r) is the diffusion profile we found using the assumed chromophores information.
This work is taken forward by [Donner et al. 2008], where they introduce more physiological parameters and make them spatially-varying (whereas in [Donner and Jensen 2006] spatial variation is limited to the use of an albedo modulation texture). This paper is truly great, I am not going deeper into it for the sake of brevity of the post, but check it, it is well worth a read.
But that is not all. Skin colour varies constantly, also very rapidly. Think about it, we blush, we look pale, we get red after some exercise etc. A great model for this variation is proposed by [Jimenez et al. 2010] . Even to a non-biologist like me, it is clear that all of the variations I mentioned are depending on the blood flow and what is in blood that influences most the skin colour? Oh well, our dear Haemoglobin of course! So the great contribution of [Jimenez et al. 2010] is the proposal of a colour appearance model with spatially-varying haemoglobin distribution that allows appearance transfer between characters.
The key observation made to propose this model was that for a wide range of appearances the haemoglobin distribution is close to a Gaussian one. Starting from an acquired or painted neutral haemoglobin map, various emotions or states can be simply modelled with a bias + scale. This way they transform a neutral distribution to any desired combinations:
With the same idea of usual blend shapes. Each blend shape has its own set of scale/bias textures and the weights used for these are the same used for classic animation rigs.
Note that because of the low frequency nature of these info, we can efficiently store scales and biases in low resolution textures, how convenient!
Once we have all our infos about chromophores, [Jimenez et al. 2010] provides us with a great precomputed table that we can use to extract albedo colour from melanin and haemoglobin maps/distributions:
I strongly suggest you to go and read the full paper, it has lots more details on the model and a great description of the acquisition phase.
SSS and specular from a biological POV
In the epidermis (i.e. outermost layer) the cells’ membrane, some elements in the nucleus and cytoplasmic organelles are the main scatterers; these scatterers are well separated one another, therefore the whole epidermis contribution can be approximated with a single scattering event.
Wait! I told you in the dipole post that we can ignore the single scattering! Yes. I did, and I still stand my ground. As I said previously in this post, the epidermis is the main responsible for absorption, but most of the scattering in fact occurs at the dermis (the layer under the epidermis). Here the main scatterers are collagen fibres that scatter in forward direction. These scatterers are so densely packed that the multiple scattering events can be seen as isotropic even if single fibre scattering events are not. And this should explain my claim on the dipole post that it is fine to approximate subsurface scattering as a diffusion phenomenon.
On skin, surface reflection is primarily caused by a thin layer formed by an oily liquid called sebum and by lipids. Also the morphology of wrinkles has an impact on the specular aspect of the skin.
The distribution of these factors changes across the face, causing varying specular properties. A thorough study of such variations can be found in [Weyrich et al. 2006]. For my thesis I did use the information in the paper baking roughness and scaling factor ( ) for the Cook-Torrance BRDF in a texture
Sadly I don’t have great comparison pictures any more, this is the best I am left with:
The left image is using the same parameters (cheeks’ ones) for the whole face, the right picture is using spatially varying parameters. Note that I think there is something a bit off with the lips in this picture, as they should have a bit stronger specular.
That’s all from today’s biology lesson 🙂 This is a short overview of some of the many biologically-based skin appearance models made by a lowly (non-biologist) programmer. I found these aspects fascinating when I studied them, so I hope someone else found this post moderately interesting 🙂
To the next one!
– Francesco (@FCifaCiar)
Absorption coefficients for dermis and epidermis ( [Donner and Jensen 2006] )
The wavelength dependent absorption coefficients for the two different types of melanin (eumelanin and pheomelanin) are:
Then we need to define the baseline absorption coefficient from small tissue in the epidermis as:
So that finally we can define the absorption coefficient for epidermis as:
Where defines the melanin type blend (eumelanin/pheomelanin) and is the melanin fraction.
For the dermis absorption coefficient we have:
Where is the blood oxygenation ratio between oxy and deoxy-haemoglobin; this varies very little and in [Donner and Jensen 2006] is fixed at 0.75. Note that haemoglobin has different absorption behaviour if it is oxygenated or deoxygenated. is the fractional amount of haemoglobin in the dermis.
Reference and Acknowledgements
An obligatory reference not directly mentioned in the post has to go to the technical report The Appearance of Human Skin [Igarashi et al. 2005] . It is a bit long, but it has lots of interesting informations.
[Donner and Jensen 2006] : DONNER, C., AND JENSEN, H. W. 2006. A spectral BSSRDF for shading human skin. In Rendering Techniques 2006, 409–417.
[Donner et al. 2008]: DONNER, C., WEYRICH, T., D’EON, E., RAMAMOORTHI, R., AND RUSINKIEWICZ,S. 2008. A Layered, heterogeneous reflectance model for acquiring and rendering human skin. In ACM Trans. Graph. 27, 5, 140:1–140:12.
[Jimenez et al. 2010]: JIMENEZ, J., SCULLY, T., BARBOSA, N., DONNER, C., ALVAREZ, X., VIEIRA, T., MATTS, P., ORVALHO, V., GUTIERREZ, D., AND WEYRICH, T. 2010. A
practical appearance model for dynamic facial color. In ACM Trans. Graphic. 29,
[Weyrich et al. 2006]: WEYRICH, T., MATUSIK, W., PFISTER, H., BICKEL, B., DONNER, C., TU, C., MCANDLESS, J., LEE, J., NGAN, A., JENSEN, H. W., AND GROSS, M.
2006. Analysis of human faces using a measurement-based skin reflectance model.
ACM Trans. Graphic. 25, 1013–1024.
Also many thanks to my supervisor Tim Weyrich, who is certainly an authority of this field and who taught me a lot.