Creating surfaces from images

Written by Paul Bourke
August 1994


Introduction The following discusses a modelling technique based on deriving a surface from an image. The technique and examples are supported by some software developed by myself called BitSurface.

The technique involves creating a surface or "geometric" model based on the intensity of pixels in the image. Each pixel in the image becomes the vertex of a gridded surface where the height is proportional to the intensity.

As an implementation, BitSurface takes an image represented in the Macintosh PICT format and creates surface representation in various 3D polygonal formats (eg: DXF) at user selectable resolutions.

While many rendering engines have very powerful bump mapping techniques for simulating complicated geometry based on image intensity, these techniques are generally only suitable when viewing the surface from a distance. The illusion which is created by perturbing the surface normals depending on the pixel intensity fails when the object in question is viewed up close. A good example of this failure is the simulation of shallow trenches when simulating the depression between tiles or bricks. The effect is convincing when viewing a large portions of the surface but what if you wish to enter one of the depressions, it isn't possible because they don't actually exist as geometry.

Example

This example will be the top of a screw in wood. The screw curves up in a dome-like way but it has a slit down the middle for the head of the screwdriver. While this would be time consuming to model, it is easy to create an image which has intensity proportional to the desired height. The image created for this example is shown below

The wireframe isometric view of this after it has been turned into a polygonal mesh is

And finally rendered

Example

This technique is particularly useful for modelling a rough surface. The starting image just needs to be a noisy function, perhaps with some blurring applied

Perhaps the primary problem with this method of generating a surface is the large volumn of geometric information generated. While a 128x128 pixel image is normally considered a small image, a 128x128 cell polygonal grid is considered large. BitSurface lets the user choose a sampling increment, so for example, a 4 step sample on a 128x128 image will result in a 32x32 polygonal mesh. The alternative of course is just to reduce the image size before deriving the surface mesh.

Another issue relates to the discrete nature of the intensity levels of many images and image formats. Many grey scale images only contain 16 or 32 levels of grey (even though they may be stored using 1 byte or 256 possible greys).

Software

A Macintosh application has been written called BitSurface that turns pict images into 3D surfaces where the height is proportional to the pixel intensity. Also generates text based images for email signatures.
Update 2002, this application is no longer available.