Guides ·

How to make a depth map for laser engraving

A laser can burn a relief you can feel with your fingers. What it needs is a depth map: a greyscale image where each shade means a depth. Here is how one works, how to get a good one from an ordinary photo, and how to size it for your laser, shown on a photo of a resting dog.

Drop a photo on the free unmake depth map page and download a 16-bit map at the size and DPI of your engraving.Try it on your own file
The unmake depth map page with the dog photo loaded and the background flattened: a 3D relief of the dog, its greyscale depth map with the photo inset, and the size 100 × 71.1 mm, 1,000 × 711 px, 254 DPI
The dog photo as a laser depth map, background flattened. Photo: David Whelan, CC0, via Wikimedia Commons.

What a depth map is

A depth map is a greyscale picture of shape, not of light. Each pixel says how deep the laser should burn at that spot. A normal photo shows colour and shadow; a depth map shows only near and far.

In a photo, a black nose is dark because it is black. In a depth map of the same face, the nose is the nearest point, so it gets the shade that means high.

Which way round: black burns deepest

Laser software turns each grey into power. LightBurn's Grayscale mode gives the lightest shades your Min power and the darkest your Max power, so black burns deepest. White is only left untouched if Min power is 0, or below the point where your laser starts to mark.

So for a raised relief, the near parts of your subject must be light and the background dark. If the map is the wrong way round, the subject is carved into the surface instead, which is fine when that is what you want.

A depth map as grey levels: black burns deepest, white is not burned
Each grey is a depth: the darker the pixel, the deeper the burn.

Where a depth map comes from

There are three usual ways: render one from a 3D model, which gives exact depths; paint one by hand, for simple shapes and lettering; or estimate one from a single photo with an AI depth model, the quick route for pets and faces.

A photo-based map is relative, not in millimetres: the model ranks near and far and the map is stretched from black to white, so whatever is nearest the camera becomes the highest point.

Three panels: the dog photo, its depth map with the rug in front as light as the nose, and the flattened map with only the dog
Photo, depth map, and the same map with the background flattened (16-bit files shown in 8 bits). Photo: David Whelan, CC0.

Choosing the photo

Pick a photo where your subject is the nearest thing to the camera, with nothing in front of it: no rug, blanket or hands in the foreground. A plain background helps, and cropping tight around the subject helps more.

Thin things such as hair and whiskers come out soft, and glass or mirrors can be read wrongly. If the background still competes, flatten it.

Size, DPI and bit depth

A laser engraves an image line by line. The line interval is the gap between lines, and DPI is the same thing counted per inch: DPI = 25.4 ÷ line interval in mm, so 0.1 mm is 254 DPI. Make the map with one pixel per line at its final size: a 100 mm wide engraving at 254 DPI needs 1,000 pixels.

An 8-bit greyscale image has 256 shades and a 16-bit one 65,536. For a shallow one-pass engraving, 256 are usually enough; deep reliefs get smoother slopes with more. Use the 16-bit file where your software accepts it.

One pass or many

Most hobby lasers burn a depth map in one pass, in Grayscale mode in LightBurn or LaserGRBL, varying power with the shade. On a galvo laser, LightBurn's 3D Sliced mode can instead burn it in many thin layers for a deeper relief; our post on LightBurn 3D Sliced covers that job.

Making one from a photo in the browser

The unmake depth map page does the photo route in the browser. Drop a JPG, PNG or WebP; the first time, the AI model downloads, so allow up to a minute. You get the map, a 3D preview of the relief, the size with pixels and DPI, and the number of grey levels used.

Under Adjust you can set the DPI, switch Height from AI depth to Brightness, flatten the background, shape midtones and contrast, or invert. Downloads: 16-bit PNG, 8-bit PNG, 1-bit dots PNG, and a settings card for LightBurn or LaserGRBL.

A worked example: a resting dog, 100 mm wide

  1. Drop dog-face.jpg, a 1,920 × 1,365 px close-up of a dog resting its chin on a rug. Once the model had loaded, the map appeared with a 3D relief preview.
  2. Read the size: 100 × 71.1 mm, 1,000 × 711 px at 254 DPI (0.1 mm per line). The downloaded PNG was a real 16-bit greyscale image with 254 DPI written into it.
  3. Look at the map. The nose is the lightest part of the face and the shelf behind is dark. But the rug in front of the dog is just as light: it is nearer the camera, so it would stand as high as the nose.
  4. Choose Flatten (subject only). The background turns pure black and only the dog is left. Black means deepest, so the whole background burns to full depth: the most smoke, char and time in the job.
  5. Open the settings card: Grayscale (one pass), or 3D Sliced on a galvo laser only; Negative image off; line interval 0.1 mm; for LaserGRBL, Line to Line tracing at 10 lines/mm.
  6. Set Min power to 0 so the dog's nose stays untouched, and burn a small power test on a scrap of the same material first.

Common mistakes

Questions

Is white or black deepest in a laser depth map?

Black burns deepest. White gets your Min power, so it stays untouched only at Min power 0. Invert the map if you want the subject carved in.

What DPI should a depth map be?

The DPI of your line interval: 25.4 divided by the interval in mm. A 0.1 mm interval is 254 DPI, so a 100 mm engraving is 1,000 pixels wide.

Can I make a depth map from any photo?

From most photos, yes, but the best ones have the subject nearest the camera and nothing in front of it. The result is relative, and fine hair comes out soft.

Sample file: dog-face.jpg (Resting dog face) · CC0 (David Whelan)

Sources

Drop a photo on the free unmake depth map page and download a 16-bit map at the size and DPI of your engraving.Try it on your own file