News

Abstract

Diffusion theory allows the production of realistic skin renderings. The dipole/multipole models allow us to solve challenging diffusion theory equations in a very efficient manner. By using texture-space diffusion, a Gaussian-based approximation, and programmable graphics hardware real-time photorealistic skin renderings can be achieved. Performing this diffusion in screen space instead offers additional advantages that make the diffusion approximation practical in scenarios like games, where having the best possible performance is crucial. However, unlike the texture-space counterpart, the screen-space approach is in principle unable to simulate transmittance of lighting through thin geometry, yielding unrealistic results in those cases. In this work we introduce a transmittance algorithm that turns the screen-space approach into a very efficient global solution, capable of simulating both reflectance and transmittance of light through a multi-layered skin model. We derive our transmittance calculations from physical equations, which are finally implemented by means of a simple texture access. Our method performs in real-time requiring no additional memory usage, minimal extra processing power and memory bandwidth. Despite its simplicity our practical model manages to reproduce the look of images rendered with other techniques (both offline and real-time) such as photon mapping or the diffusion approximation.

Downloads

Shader

float distance(float3 posW, float3 normalW, int i) {
  // Shrink the position to avoid artifacts on the silhouette:
  posW = posW - 0.005 * normalW;

  // Transform to light space:
  float4 posL = mul(float4(posW, 1.0), lights[i].viewproj);

  // Fetch depth from the shadow map:
  // (Depth from shadow maps is expected to be linear)
  float d1 = shwmaps[i].Sample(sampler, posL.xy / posL.w);
  float d2 = posL.z;

  // Calculate the difference:
  return abs(d1 - d2);
}

// This function can be precomputed for efficiency
float3 T(float s) {
  return float3(0.233, 0.455, 0.649) * exp(-s * s / 0.0064) +
         float3(0.1,   0.336, 0.344) * exp(-s * s / 0.0484) +
         float3(0.118, 0.198, 0.0)   * exp(-s * s / 0.187)  +
         float3(0.113, 0.007, 0.007) * exp(-s * s / 0.567)  +
         float3(0.358, 0.004, 0.0)   * exp(-s * s / 1.99)   +
         float3(0.078, 0.0,   0.0)   * exp(-s * s / 7.41);
}

// The following is done for each light 'i'.

// Calculate the distance traveled by the light inside of the object:
// ('strength' modulates the strength of the effect; 'normalW' is the vertex
//  normal)
float s = distance(posW, normalW, i) / strength;

// Estimate the irradiance on the back:
// ('lightW' is the regular light vector)
float irradiance = max(0.3 + dot(-normalW, lightW), 0.0);

// Calculate transmitted light:
// ('attenuation' and 'spot' are the usual spot light factors, as in regular
//  reflected light):
float3 transmittance = T(s) * lights[i].color *
                       attenuation * spot * albedo.rgb * irradiance;

// Add the contribution of this light:
color += transmittance + reflectance;

Bibtex

@article{JIMENEZ2010_IEEE,
    author = {Jorge Jimenez and David Whelan and Veronica Sundstedt and Diego Gutierrez},
    title = {Real-Time Realistic Skin Translucency},
    journal = {IEEE Computer Graphics and Applications},
    volume = {30},
    number = {4},
    year = {2010},
    pages = {32--41},
}
@article{JIMENEZ2009_TAP,
    author = {Jorge Jimenez and Veronica Sundstedt and Diego Gutierrez},
    title = {Screen-space perceptual rendering of human skin},
    journal = {ACM Transactions on Applied Perception},
    volume = {6},
    number = {4},
    year = {2009},
    pages = {23:1--23:15},
}
@inbook{JIMENEZ2010_GPUPRO,
    author = {Jorge Jimenez and Diego Gutierrez},
    editor = {Wolfgang Engel},
    title = {GPU Pro: Advanced Rendering Techniques},
    chapter = {Screen-Space Subsurface Scattering},
    publisher = {{AK} Peters Ltd.},
    year = {2010},
    pages = {335--351},
}
@article{JIMENEZ2010_TOG,
    author = {Jorge Jimenez and Timothy Scully and Nuno Barbosa and Craig Donner and Xenxo Alvarez and
              Teresa Vieira and Paul Matts and Verónica Orvalho and Diego Gutierrez and Tim Weyrich},
    title = {A practical appearance model for dynamic facial color},
    journal = {ACM Transactions on Graphics (Proc. SIGGRAPH Asia)},
    year = {2010},
    volume = {29},
    number = {6},
    pages = {141:1--141:10},
}
@inbook{JIMENEZ2011_GPUPRO2B,
    author = {Jorge Jimenez and Jose I. Echevarria and Christopher Oat and Diego Gutierrez},
    editor = {Wolfgang Engel},
    title = {{GPU} Pro 2},
    chapter = {Practical and Realistic Facial Wrinkles Animation},
    publisher = {{AK} Peters Ltd.},
    year = {2011},
}
@article{JIMENEZ2015_CGF,
    author = {Jorge Jimenez and Károly Zsolnai and Adrian Jarabo and Christian Freude and Thomas Auzinger and
              Xian-Chun Wu and Javier von der Pahlen and Michael Wimmer and Diego Gutierrez},
    title = {Separable Subsurface Scattering},
    journal = {Computer Graphics Forum},
    year = {2015},
}

Related

Links