Creating 3D engravings by manually painting depth maps

Written by Paul Bourke
December 2019

In the following an example is presented whereby a 3D model is created by manually painting a depth map. Obviously this only works for simple one-to-one surfaces, such as the engraving used in this example (an engraving of a ship at Borobudur). There are many reasons why one might want to do this, in this case a sense of the 3D surface was required and the cost of flying someone to the site for a true 3D reconstruction (photogrammetric) was too costly.

Original photograph

The process is illustrated in the next two figures. One draws outlines of the raised features on a single photograph of the engraving, best if it is a front on photograph. In this case these outlines are smooth curves drawn in a simple 2D drawing package. In the following it can be noticed that not all height features have been traced, this is simply a matter of the time and patience required. This test exercise did not warrant that effort.

Region tracing as a transparent layer on original photograph

These shapes are filled with a grey level depending on the relative height of the region, a linear grey scale is used by choosing actual values between 0 to 255, rather than visually.

Traced boundaries

The following is the final depth map, the edges on the above are removed and the result has a Gaussian blur applied to avoid what would otherwise be sharp edges.

Final depth map

It is this grey scale image that is converted into a mesh where the height of the mesh is proportional to the grey value and the texture coordinates simply range from 0 to 1 on each axis. This allows the original traced image to be applied as the texture to the mesh. While a simple regular 2D mesh could be formed, in this case a curvature sensitive mesh is created, largely an efficiency measure as large flat surfaces don't require lots of triangles.

Wire frame version illustrating curvature aware mesh generation

The following are two views of the resulting 3D mesh. This mesh can be used for stereoscopic viewing, relighting and so on.

View of 3D mesh

View of 3D mesh