A friend of mine, Tom Malzbender, invented a way of photographing and viewing objects with a virtual light source called Polynomial Texture Mapping. I recently was offered a chance to build a special light source for making such images, based on previous similar devices. This was an interesting project, with many challenges, but it turned out well in the end.

This gadget, referred to here as "the dome", is an acrylic dome, 30 inches in diameter with 64 white LED light sources that can be controlled by computer. The dome is opaque to keep stray light from interfering with the image. A digital camera is placed on top of the dome, looking through a hole in the top at the object of interest located inside. A computer program sequences the lights, turning on one light at a time, making a separate image each for each light source. This series of 64 images is then used with Tom's ptmfitter and ptmviewer software to allow viewing the object with a virtual light source, using the computer mouse to move the light around and seeing how the shadows change.

My first task was to figure out how to arrange the lights on the dome. They needed to be placed with approximately even spacing and not aligned vertically (to prevent certain artifacts in the final image). I wrote a few programs to come up with various placement strategies with mixed results. In order to visualize the output of my program, I used the Povray ray tracing program to turn the output of my program into something I could look at.

Once I had a satisfactory placement arrangement, I figured I would need a way to mark the dome in order to place the lights in the right places. I sketched out a drawing for a marking jig and had a local guy draw it up in a CAD program and make it on his CNC router from a sheet of plywood.

Dome with marking jig

I designed a control box for the lights that could work with a computer, or as a stand-alone unit to manually turn the lights on and off. The box contains a power supply, a USB interface (for the computer), a keypad and LCD (for local control) and connections for the dome lights. A Texas Instruments MSP430F1232 processor controls everything.


Each light has its own circuit board with a small microcontroller and a linear current regulator to keep the light level consistent. The lights are connected in series like a shift register. The control box clocks a data bit through the series of light boards to set the light pattern. Once the bit pattern has been shifted into place, a long clock pulse transfers the pattern to the outputs and the selected light(s) turn on.


Nearly finished dome

Close up view