IT
OmnvertImage • Document • Network
Apr 10, 2026Updated: Jul 21, 2026intermediate19 minheight-map · stl · relief · png · smoothingPNG / SVG → STL converterMore guides for this tool

Preparing a High-Contrast Height Map for STL

Turn grayscale artwork into predictable relief geometry. Learn contrast control, smoothing, and how to avoid banding and micro-noise before converting to STL.

Prerequisites

Supplies
  • A grayscale height map PNG (preferably 16-bit)
Tools
  • An editor that supports 16-bit (Krita, Photoshop, or Affinity Photo)
  • Omnvert converter
  • A slicer (for relief preview)

Step-by-step

  1. Start from 16-bit if you can

    A higher bit-depth height map reduces banding. If you must use 8-bit, keep gradients smooth and avoid aggressive contrast jumps. An 8-bit greyscale gives you 256 discrete levels. Across 4 mm of relief that is 15.6 microns per step, which sounds generous until you print a slow gradient — a sky, a cheek, a background wash — and every level boundary shows up as a terrace running across the surface. 16-bit gives 65,536 levels and pushes those steps well below anything the layer height can resolve. Photoshop, Krita and GIMP 2.10+ all handle 16-bit greyscale PNG; the file is twice the size and that is the entire cost.

  2. Normalize to clean grayscale

    Convert to a single-channel grayscale image. Remove color noise and keep the background uniform. If the source has JPEG blocks, switch to PNG early to avoid amplifying artifacts. Actually drop the image to one channel rather than leaving an RGB file that merely looks grey; a converter that averages three channels will happily pick up chroma noise you cannot see on screen. Then read the histogram. If the background is meant to be the base plane it should sit at a single value — pure black at 0 for the lowest point — not drift between 3 and 11 across the frame, because that drift turns into a gently sloping floor that ruins how the piece seats.

  3. Clean noise and compressional artifacts

    Run light denoise or a tiny Gaussian blur. The goal is to remove speckles that would become spikes in the relief mesh. A 0.5–1.0 px Gaussian is usually enough on a clean scan; a photo shot at high ISO wants a proper denoiser first. Judge the amount by what one stray pixel would become in Z. On a 60 mm map rendered at 1800 px, a single pixel is 33 microns in X — but a full-range white speck is millimetres tall in Z, a needle sticking out of the surface for the nozzle to knock off and drag across the print. Blur is cheap insurance. Past about 2 px, though, you start rounding off the edges you wanted to keep.

  4. Control contrast without clipping

    Use levels/curves to set the dynamic range, but avoid crushing blacks/whites into flat plateaus unless that’s intentional. Clipping produces terraces and visible banding in the printed relief. Treat the greyscale range as your relief depth budget. If the model is 4 mm tall in Z and the artwork only uses values 60–190, you are throwing away half the available depth and the print comes out flat and mushy. Stretch the range so the deepest point sits at or near 0 and the highest near 255 (or 65535), but leave a little headroom at both ends — a handful of clipped white pixels become a plateau exactly where a nose or a hairline should still have detail.

  5. Convert to STL and validate relief

    Upload the PNG to the PNG / SVG → STL converter, then inspect the surface in your slicer preview. If you see stepping/banding, reduce contrast or increase source bit-depth. Match the map’s pixel count to the size you are printing, not to whatever the camera produced. One sample every 0.1 mm is plenty for FDM: a 100 mm plaque needs about 1000 px across, and a 6000 px source only buys triangles. Every pixel in a height field becomes two triangles, so 6000 × 4000 is 48 million of them — a file most slicers open slowly and some refuse outright. Downsample with Lanczos or bicubic before conversion; it averages out residual noise for free.

  6. Sanity-check thickness and scale

    Relief prints still need a base and a print-safe thickness. Verify X/Y/Z in the slicer and use Scaling & thickness as a reference for mm sizing. Give the piece a real base under the relief. 1.5–2 mm is a sensible floor for a plaque you intend to hang; below about 1 mm a flat panel curls off the bed as it cools and takes the relief with it. Base thickness is separate from relief depth — a 3 mm total height with a 2 mm base leaves only 1 mm of modulation, which is often exactly right for a subtle carved look and far too little for a portrait.

  7. Invert when you want intaglio instead of relief

    Height maps assume white is high. Invert the image and white becomes the deepest cut, which is what you want for stamps, moulds and press tooling where the printed part is the negative of the finished object. Two things change when you invert. The background that used to be your base plane becomes the top surface and now has to be a clean solid value. And the finest details point into the material, where the nozzle has to reach them — a detail that prints happily as a 0.6 mm ridge often fails as a 0.6 mm groove, because a slot narrower than about 1 mm never gets a clean perimeter on either wall. Widen those strokes before you invert, not after.

  8. Dial in lithophane thickness and backlight

    Lithophanes are height maps read in transmission, so the numbers change. Thin means bright: 0.6–0.8 mm for the whitest highlights, 2.5–3.0 mm for solid black, with the grey range mapped in between. Print them standing on the short edge at 0.1 mm layers, 100% infill, no top or bottom shell beyond the walls, in white or natural PLA — pigmented filament kills contrast. Slow to 30–40 mm/s so the perimeters fuse properly; any gap between them reads as a bright pinhole once the panel is lit. And remember to invert the source, because in a lithophane the darkest part of the picture is the thickest plastic.

  9. Preview the relief before you commit an hour to it

    Open the STL and look at it from a raking angle with a light, not straight on. Grazing light exposes terraces, the ringing halos left by oversharpening, and the sharp cliffs where a levels adjustment clipped. Then slice it and step through the layer preview around quarter and half height: if a large area of the model appears or disappears between two adjacent layers, you have a plateau that will print as a visible shelf. Fixing that in the image takes a minute. Finding it after a four-hour print costs four hours.

Avoiding banding

  • Prefer smooth gradients over posterized ramps.
  • If you need strong contrast, apply it after denoise/smoothing — not before.
  1. Convert to grayscale, then denoise lightly.
  2. Use levels/curves to set dynamic range without clipping.
  3. Export as PNG (prefer 16-bit), keep it lossless.
  4. Convert to STL and validate the relief in slicer preview.

Relief printing tips

For shallow reliefs, use smaller layer heights (0.12–0.16 mm) to reduce stepping. For deeper reliefs, consider variable layer height if your slicer supports it.

Bit depth, banding, and the depth budget

Every grey value in the map lands on one Z position. Divide the relief depth by the number of distinct values and you get the vertical step the geometry can express, which is a different number from what the printer can resolve. Compare the two and you know which one is limiting you.

Where the steps actually come fromtext
relief depth            4.0 mm
8-bit   4.0 / 255    =  0.0157 mm per level
16-bit  4.0 / 65535  =  0.00006 mm per level
layer height            0.16 mm

-> at 4 mm the 8-bit step is already 10x finer than a layer;
   visible banding is coming from posterised SOURCE data,
   not from the export bit depth

That arithmetic is why 8-bit maps often print fine and why 16-bit still matters: the damage happens while you edit, not at export. Stretch a 60–190 range up to full scale in 8-bit and you have 130 real levels spread across 256 slots and a comb-shaped histogram. Two more curve tweaks and the gaps are wide enough to see in the print. In 16-bit the same edits leave the ramp continuous. Work in 16-bit, and drop to 8-bit at the very end only if a tool demands it.

Resolution versus mesh density

A height field mesh carries two triangles per pixel, so resolution multiplies straight into file size and slicing time. Past a certain point the extra pixels only describe detail the nozzle can never place.

  • 0.1 mm per sample is the practical ceiling for a 0.4 mm nozzle — that is per millimetre of print, not per pixel of source.
  • A 100 mm wide plaque is well served by 1000–1200 px; 4000 px gives 32 M triangles and no extra detail.
  • Lithophanes are the exception: 0.05 mm per sample pays off because you read them in transmission, not by touch.
  • Downsample first, then denoise — doing it the other way round re-introduces aliasing.
  • If the exported STL passes roughly 200 MB, the resolution is wrong rather than the exporter.

Base thickness and why flat panels curl

A relief with no base is a sheet of plastic 1 mm thick and 120 mm wide, and it will lift at the corners on almost any bed. Put 1.5–2 mm of solid base under the lowest point of the relief, use four or five bottom layers, and give it a 5 mm brim. If the piece is going on a wall, model the keyhole slot into the base instead of gluing a hanger on later — a 4 mm deep pocket costs nothing and survives being knocked off a nail. Above 150 mm, ribs on the back stiffen the panel far more efficiently than thickening the whole base, and they cut print time while they are at it.

Sharpening is not detail

Unsharp mask and clarity sliders add bright and dark halos on either side of an edge. In a photograph they read as crispness; in a height map they are literal ridges and trenches a few tenths of a millimetre proud of the surface, running around every contour. If the print looks like somebody outlined everything, undo the sharpening at the source instead of sanding it off afterwards.

Related