1 Introduction

Creating realistic looking scenes is an important goal in computer graphics. In particular, in the real-time games industry, one can observe an increasing trend towards realism. Despite this, ageing effects such as rotting, are often neglected. This is particularly noticeable in the way corpses are depicted in game worlds, which show no signs of decay and tend to simply disappear from the world after a while. Simulating these post-mortem appearance changes can have a significant impact on the perceived realism of a computer generated scene.

There are a number of different processes that affect the post-mortem appearance of a body. We concentrate on simulating the process of skin discolouration after death caused by blood pooling, which is referred to as livor mortis [41]. The blood flows through the human body via the vascular system, which is made of blood vessels of varying size arranged in an irregular network. This network reaches into the lower layer of the skin. The skin colour is affected by the haemoglobin, a red chromophore found in red blood cells and melanin, a brown chromophore found in the outer skin layer. To model livor mortis we require a simulation of the haemoglobin transport after death on a volumetric representation of the body. In addition to this, a skin shader is required, one that is capable of accounting for the colouration change caused by the internal blood dynamics.

The approach presented in this article consists of:

  • a haemoglobin transport simulation on an irregular tetrahedral mesh

  • a layered skin model that accounts for the influences of melanin, haemoglobin and oxygen levels on skin colour.

The internal layers of the human body are represented by a tetrahedral mesh whose edges are used to create a network that loosely represents a vascular system. The tetrahedral mesh allows for a fast and simple haemoglobin transport simulation that is able to capture both the early patchy appearance of the skin and the eventual pooling of red blood cells in the lower lying areas. The skin is represented by an outer melanin layer and an inner haemoglobin layer. Both layers will be rendered individually and then convolved using an approach based on diffusion approximation. The transport simulation affects the haemoglobin saturation in the lower skin layer, which in turn affects the skin colouration. Texture maps are used to specify the absorption and reflection of the melanin layer. The diffuse colour of the haemoglobin layer is obtained from a lookup texture with respect to the haemoglobin saturation and oxygen values. We apply our method to a model of a human arm and a human head in different positions and scenarios that allow us to demonstrate effects such as blanching and fixation of hypostasis during livor mortis. The synthesised images are compared and contrasted to photographs of livor mortis. To the best of the authors’ knowledge, there are currently no publications observed in the computer graphics literature describing a simulation of livor mortis.

1.1 Related work

1.1.1 Weathering and decomposition

Object weathering and decomposition is an emerging area of research in computer graphics. These processes can be divided into chemical, mechanical and biological weathering (growth, life cycles, skin ageing) [13]. We present some related work in weathering and decomposition in this section. For a more extensive overview of state-of-the-art methods on object weathering and decomposition see Mérillou and Ghazanfarpour [37] and Frerichs et al. [14].

Chemical weathering includes corrosion, tarnishing, fading, combustion and phase changes. Layered height or thickness values have been used to represent the different material layers of metallic objects, which allows for the modelling of patinas and rust by adding or removing material from the top layer [4, 12, 36]. Dorsey and Hanrahan [12] and Mérillou et al. [36] do not simulate the physical phenomena causing the changes in the metal’s appearance. Instead, a random starting point is found from which spreading can be controlled by fractal surface growth models [12] or random walk [36]. In contrast to this, Chang and Shih [4] introduce a simple water current model that affects the tendency of a surface to rust and the rust distribution to simulate rusting of metallic objects in seawater. There have been efforts on constructing general surface weathering simulations using particles to carry and deposit weathering inducing materials [6, 17]. Combustion [20, 35, 50] and phase changes [15, 31, 33] have also been addressed in literature. More work has been done in the area of mechanical weathering, such as peeling and cracking [8, 38], and erosion and deposition [1, 25, 26, 39, 47].

Biological weathering is still relatively unexplored and little work has been done in the area of rotting and withering of organic objects [14]. Kider et al. [28] and Liu et al. [32] simulate the rotting of heterogeneous organic objects such as fruit. As fruit is made of different layers, similar to a human body, a layered model is used to represent the object. The fruit’s skin can be represented by a surface mesh that acts as a mass-spring system which can be used to model the wrinkling deformations. For the internal flesh Kider et al. [28] choose a similar polygonal representation that is deformed by a mass-spring system, whereas Liu et al. [32] choose a tetrahedral mesh whose vertices function as a finite element discretisation. Our object model is based on the one presented in [32]. Texture maps that hold nutrient and soft rot information on the object’s surface can be used for a reaction diffuse model to guide fungal growths [28]. Liu et al. [32] simulate the rot spreading into the internal flesh layer starting from the object’s surface. The processes causing livor mortis (i.e. blood pooling) are happening inside the body and affect the surface appearance from inside. Liu et al. and Kider et al. simulate dehydration in the internal flesh layer, but this does not follow the same dynamics as the blood pooling in a body after death. Jeong et al. [21] focus on the withering of leaves. Similar to blood transport in humans, water in the leaf flows through the leaf’s veins. In the method described by Jeong et al. the deformation and discolouration of the leaf is controlled by osmotic water flow. A layered model is used to represent the leaf, where the edges are the leaf’s veins and the vertices hold information on water content and solute concentration. Changes in the water content at each vertex drive the changes of the morphology and shading of the leaf. The dynamics of red blood cells after death are controlled by gravity and do not follow the same fluid dynamics as the one used on the Jeong et al. [21] method. Furthermore, their approach only considers thin shell objects, whereas we aim to simulate blood pooling on a volumetric object. Simulating the affects of ageing on akin, such as wrinkling, has also been addressed [3, 48].

1.1.2 Skin shading

When simulating livor mortis the different light reflection and absorption properties of oxygenated and de-oxygenated blood need to be considered, as well as the blood distribution and light attenuation of the outer skin layers. There have been a number of approaches in skin shading that consider the components responsible for skin colouration, namely melanin and haemoglobin [18]. Methods that consider the haemoglobin impact on the skin colour represent the skin in layers with different reflectance and transmittance profiles [10, 11, 16, 30]. These layers usually represent the epidermis (melanin) and dermis/bloody dermis (haemoglobin) layer. They do not consider time-varying haemoglobin distribution.

Iglesias-Guitian et al. concentrate on the optical properties of skin ageing due to changes in the chromosphere concentration that are caused by the thinning of the dermis and epidermis [19]. Jimenez et al. [22] use texture maps to specify the haemoglobin distribution over a human’s face. The skin colour at a given point is retrieved from a texture map using the melanin and haemoglobin amounts as a uv-coordinate. The haemoglobin distribution varies with the emotion the face is displaying. For this, a haemoglobin histogram is constructed from in vivo measurements of haemoglobin distribution during six different emotions. We, on the other hand, require the haemoglobin distribution to correspond to internal blood dynamics and oxygen levels which are not considered in any of the methods above.

2 Biological background

2.1 Blood composition

The human body holds between four and six litres of blood, which is spread through the body via the vascular system [43]. Around 55 % of blood is blood plasma, which is mostly water (90 %). The other 45 % of the blood is red blood cells which transport oxygen through the body using the protein haemoglobin. Haemoglobin is what gives blood its red colour. Blood is of bright red colour if oxygenated and turns a darker shade of red if deoxygenated. Visually, the most important parameters that control the colour of blood are the volume percentage of haemoglobin (haematocrit) and the oxygen saturation in blood [49].

2.2 Skin composition

Skin consists of two layers, the epidermis (outer layer) and the dermis (inner layer). The main substances responsible for the skin colouration are the brownish chromophore melanin and the red chromophore haemoglobin. Haemoglobin is transported into the dermis layer of the skin via blood vessels, whereas melanin resides in the epidermis layer. The epidermis can be divided into five sublayers with varying melanin concentration. The melanin concentration and distribution in the epidermis layers determines the skin shade, where more melanin results in a darker skin (we assume a uniform distribution of melanin between the epidermis layers) [18]. Haemoglobin on the other hand gives the skin a pink to reddish complexion. This is particularly noticeable in light skin with lower melanin content. Melanin is a high absorber which increases towards shorter wavelength, resulting in more red light being absorbed than blue. This is one of the main reasons that deoxygenated blood appears bluish or purple when seen through the skin [29].

2.3 Livor mortis

Livor mortis, also called hypostasis, is one of the earliest signs of death, occurring within a few hours of passing away. The first visual signs, that can appear as early as 30 min after death, consist of a patchy appearance of the skin with some areas of pinkish colour and others of pale complexion (see Fig. 7a for a photograph showing this). These areas then enlarge to form red/pinkish colouration at low lying areas of the body and a pale one elsewhere [41]. Figure 6a shows an example of the discolouration called livor mortis. These aforementioned colouration changes are caused by the internal blood dynamics after death. When the heart stops, the red blood cells move downwards under the influence of gravity. This results in blood pooling in the blood vessels on the lower lying areas of the body, causing discolouration [34]. The colour of the blood-filled areas depends on the oxygen saturation of the blood, which decreases over time. Oxygenated blood is bright red, whereas deoxygenated blood is of a darker red, but appears blue or purple through the skin. When pressure is applied to the skin surface, blood is pressed out of affected areas and they appear pale. After around 8–12 h the blood vessels break down and the blood leaks into the surrounding tissue, staining it. At this point the areas of discolouration are fixed and do not change if pressure is applied or the body moved.

3 Layered model

The human body is made of different components that are affected by decomposition in a variety of ways. Flesh decomposes at a higher rate than bones. Skin tends to wrinkle as the internal flesh decays and turns leathery [9]. In the case of livor mortis we need to differentiate between the different skin layer, flesh and bones, as blood flow does not occur in the bones and the epidermis. Some of the major processes in human body decomposition are internal processes that affect the surface appearance from the inside, such as putrefaction. This is also the case with livor mortis, which is caused by internal blood dynamics which affect the skin appearance. We require a volumetric representation of the interior which allows the simulation of blood pooling inside the object. Our representation is based on the Liu et al. [32] model for withering objects. The skin is represented by a triangle surface mesh and the internal components, such as flesh and bones, by a surface aligned tetrahedral mesh. Both layers are connected by tracking springs that connect a skin node to the underlying tetrahedral boundary face [32]. For our simulation we consider a body made of bones, flesh and skin, though a more complicated body with organs is also possible with our model.

Representing the skin as a surface mesh has a number of advantages. For example, it can be used as cloth-like simulation for wrinkling dynamics as shown in [28, 32]. For our livor mortis simulation a surface mesh representation also has rendering advantages as it allows the use of texture maps to specify skin reflectance and transmittance properties as well as high surface details. Moreover, polygonal surface representations are often used in real-time applications.

Modelling the internal volume with a tetrahedral mesh allows us to align the tetrahedral boundary with the skin layers, which would not be possible with a voxel representation. This simplifies the construction of tracking springs because the tetrahedral boundary faces and the triangle mesh have matching geometry. The tetrahedral nodes hold simulation parameters such as blood capacity, haemoglobin content and oxygen saturation. This permits different materials to be represented by varying the simulation parameters. Bones are differentiated from flesh by assigning zero blood capacity to all bone nodes, thus preventing blood from moving through the bone volume.

Tetrahedral edges, where both nodes have a non-zero blood capacity, are able to transport haemoglobin. The network formed by these edges can be thought of as the vascular system, as it allows the transport of haemoglobin through the volumetric object. The edge network does not match a vascular system exactly, but its irregularity results in similar visual effects. Using the same method on a more regular volumetric representation, such as a voxel structure, would result in an even discolouration, which is not representative of the real world phenomenon in question. Tetrahedralisations tend to generate smaller tetrahedra around boundaries and larger elements in the interior of the mesh. This would result in shorter edges (blood vessels) with smaller blood capacity at the boundaries. However, we do not believe this to be an issue as a similar phenomenon can be observed in the vascular system of the human body. Blood vessels inside the body are large and become smaller towards the boundary. The skin layer receives haematocrit and oxygen saturation information from the tetrahedral mesh using the tracking springs (see Sect. 5).

Fig. 1
figure 1

a Triangle meshes representing the boundaries of the object’s layers act as input from which the layered model is generated. b The model consists of a skin layer (triangle mesh) and internal bone plus flesh layers that are represented by a tetrahedral mesh. Both layers are connected by springs

As input, the simulation takes a triangle mesh representing the skin and further triangle meshes representing additional internal layers, as shown in Fig. 1a. We used two triangle meshes, one representing the skin layer and another representing the flesh-bone boundary. Both layers are then used to construct the tetrahedral mesh representing the internal structure. The triangle mesh representing the object’s outer boundary is used as a thin shell representation of the skin. Figure 1b shows our object model representing skin, flesh and bone layers. A texture map for the skin is required that represents the melanin distribution on the object for rendering. An additional texture map can be used to model the effects of small blood vessels in the dermis layer (Sect. 5.2).

4 Blood dynamics

4.1 Initial set-up

The internal volume is represented by a tetrahedral mesh, where each node has a maximum blood capacity and can hold an amount of haemoglobin and oxygen. At the start of the simulation the initial blood capacity is defined by the user to be between 0 and 1. This allows some nodes to be treated as part of the vascular system (blood capacity > 0) and others not (blood capacity \(=\) 0), such as in the case of bones. Each node’s blood capacity needs to be corrected so that they are representative of the even blood distribution in the body.

For this we first compute the average volume of all tetrahedra surrounding a node to represent a node’s volume share. Blood is then distributed over all nodes relative to both their volume share and the blood capacity set by the user. The average of the volume is used instead of the sum, to avoid boundary nodes incorrectly receiving less blood than internal nodes. The total blood capacity for each node is then:

$$\begin{aligned} c_{i} = \frac{V_{i} M_{i}}{\sum _{j = 1}^{n}V_{j}} b \end{aligned}$$
(1)

where \(c_{i}\) is the node’s blood capacity, \(M_{i}\) is the initial blood capacity of the node (1 for flesh, 0 for bones), \(V_{i}\) is the average volume of the tetrahedra surrounding the node, b is the total amount of blood and n the number of tetrahedral nodes with non-zero blood capacity. Initially, the haemoglobin content h per node makes up 45 % of the blood, hence:

$$\begin{aligned} h_{i}(0) = 0.45c_{i} \end{aligned}$$
(2)

where \(h_{i}(0)\) is the haemoglobin content of node i at time 0. Additionally, a texture map can be used to change the blood capacity of boundary nodes to reproduce visual effects caused by the small blood vessel in the dermis. This will be described in more detail in Sect. 5.2.

4.2 Haemoglobin transport

When the heart stops pumping blood through the body the blood plasma ceases to flow through the veins. Since the blood plasma is no longer in motion, advection of the red blood cells by blood plasma can be ignored. This means that the driving factor in the cells’ movement is gravity and can therefore be, described by diffusional sediment (hillslope) flow. The discolouration of the skin is a result of the chromophore haemoglobin carried by the red blood cells. We simulate the haemoglobin transport in the veins by gradually transferring haemoglobin along the tetrahedral edges to approximate diffuse sediment flow.

Each blood vessel node i has one or more blood vessel(s) connecting it to neighbouring nodes \(j \in \varOmega _{i}\), where \(\varOmega _{i}\) is the set of all nodes connected to i by an edge. The haemoglobin transfer between two nodes is governed by the following equations:

$$\begin{aligned}&h_{i}( t + \varDelta t) \nonumber \\&\quad = h_{i}(t) + \varDelta t \left( \sum _{j \in \varOmega _{i}} h_{ji}(t+ \varDelta t ) - \sum _{j \in \varOmega _{i}} h_{ij}(t+ \varDelta t ) \right) \end{aligned}$$
(3)

where \(h_{i}( t + \varDelta t)\) is the unfixed haemoglobin content of node i at time \(t+\varDelta t\) and \(h_{ij}(t + \varDelta t)\) is the amount of haemoglobin transferred from node i to node j defined as:

$$\begin{aligned} h_{ij}(t + \varDelta t) = \min (\lambda _\mathrm{h} c_{i}, h_i(t)) \frac{\tau _{ij}}{\sum _{k \in \varOmega _{i}} \tau _{ik}} \end{aligned}$$
(4)

where \(\lambda _\mathrm{h}\) is a user defined haemoglobin transport rate. \(\tau _{ij}\) determines the proportion of haemoglobin node j receives from node i:

$$\begin{aligned} \tau _{ij}= {\left\{ \begin{array}{ll} \delta _{j} \displaystyle \frac{(\hat{\mathbf {g}} \cdot \hat{\mathbf {v}}_{ij}) + 1 }{2} &{} \quad \text {if } \hat{\mathbf {g}} \cdot \hat{\mathbf {v}}_{ij} > 0 \\ 0 &{} \quad \text {otherwise }\\ \end{array}\right. } \end{aligned}$$
(5)

where \(\hat{\mathbf {g}}\) is the unity gravity vector and \(\hat{\mathbf {v}}_{ij}\) is a unit vector from the position \(\mathbf {p_{i}}\) of node i to the position \(\mathbf {p_{j}}\) of node j. \(\delta _{j} = c_{j} - h_{j}(t) - f_{j}\), where \(f_{j}\) is the fixed haemoglobin in node j explained in Sect. 4.5.

Here the term \(\delta _{j} (\hat{\mathbf {g}} \cdot \hat{\mathbf {v}}_{ij})\) simulates the movement of haemoglobin due to gravity. This is based on the diffusional sediment flux described in [42]. Hence the haemoglobin transport \(h_{ij}\) is proportional to the negative gradient of \(\mathbf {v}_{ij}\) and the space available in node j. The red blood cells are more dense than the plasma they sit within. Therefore, to more accurately simulate the movement of the sinking red blood cells through the vascular system, the transport rate is mapped onto the (0.5, 1) range with the term \(\frac{(\hat{\mathbf {g}} \cdot \hat{\mathbf {v}}_{ij}) + 1 }{2}\). This effects greater horizontal movement to account for the red blood cells that are still suspended and have not sunk to the bottom of the blood vessel (or those being pushed by other red blood cells) and, therefore, are able to move along horizontal edges more easily.

To begin with, the blood distribution is even over all nodes but, due to the varying blood capacities, some nodes empty or fill up faster than others. This is what causes the patchy appearance at the beginning of the simulation, which has also been observed at the beginning of the livor mortis phenomenon as described in [41].

4.3 Oxygen dissociation

The oxygen levels in blood reduce over time. This is characterised by the oxyhaemoglobin dissociation curve (ODC). The ODC relates the oxygen saturation of haemoglobin to the partial pressure of oxygen in the blood, which can be described by a sigmoid plot. We use the Kelman [27] routine to convert the oxygen tension to oxygen saturation:

$$\begin{aligned} o_{i}(t + \varDelta t) = \frac{ a_{1}p_{i} + a_{2}p_{i}^2 + a_{3}p_{i}^3 + p_{i}^4}{ a_{4} + a_{5}p_{i}+ a_{6}p_{i}^2 + a_{7}p_{i}^3 + p_{i}^4} \end{aligned}$$
(6)

where \(p_{i}\) is short for \(p_{i}(t + \varDelta t)\) and refers to the partial pressure of oxygen at node i, which we define as

$$\begin{aligned} p_{i}(t + \varDelta t) = \rho (t + \varDelta t) \frac{h_{i}(t)+f_{i}(t)}{c_{i}} \end{aligned}$$
(7)

with

$$\begin{aligned} \rho (t + \varDelta t) = \rho _{i}(t) - \varDelta t \lambda _\mathrm{o} \end{aligned}$$
(8)

where \(\lambda _\mathrm{o}\) is a user defined constant that controls the oxygen tension decline rate and \(a_{1},\ldots ,a_{7}\) are constants described in [27]. Figure 3c shows the internal blood dynamics inside the tetrahedral mesh. With the oxygen level in the blood decreasing over time, the blood turns deep red.

4.4 Blanching

Pressure induced blanching is the pale discolouration of skin where pressure is applied, for example with a finger or due to contact with a surface. The blood capillaries are compressed which results in blood being forced out. After livor mortis has become fixed (see Sect. 4.5), applying pressure to an area affected by livor mortis will not show any blanching effects. Figure 10 shows a photograph of pressure induced blanching.

Neyret et al. address blanching effects in surgery simulation, where a medical instrument exerts pressure on an organ’s surface [40]. To mimic pressure induced blanching a semi-transparent white disk is drawn into an effects texture at contact point. The effects texture is then combined with the skin and shading textures to achieve the whitening effects. This method gradually reduced the contribution of blood to the organ’s colouration by enlarging the white disc. This work does not model any underlying blood dynamics that would move the blood into the surrounding tissue. This means the blood and its contribution to the skin colouration is lost. Instead, we simulate blanching by reducing the blood capacity of affected nodes which forces the haemoglobin to move into neighbouring ones.

Aside from the blood capacity \(c_{i}\) that represents the maximum blood capacity a node can hold, a second variable \(a_{i}\) specifies the available blood capacity. \(c_{i}\) stays static throughout the simulation, after it has been initialised by Eq. 1. The available blood capacity \(a_{i}\) is reduced or increased relative to the pressure applied to or relieved from the affected node. During the haemoglobin transport, the available blood capacity \(a_{j}\) is used to determine whether and how much haemoglobin can be moved to node j. As such, \(\delta \) in Eq. 5 becomes:

$$\begin{aligned} \delta _{j} = \left( a_{j} - h_{j}(t) + min(0, a_{j} - c_{j} - f_{j})\right) \end{aligned}$$
(9)

Fixed haemoglobin is not affected by blanching, and can therefore fill up the whole capacity \(c_{j}\) of node j, hence the term \(\min (0, a_{j} - c_{j} - f_{j})\), that only considers fixed haemoglobin that exceeds the difference between the maximum and the available capacity.

When pressure is applied, the available capacity of every affected boundary node is set to 0. The available blood capacity of non-boundary nodes is linearly reduced according to their distance to the pressure object. Haemoglobin is pushed out of affected nodes according to the pressure direction. Haemoglobin transport due to pressure is as in Eq. 4 but with \(\tau _{ij}\) replaced by

$$\begin{aligned} \omega _{ij}= {\left\{ \begin{array}{ll} \delta _{j} (\hat{\mathbf {q}} \cdot \hat{\mathbf {v}}_{ij}) &{} \quad \text {if } \hat{\mathbf {q}} \cdot \hat{\mathbf {v}}_{ij} > 0 \\ 0 &{} \quad \text {otherwise }\\ \end{array}\right. } \end{aligned}$$
(10)

where \(\hat{\mathbf {q}}\) is the unit pressure direction. This moves haemo-globin along edges that leave node i in the pressure direction \(\hat{\mathbf {q}}\).

4.5 Fixation of hypostasis/livor mortis

Fixation of hypostasis refers to the fixation of livor mortis due to blood leaking through deteriorated blood vessels into the surrounding tissue. This staining of the tissue results in the fixation of the discolouration that remains even if pressure is applied or the body is moved. We account for this by introducing the variable \(f_{i}\) into the simulation, which is the fixed haemoglobin amount at node i that is not moved by our haemoglobin transport simulation.

The haemoglobin \(h_{i}\) at node i is gradually turned into fixed haemoglobin \(f_{i}\). In addition to this, an amount of its haemoglobin is transported to all neighbouring nodes \(j \in \varOmega _{i}\) and fixed there. The amount j receives is related to its distance to node i:

$$\begin{aligned}&f_{i}(t + \varDelta t) \nonumber \\&\quad = f_{i}(t) + \varDelta t \left( f_{ii}(t + \varDelta t) + \sum _{j \in \varOmega _{i}} f_{ji}(t + \varDelta t) \right) \end{aligned}$$
(11)
$$\begin{aligned}&h_{i}(t + \varDelta t) \nonumber \\&\quad = h_{i}(t) - \varDelta t \left( f_{ii}(t + \varDelta t) - \sum _{j \in \varOmega _{i}} f_{ij}(t + \varDelta t) \right) \end{aligned}$$
(12)

where \(f_{ij}\) is the amount of haemoglobin that leaks from node i into the surrounding tissue of node j. Some haemoglobin at node i is fixed at node i directly (\(f_{ii}\)) and some is fixed at neighbouring nodes j (\(f_{ji}\)). All haemoglobin transported is removed from node i (Eq. 12).

$$\begin{aligned} f_{ij}(t + \varDelta t) = \min ( \lambda _\mathrm{h} c_{i}, h_{i}(t)) \frac{\upsilon _{ij}}{ \sum _{k \in \varOmega _{i}} \upsilon _{ik} + \upsilon _{ii}} \end{aligned}$$
(13)

\(\upsilon _{ij}\) determines the proportion of haemoglobin from node i that leaks into the surrounding tissue of node j and is defined as:

$$\begin{aligned} \upsilon _{ij}= {\left\{ \begin{array}{ll} \delta _{j} \displaystyle \left( 1 - \frac{|p_{j} - p_{i}|}{L}\right) &{} \quad \text {if } i \ne j \\ 1 &{} \quad \text {if } i = j \\ \end{array}\right. } \end{aligned}$$
(14)

where \(|p_{j} - p_{i}|\) is the length of the edge connecting i and j and L is a maximum edge length in the model. The amount of haemoglobin node j receives depends on its available blood capacity and is negatively related to its distance to node i, i.e. the smaller the distance, the more haemoglobin node j receives.

The haemoglobin content of the boundary nodes is used in our skin shading approach discussed in the next section. In skin shading, haemoglobin refers to the sum of fixed haemoglobin \(f_{i}\) and unfixed haemoglobin \(h_{i}\).

5 Skin shading

Skin colour depends mainly on the melanin concentration in the epidermis and haemoglobin concentration in the dermis layer. Livor mortis is visible due to changes in the haemoglobin concentration and blood oxygen saturation in the dermis layer. Skin colour can be determined with respect to the haemoglobin and melanin content using a two-dimensional look up texture as demonstrated by Jimenez et al. [22]. However, a two-dimensional look up texture is not sufficient in the case of colouration changes due to livor mortis, where changes in the oxygen levels of the blood also have a great impact on skin colouration. We instead represent our model in two layers, similar to the skin model in [11] and render each layer individually. The first, or outer layer, represents the epidermis. The second, or inner layer, represents the dermis. We use a diffuse approximation approach, based on the Jimenez et al. [24] separable subsurface scattering method, to approximate the diffusion profile of skin but apply this to each layer individually in screen space [23]. This has performance and artist control advantages over more biologically sound methods such as [5]. The results of the two layers are then convolved in a post-processing step to obtain the final skin colour.

Our livor mortis skin shading approach can be summarised as:

  1. 1.

    Render the epidermis diffuse map.

  2. 2.

    Render the dermis diffuse map.

  3. 3.

    Apply the epidermis specific diffusion profile to the rendered epidermis diffuse map.

  4. 4.

    Apply the dermis specific diffusion profile to the rendered dermis diffuse map.

  5. 5.

    Convolve the blurred epidermis and dermis maps.

5.1 Rendering the epidermis

When rendering the epidermis, only the melanin contribution to the skin colour is considered. In the case where a conventional skin albedo map is used, the haemoglobin contribution needs to be removed. Alternatively, highly-detailed melanin maps can be constructed from measured data as in [22], and a look up texture utilised to determine the skin colour due to melanin. Alternatively, methods described by Tsumura et al. can be used to extract the melanin and haemoglobin information from the skin [46]. The results presented in this article were constructed using manually modified albedo textures.

Fig. 2
figure 2

Blood colour lookup texture used in the dermis rendering step. The total haemoglobin saturation s is the fraction of haemoglobin in blood which is obtained using Eq. 15. The oxygen level in blood o is obtained using Eq. 6

5.2 Rendering the dermis

Haemoglobin is the main chromophore found in the dermis. It is transported by small blood vessels reaching within the dermis. A greyscale texture map can be used to imitate the colouration effects over the skin caused by these blood vessels. This is achieved in two steps, at the initialisation stage and the rendering stage.

During initialisation, the available blood capacity \(a_{i}\) of each tetrahedral boundary node i is modified by the texture map, where white indicates full available capacity and black indicates no available capacity. This will influence the haemoglobin transport described in Sect. 4 for the boundary nodes.

During rendering the haemoglobin saturation (haematocrit) is adjusted. Haemoglobin saturation s(xy) and oxygen level o(xy) determine the colour for each point using a blood colour look up table as shown in Fig. 2. Here, haemoglobin saturation refers to the ratio of total haemoglobin to capacity. The dermis shader receives blood parameters \((\frac{h_{i} + f_{i}}{a_{i}}, o_{i})\) which determine the haemoglobin saturation h(xy) and oxygen level o(xy) at each pixel (xy). To vary the dermis colouration over the whole surface according to the texture map the total haemoglobin saturation s(xy) for each pixel is computed as follows:

$$\begin{aligned} s(x,y) = h(x,y) \cdot m \left( u(x,y),v(x,y)\right) \end{aligned}$$
(15)

where m is the available capacity ratio that is obtained from the texture map at uv-coordinates u(xy) and v(xy) of pixel (xy). Note that the unfixed haemoglobin saturation given in the blood parameters is \(\frac{h_{i} + f_{i}}{a_{i}}\) rather than \(\frac{h_{i} + f_{i}}{c_{i}}\). This is done to correct the unfixed haemoglobin saturation for pixels within the triangle. Since \(a_{i} = m(u_{i},v_{i})c_{i}\), m becomes zero at each vertex. As expected this results in the saturation being the ratio of total haemoglobin to capacity.

5.3 Convolve layers

To obtain the final skin colour, the two layers needs to be convolved. The dermis and epidermis have different absorption and reflectance properties. The dermis acts as a strong scatterer mostly due to its thickness and collagen fibre network, whereas multiple scattering in the epidermis is negligible and occurs mainly in the forward and backward direction [18].

Table 1 Sum-of-Gaussians parameters for the epidermis and dermis
Fig. 3
figure 3

This figure demonstrates our skin shading approach. a Epidermis rendered using Eq. 16 using a diffuse skin texture and b epidermis absorption. c Dermis layer render using Eq. 17 at different stages of livor mortis. d Final skin shading obtained by combining ac using Eq. 18

We construct two convolution kernels, one for the epidermis and one for the dermis. The convolution kernel for the thin epidermis is constructed similar to [24] but using only the first two Gaussian terms (see Table 1). The outgoing radiance of the epidermis is then described by the diffusion profile:

$$\begin{aligned} \mathbf {R}_\mathrm{e}(x) = \sum _{i=1}^{2}\mathbf {w}_{i}G( v_{i}, x) \end{aligned}$$
(16)

where \(\mathbf {R}_\mathrm{e}(x) = [R_{r}(x), R_{g}(x), R_{b}(x)]\) is the convolution profile for the epidermis, \(G( v_{i}, x)\) the Gaussian with variance \(v_{i}\) and \(\mathbf {w}_{i} = [{r}_{i}, {g}_{i}, {b}_{i}]\) are the weights for the rgb channels (see Table 1).

The convolution profile of the dermis \(\mathbf {R}_\mathrm{d}(x)\) is constructed similarly but, since significant multi scattering is happening in the dermis, it is formed from the last four Gaussians:

$$\begin{aligned} \mathbf {R}_\mathrm{d}(x) = \sum _{i=3}^{6}\mathbf {w}_{i}G( v_{i}, x) \end{aligned}$$
(17)

\(\mathbf {R}_\mathrm{e}(x)\) and \(\mathbf {R}_\mathrm{d}(x)\) are then applied to the rendered epidermis and dermis layer respectively. The resulting blurred maps represent the light reflection of the two layers. Figure 3a shows the results for the epidermis and Fig. 3c shows the results for the dermis at different stages of livor mortis. Note that the rgb weights in Table 1 are normalised, such that the colour of the skin is controlled by the diffuse skin texture and blood parameters in the dermis (refer to [7] for a discussion on this).

Table 2 Some geometry information for the two models used in terms of node and polygon counts in thousands (k), plus performance statistics for each livor mortis simulation step and each frame (including skin rendering) in milliseconds (ms)
Table 3 An overview of the framework variables used for the blood dynamics

The chromophore melanin is highly absorbent and, therefore, the absorption in the epidermis must also be considered. For this we use a melanin map (see Fig. 3b), which is a greyscale texture showing melanin contribution, from black (no melanin) to white (full melanin). With this the final skin colour can be determined as follows:

$$\begin{aligned} \mathbf {c} = \mathbf {w}_{1}\mathbf {L}_\mathrm{e} + ( 1 - \mathbf {A}_\mathrm{e} ) \times \left( \mathbf {w}_{2} \mathbf {L}_\mathrm{e} + \sum _{i=3}^{6} \mathbf {w}_{i} \mathbf {L}_\mathrm{d} \right) \end{aligned}$$
(18)

where \(\mathbf {L}_\mathrm{e}\) and \(\mathbf {L}_\mathrm{d}\) are the reflections of the epidermis and dermis respectively, i.e. the blurred epidermis and dermis render results. \(\mathbf {A}_\mathrm{e}\) is the absorption by melanin given by a greyscale melanin map. The first term describes the light that is directly reflected from the epidermis. This helps to preserve the surface details. \(( 1 - \mathbf {A}_\mathrm{e} )\) represents the light that is not absorbed by the melanin layer and therefore reaches into the epidermis layer. Note that light that is reflected from the epidermis does not reach the dermis layer either, but we account for this with the Gaussian weights \(\mathbf {w}_{i}\) when summing the reflection contributions for each layer.

6 Results and discussion

To demonstrate the livor mortis simulation approach proposed in this article we have generated a number of examples of our simulation on different models and scenarios to demonstrate haemoglobin dynamics, skin shading, fixation of hypostasis and, finally, blanching. We used a PC with an Intel Core i7 CPU running at 3.40 GHz, with 16 GB of RAM and a NVIDIA GeForce GTX 760 graphics card. Our simulation was implemented using C++ and DirectX 11. All the tetrahedralisations were generated using the TetGen tool by Si [44]. The simulation was run on a model of a head and lower arm, with an internal bone structure for both. See Table 2 for simulation statistics of the two models. We have used the parameter values depicted in Table 3 for all our results in this section. The examples showing a human head were generated using the free 3D model from TEN24 [45]. The slower rendering is due to using a higher resolution and multisampling for the head examples compared to the arm examples.

Fig. 4
figure 4

Livor mortis is applied to an arm in hanging position as in a. Early livor mortis results in a patchy discolouration shown in b. Haemoglobin pools in the hand showing a pink complexion in c, which turns purple with decreasing oxygen as shown in d

6.1 Haemoglobin transport

The heavy red blood cells that transport haemoglobin sink down due to gravity. This causes a discolouration of the skin where deepened areas turn pink and heightened areas turn pale. The haemoglobin dynamics over time can be observed in Fig. 3c. The resulting skin discolouration is depicted in Fig. 3d, which shows that the internal blood dynamics influence the skin colouration. Figures 4 and 5 show the results of the livor mortis simulation on the model of an arm in a lying and hanging position (respectively). In both cases, the livor mortis is visible in the lower lying areas of the model. We would like to point out that in the real world the whole forearm in Fig. 4c, d would be full of blood as it would also contain blood from other parts of the body. We only used a mesh of a forearm and, as such, can only distribute the blood that is present in the forearm at the start of the simulation resulting in less blood in the arm. Similarly, the head model is a closed model that is not connected to the rest of the body. If positioned upright, blood will accumulate in the neck and chin, whereas in a real world body blood would flow out of the head into the rest of the body, leaving the head deprived of blood.

Haemoglobin transport is subject to gravity. This means that when an object is moved before fixation of hypostasis, lividity will change accordingly. We demonstrate this in Fig. 8. Haemoglobin accumulates in deepened areas in Fig. 8a. Then the arm is rotated \(180^{\circ }\) before livor mortis becomes fixed, which is depicted in Fig. 8b. As the arm was turned early on, all haemoglobin moved into the newly deepened areas. This shows how livor mortis is influenced by gravity.

Fig. 5
figure 5

Livor mortis is applied to an arm in lying position as in a. This results in haemoglobin gradually accumulating in the finger tips and lower arm areas shown in b and c. d Bluish discolouration due to oxygen loss

6.2 Skin colouration

The skin colouration is influenced by the internal blood dynamics and the oxygen saturation of haemoglobin. Areas full of blood start turning pinkish and later purple, while the higher lying areas turn pale. Figure 3 shows the different rendering layers during livor mortis. Figure 3c depicts the dermis layer that reflects the internal blood dynamics. A blood vessel texture described in Sect. 5.2 is used in all examples. It was generated using a 2D Perlin noise. This leads to a smoother transition between haemoglobin rich and haemoglobin deprived areas to prevent polygonal edges on the boundary and allow for more artistic control. On the other hand, it can lead to a patchy appearance in haemoglobin rich areas as can be observed in Fig. 8d. We compare our skin colouration results to the photographs in Figs. 6 and 7.

Fig. 6
figure 6

a A photograph that highlights the pink and purple colourations of advanced livor mortis [41]. Note that the colouration differences on the back are due to changes in the environment temperature during livor mortis. b The colours of advanced livor mortis with high (bottom) and low (top) oxygen saturation

Fig. 7
figure 7

The patchy appearance of early livor mortis in a a drown victim taken from [41] and b our simulation results

Fig. 8
figure 8

This figure shows an arm with a early livor mortis in an initial position that was turned \(180^{\circ }\) at three different stages of livor mortis. b A turn during early livor mortis resulting in haemoglobin accumulating in the back of the arm. c Turning the object during fixation of hypostasis which results in some haemoglobin to flow downwards, whereas d turning after fixation shows no changes in haemoglobin distribution

Fig. 9
figure 9

This figure shows the result of applying pressure to an object a before livor mortis sets in, b during livor mortis but before fixation of hypostasis, c during fixation of hypostasis and d after hypostasis has become fixed

At the start of livor mortis the skin looks patchy as shown in the photograph in Fig. 7a. Our irregular edge network causes a similar patchy appearance at the start of livor mortis, which is an intended side effect of using the tetrahedral edges as a vascular system. This is particularly visible in Fig. 7b, which shows a similar pattern to Fig. 7a, but can also be observed in the other results.

With ongoing livor mortis haemoglobin accumulates in the deepened areas of the object, turning the areas a pinkish colour. Figure 6a shows a photograph of livor mortis, with pink and purple discolourations. Figure 6b shows a simulation result. The purple colour on the top is due to the reduced oxygen in the blood that results in a deeper red colour than oxygenated blood. This can be observed in Fig. 3d, which shows how the skin colour turns more purple as the blood turns a deeper red (Fig. 3c) due to oxygen dissociation.

The pattern and colouration of livor mortis created by our simulation are very similar to the ones in the photograph. The lividity in Fig. 6a has blotchy characteristics that can also be observed in our results (see Figs. 3d, 4c, d, 5c, d). Though more visible in some of our examples than on the photograph, this can be tuned by adjusting the blood vessel texture.

6.3 Fixation of hypostasis

When the blood vessels decompose, haemoglobin flows out and stains the surrounding tissue. At this point lividity becomes fixed and is unaffected by pressure or movements of the body. Turning the arm displayed in Fig. 8a during early livor mortis results in lividity shifting to the newly deepened areas (see Fig. 8b). Turning the object during fixation (see Fig. 8c) on the other hand shows only a slight reallocation of lividity as some colouration intensity is lost. Turning the object after livor mortis has become fixed, as shown in Fig. 8d, shows that lividity is visible at the same areas as in its initial position in Fig. 8a, i.e it has not been affected by gravity.

Fig. 10
figure 10

When pressure is applied to early livor mortis that is not yet fixed (a), blanching occurs at the pressure point (b). Images taken from [41]

6.4 Pressure induced blanching

We observe similar results with blanching. Before the blood vessels break down, applying pressure to an area on the skin results in blanching. We ran our simulation four times. Each time, pressure was applied during different livor mortis stages, before livor mortis, during early livor mortis, during fixation of hypostasis and after fixation. The results can be observed in Fig. 9. Figure 10 shows two photographs of pressure being applied to an area affected by livor mortis. The area turns white as blood is pressed out. Figure 9a, b show results where pressure is applied to the skin before livor mortis is fixed. The resulting blanching effects are similar to the blanching that can be observed in the photograph from Fig. 10b. Figure 9c shows the result of pressure being applied during fixation. Some blanching still occurs, though not all colouration disappears. In the simulation where pressure is applied after livor mortis has become fixed no blanching occurs. This is demonstrated in Fig. 9d. One can observe some polygonal edges around the blanching area in Fig. 9a, b. This is due to the blanching being applied on a nodal level.

7 Conclusion and future work

In this article, we propose a livor mortis simulation that is able to model the pooling of haemoglobin due to gravity, the fixation of livor mortis due to tissue staining and pressure induced blanching effects. In addition to the above, we present a skin shader that is able to model colouration changes based on the internal blood dynamics, such as changes in the haemoglobin distribution and oxygen saturation. The tetrahedral representation of the internal body parts allows for the reproduction of the irregular make up of the vascular system and the capturing of the patchy skin appearance of early livor mortis. Our skin shader is able to reproduce the changes in skin colour caused by the underlying blood flow and oxygen levels by representing the skin as a melanin and haemoglobin layer.

Another potential use of the livor mortis simulation is bruising, as it is a similar process to fixation of hypostasis. Blood vessels burst with strong impact, which leads to haemoglobin leaking into the surrounding tissue. This would lead to a purple to bluish discolouration of the affected areas as the oxygen content decreases [2]. However, to simulate the healing of bruises, the breakdown of haemoglobin should also be considered, which leads to the green and yellow colouration. We believe that our model can be used in the entertainment industry to add more realism to the early appearance of corpses that are very commonly seen in modern computer and video games. Another potential application could be as a teaching aid for forensics.

Livor mortis and human body decomposition in general is a very complex process that is affected by many external factors such as temperature and humidity. The approach presented in this article does not consider changes in the blood flow that are caused by temperature variations. Introducing temperature into our simulation would allow for a greater variation in lividity. We used simple bone structures for our simulation, that led to some haemoglobin accumulating in thin-fleshed areas, as can be observed where the nose meets the cheek. These can be avoided by creating a more realistic bone structure that better represents the flesh distribution between bone and skin over the whole object. For the best visual results triangles are recommended to be fairly evenly sized over the object’s surface with a well fitting internal bone structure.

Our skin shading does not consider the oily layer that lies on top of the epidermis and the translucency of thin areas such as ears and nostrils. As the oily layer directly reflects light in all wavelength equally, our results lack the wet and shiny look that can be observed in some of the photographs. Both specular reflection and translucency of thin areas have been considered in skin shading approaches [7, 23] and can be easily integrated into our particular skin shading method.

To avoid the visual artefact mentioned in Sect. 6.4, the blood vessel texture can be used to record pressure affected areas. The available blood capacity is adjusted in the blood vessel map first and applied to the simulation nodes afterwards. This could yield a smoother result and allow the creation of small-scale blanching caused by belts and strings. For future work, introducing the effects of temperature into the simulation would allow the simulation of a greater variety of lividity. Further greenish-red, brown and blackened skin discolourations are caused by putrefaction and dehydration which also lead to deformations of the skin and internal organs [41]. Introducing putrefaction and dehydration into our simulation would be a particularly interesting area for long term research and expansions of the existing results demonstrated in this article.