2/11/2006

Shape from Shading

Part of an illusionistic painting

I wasted a huge amount of time before I figured out it was the mutability of digital pictures, not the pictures themselves, that really impressed me -- the idea that an image is (abstract) data that can be massaged in an infinite number of ways, and shift from 2D to 3D representation and back again.

Shape from shading (SFS) is a software technique that builds a 3D model from the shading in an image; it was used (early on) to create 3D "elevation maps" from photos taken by space probes sent to Mars, etc.  I used crude SFS programs I found on the web to translate some paintings to elevation maps.

The green picture up top is of a 1 by 4 foot section of a failed painting.

Shape from Shading

I took its right end and inverted it (swapped light for dark) for the top half of the black & white picture just above.  Then I scanned that image with a SFS program to produce the elevation map used to build the 3D model at the bottom of the picture.

Note how the model demonstrates SFS's inability to tell shadow from depth: darker just means "lower" and lighter "higher."  Newer space probes use more complex hardware and software to get accurate elevations.  But then I was scanning pictures, not 3D reality.

Also note that once you have the 3D model, you can feed it to a "rapid prototyping" machine that can carve or "print" a solid 3D sculpture shaped like the model.

That arc -- from solid illusionistic painting -to- digital elevation map -to- solid form -- felt like something really deep to me.  It's too bad I couldn't find a way to communicate the feeling.