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 is a device comprising: a luminescent layer of a material adapted to form a conforming layer when placed over a target surface of an object, the luminescent layer configured to emit light at a first wavelength and a second wavelength; a sensor positioned to capture an intensity of the first wavelength and an intensity of the second wavelength in a direction of a location on the target surface; an absorbing medium, the medium positioned between the sensor and the luminescent layer and the medium absorbing the first wavelength more than the second wavelength; and a processor programmed to calculate a thickness of the medium in the direction of the location based upon a function of the intensity of the first wavelength and the intensity of the second wavelength.