The attenuation and other optical properties of a medium are exploited to measure a thickness of the medium between a sensor and a target surface. Disclosed herein are various mediums, arrangements of hardware, and processing techniques that can be used to capture these thickness measurements and obtain three-dimensional images of the target surface in a variety of imaging contexts. This includes general techniques for imaging interior/concave surfaces as well as exterior/convex surfaces, as well as specific adaptations of these techniques to imaging ear canals, human dentition, and so forth.