Depth Map Based Translucence

June, 2003

template:translucency.slim

Introduction

Translucent materials allow light to pass through but are not transparent (as ordinary glass is). Translucence presents the softened warmth and glow that's been missing from common simulations. Without it, your CG character will look like a marble or plastic statue instead of an alive creature.

PRMan11 offers its ray-traced facility to implement such expensive effects, but I prefer using the shadow buffers technique from Stupid RenderMan/RAT Tricks 2002 to mimic the way light travels inside a closed volume. Thanks Christophe Hery for preparing such a useful document!

Click to view a test animation showing the difference btween opaque and translucent materials.

Click to view translucence on a jumping teapot.

Shadow Buffering

In fact, the translucence shader is the extension of the recent ambient occlusion and IBI shaders. I simply ray-march along the refraction ray and collect diffuse scattering at each sample point. You will need a number of shadow maps pre-rendered. If you still haven't any idea about the workflow, it is time to check this document.

Faking A Distant Light

My translucent stuff is not illuminated by a light but by a mtorCoorSys. The Z-axis represents the light ray direction of a distant light. This is a back light setting.

Don't forget to use the expression:

[coordsys systemShape]

to define the shader space.

Baking Translucence Pass

The images below illustrate a simple example of translucence rendered based on shadow buffers. The teapot is attached to the translucence shader and illuminated by "foo". Notice the light can penetrate the surface and light up the parts that are not directly illuminated. The "Absorbing Coefficient" describes how fast the light dies away when travelling through the material.

A lower "Absorbing Coefficient" allows more light reach the back light side.

The shader does not take any common illumination such as diffuse() and specular() into account. It is designed to render a separate pass for final composition.