Dirty Glass: Contamination on Transparent Surfaces

Rendering of clean transparent objects has been well studied in computer graphics. However, real-world transparent objects are seldom clean--their surfaces have a variety of contaminants such as dust, dirt, and lipids. These contaminants produce a number of complex volumetric scattering effects that must be taken into account when creating photorealistic renderings. In this project, we take a significant step towards modeling and rendering these effects. We make the assumption that the contaminant is an optically thin layer and construct an analytic model based on pre-existing results in computer graphics and radiative transport theory for the net bidirectional reflectance/transmission distribution function. Moreover, the spatial textures created by the different types of contamination are also important in achieving visual realism. To this end, we measure the spatially varying thicknesses and the scattering parameters of a large number of glass panes with various types of dust, dirt, and lipids. We also develop a simple interactive synthesis tool to create novel instances of the measured contamination patterns. We show several results that demonstrate the use of our scattering model for rendering 3D scenes, as well as modifying real 2D photographs.

Source code for BRDF/BTDF model computation is also available.

Publications

"Dirty Glass: Rendering Contamination on Transparent Surfaces,"
J. Gu, R. Ramamoorthi, P.N. Belhumeur and S.K. Nayar,
Proceedings of Eurographics Symposium on Rendering,
Jun, 2007.
[PDF] [bib] [©]

Images

Click here to download a zip file containing all high resolution images.

  Dirty Transparent Objects in Real World:

Real photographs of scenes with transparent objects: window with dirt; wine glass with stains; image taken with a dusty lens; and monitor with fingerprints. Contaminants on the transparent objects produce many striking visual effects.

     
  Modeling Contamination Effects on Transparent Surfaces:

We make the common assumption that the contamination layer is usually optically thin. Based on radiative transfer theory and existing results in graphics, we model each individual scattering event due to contamination on transparent surfaces, and assemble them into a single BRDF/BTDF model.

     
  Comparison with Related Works:

In the scattering community, there are several related works which model light scattering for layered materials, such as [1] and [2]. In our case, we are dealing with one specific type of layered material--a layer of contaminant on top of transparent surfaces--which requires to model some additional scattering events that are important for physically-based rendering. We compare our model and the previous works with Monte Carlo simulation result. The graph shows our model is much more faithful to physically-based simulation result.

[1]. J. Blinn. Light reflection functions for simulation of clouds and dusty surfaces. Computer Graphics 16, 3(1982), 21-29.
[2]. P. Hanrahan and W. Krueger. Reflection from layered surfaces due to subsurface scattering. SIGGRAPH (1993), 165-174.

     
  Verification of Model:

The image shows a simple rendering example to verify the accuracy of our model. We compare our model (left) to the Monte Carlo physically-based simulation result (right).

     
  Measurement Setup:

Left: to acquire the spatial pattern of optical thickness, we use a projector to illuminate the sheet from one side and create a shadow of the pattern on a Lambertian surface placed on the other side. From a single image of the shadow map of the pattern, we estimate the spatially varying thickness of the contaminant. Right: To measure the scattering parameters, we use a thin collimated light beam to scatter light through the layer onto a Lambertian surface placed a small distance behind. From this second image, we estimate the scattering parameters for a given contaminant type.

     
  Some Measured Optical Thickness Patterns:

Image intensity is proportional to the optical thickness. With these measured samples, we use standard texture synthesis techniques to generate contamination patterns for rendering.

     
  Some Measured Scattering Parameters:

Top row: Acquired images for some contaminants. These images show the scattering of a green laser beam. For comparison, we also show the image for clean glass, in which the scattering is minimal. Bottom row: Using these images, we can estimate the scattering parameter g of the phase function for different contaminants. In the estimation results, the red dots are the measurements and the blue curves are the fits.

     

Videos

If you are having trouble viewing these .mov videos in your browser, please save them to your computer first (by right-clicking and choosing "Save Target As..."), and then open them.

  EGSR 2007 Video:

This video is a compilation of the modeling, the measurement, and the main results of this project. (Quicktime, H.264)

     
  Dusty Glass Sphere:

A glass sphere rendered with different thicknesses of a uniform layer of dust. As the optical thickness increases, both the transmission and the reflection become smoother and give the sphere a more velvety appearance, especially near the boundary of the sphere.

     
  Dirty Window over 24 hours:

A contaminated window rendered with a background that changes with time of day. Note how the contaminants appear very different for the different illuminations of the background.

     
  Monitor Screen:

A monitor screen rendered with dust and fingerprints. The contaminants become more clearly visible when the monitor is off. Their brightness increases as the viewing angle approaches the grazing angle.

     
  Cognac Glass Covered With Uniform Dust:

A cognac glass rendered with different thicknesses of a uniform dust layer. The caustics and the base of the glass become dimmer and smoother as the dust thickness increases.

     
  Dirty Cognac Glass:

A cognac glass rendered with a textured contaminant rendered with and without scattering. Notice the subtle visual effects produced by the scattering of the contaminant, including the vertical shadows on the glass body, the contrast reversals of the contaminant against the background, and the increased scattering effects at grazing angles.

     

Slides

EGSR 2007 presentation     With videos (zip file)

Software

Source Code for BRDF/BTDF Model Computation

Here are the C++ source codes to compute the BRDF/BTDF model values for each outgoing direction, given the description and parameters for the contaminant. Simply use
g++ evaluator.cpp pbrt_wrapper.cpp -g -o evaluator
to compile. Our main implementation of the model is a plugin of PBRT (a great open source physically based raytracer). To make it easier for use, I copied the necessary parts to pbrt_wrapper.cpp. We use these codes to generate the results for comparision with previous works and Monte Carlo simulation, as shown below.

[evaluator.cpp] [pbrt_wrapper.cpp] [readme.txt] [sample result]

Database

  Database of Contamination Patterns and Scattering Parameters:

We have measured both the texture patterns and scattering parameters of about 30 different kind of contaminants that are common in the real world. A simple synthesis tool is also provided to generate larger samples.

     

Removing Image Artifacts Due to Dirty Camera Lenses
and Thin Occluders

Participating Media: Measuring Scattering by Dilution

Participating Media: Multiple Scattering Model

Participating Media: Single Scattering Model