Translucent dual-relief-mapping PDF Print E-mail


This effect is based on the work of two researchers :
[1] Fabio policarpo's technique : Relief mapping of non-height-field surface details
[2] Guillaume François' technique to render sub-surface scattering : Subsurface texture mapping

First, I recover the surface of the model by using the relief-mapping technique presented in [2]. Then, whatever the model is, only a simple cube is rendered and the surface is computed using ray-casting.

Finally, I march inside the surface of the model as in [2] to compute the subsurface scattering of the light inside the medium. For that, it's important to understand the phase function (which describe the scattering behavior of the light inside the medium) and the diffusion and absorption coefficients which hardly depend on the wavelength of the light.

This technique I present here is horribly slow due to the computation cost of the surface via ray-casting. The evaluation of the light scattered in the material is also very time consuming. Moreover, because [1] is not a perfect surface intersection algorithm, silhouettes suffer from aliasing and can contain some holes. However, this is a godd way to compute subsurface scattering inside translucent materials.


UPDATE:

I have improved the algorithm :

  • The intersection code have been improved.
  • specular lighting have been added to help the user perceive some little surface detail. This improve a lot the final rendering but some noise is visible where the two relief map intersect due to relief-mapping imprecision.
  • I have changed the function which compute the amount of light arriving at a point inside the volume. You can choose between two :
    1. a fast function wich only compute the attenuation using the inverse of the squared distance from the light.
    2. or, a real exponential attenuation inside the volume which require a new ray casting inside the medium. With this function, shadow appears. However, some artefact can be seen from some view/light position due to relief-mapping imprecision.

When using the fast function, the performance are of about 40fps on a geForce7900GT with a resolution of 640x480 and the volume taking almost all the screen pixels, whereas with the accurate function, performance are 10fps.

If you are interested, you can improve this demo by adding light refraction at the interface between the air and the medium.

Download source and executable
YouTube video or HighQuality video


NEW SCREENSHOTS :

Now, a jade angel with, in the phase function, g=-0.25.
It's now possible to see more surface detail thanks to the specular lighting and shadows.

 

The same jade angel with now g=0.0 : less light travel through the medium. As a result it seems less transparent.

A wax angle. (here, g=-0.25)
The algorithm is more physically accurate but there is still a lot of work to do : multiple scattering, refraction, etc.

 

OLD SCREENSHOTS :

 

A wax Jesus Christ with the light behind him

 

The result when rendering an angel with a wax material

 

The same angel with other view points and light positions.
On the right, you can see the light source trought the left wing of the angel.

 

By changing the phase function parameters, you can easily tuned
the amount of light wich will travel throught the surface

 

A marble-like material is applied here to the angel
(on the left, the light is in front if him and on the right, the light is on his left)

 

The result when using odd color diffusion coefficients
Last Updated on Sunday, 01 May 2011 20:10