What Is a Depth Map? Definition, Uses and Examples
Definition
A depth map is a grayscale image in which each pixel's brightness represents distance or height instead of color: in the convention used for fabrication, white is highest or nearest and black is lowest or farthest. Laser software, CNC CAM and slicers read it to produce physical relief.
Also called: height map, heightmap, z-map, displacement map.
A depth map turns distance into brightness. Instead of recording what color something is, each pixel records how near or how high it is. Software that makes physical objects reads those grays as heights.
Depth map vs grayscale photo
A grayscale photo records light. A depth map records shape. A dark shirt in front of a white wall is dark in the photo but bright in the depth map, because the shirt is closer. That is why converting a photo to grayscale does not make a usable relief.
How depth maps are made
- AI depth estimation from a single photo, with models such as Depth Anything V2. Try it free with the depth map generator.
- Hand painting with gradients, useful for logos and text.
- 3D scanning or rendering, where depth is measured or computed from a model.
Where they are used
- Laser engraving: LightBurn's 3D Sliced mode on galvo lasers, or grayscale power engraving on gantry lasers.
- CNC relief carving: imported as a height map or converted to an STL. See depth maps for CNC.
- 3D printing: converted into a relief or lithophane STL with the image to STL tool.
Bit depth
An 8-bit depth map holds 256 height levels; a 16-bit map holds 65,536. For most jobs 8-bit is enough. Read 8-bit vs 16-bit depth maps for when it is not.
Questions
Is a depth map the same as a height map?
In fabrication the terms are used interchangeably. Strictly, a depth map stores distance from a camera and a height map stores elevation above a base, but both are grayscale images read as heights.
Is white high or low in a depth map?
For laser engraving, CNC and 3D printing the usual convention is white for the highest or nearest surface and black for the deepest. Some tools use the reverse, which is why most software has an invert option.