← Projects

HSL Transformation

Turning a flat photograph into a 3D model by reading its own colour as geometry

2019 SYSMADES, 2019 MAT End of Year Show computational photography3Drendering
HSL Transformation

Photographs are considered to contain only 2D information. But a photograph is actually a capture of our 4D spatial-temporal world. In this irreversible, information-losing compression, how could we reconstruct the higher-dimensional world from a flat image?

The pipeline

The photograph is placed in a virtual 3D space and divided into a grid of rectangles. Each rectangle has four vertices; every vertex carries a 3D position and a colour value taken from its coordinates in the original image.

The colour is converted from RGB to HSB, and the vertex is displaced according to hue, saturation, and brightness — hue becomes an angle, saturation a radius, brightness a height.

Two diagrams: on the left, hue mapped to angle, saturation to radius and brightness to height around a colour point; on the right, four grid vertices displaced upward to new positions
Each vertex moves to a new position determined by its own colour.

From the eight vertices — four original, four displaced — the algorithm selects any four to form a new polygon, and the flat rectangle is replaced by that polygon. Repeat across the grid and the 2D image has become a 3D surface.

Diagram showing three different quadrilaterals selected from the same set of eight vertices, each producing a different facet
Which four vertices you pick decides how the surface breaks.

Rendering

Once a 3D model exists it can go into Blender or Cinema 4D, where the scene around it — light, material, camera — is free to design. The renders below come out of the same source photograph, a night view of New York, treated with different surface materials. They can be produced at extreme resolution, up to 7680 × 4320.

The same transformed photograph rendered with a polished metallic material, facets catching the light in grey and goldA darker render of the transformed cityscape, facets tilted into rows across a warm wall

Realtime version

To present the model in another interactive way, the source image becomes a live camera frame instead of a still: an iPad’s front camera feeds the pipeline and the model rebuilds itself as people move in front of it.

An off-axis projection improves the 3D read — the rendering perspective is adjusted to the viewer’s eye position, tracked by the depth sensor in the same front camera.