Distressing Images

James Bowman

distressdistress

Introduction

This is a tiny program I wrote one evening to see if I could get the effect of old movie film. It renders the scene (actually, it's just a cube) in monochrome, then it does a few extra things to simulate the "grain" of celluloid and the damage that occurs during film processing.

The "grain" texture is actually sparse convolution noise, which is a nice-looking but costly noise function; the program takes several seconds to generate the 128*128 texture on my machine. Ideally we'd like to regenerate this texture for the whole screen every frame, but that's just not possible at the moment. Instead, the program tiles the texture over the screen, then perturbs the tiles by a random distance. This is enough to conceal the fact that the noise never changes, at least from a casual inspection.

The next stages just draw faint points and lines on the screen, to simulate dust, hairs and short scratches.

Finally, the "must have" feature of old film, vertical scratches introduced during film processing.

The overall effect at 60Hz is quite convincing, and it makes a nice change to see a different set of artifacts from the ones we're used to in computer graphics...

distress.c source (distributed under the terms of the GNU General Public License).

(If you want to compile it, you'll also need GLUT).

Sparse convolution noise is discussed in more detail in Texturing and Modeling - A Procedural Approach Ed. David S. Ebert, AP Professional, 1994. ISBN 0-12-228760-6.