Lithophane Workbench

Lithophane Workbench three.js r128 · image to STL

A lithophane maker. Brightness becomes thickness: dark areas print thick and block the light, bright areas print thin and let it through. The relief looks like nothing much until it is lit from behind.

Starting…

Things to try

  • Backlit. Switch the view and the grey relief turns back into the photograph. Rotate it edge-on and it vanishes again.
  • Gamma. Faces usually want a little under 1, so skin doesn't print as a dark slab.
  • Pitch. Go from 0.5 to 0.1 mm and watch the triangle count. A 0.4 mm nozzle can't use most of it.
  • Print it. Stand the panel on its long edge, 100% infill, white filament. Printed flat, the layer steps show as contour lines.

Drag to rotate, scroll or pinch to zoom, double-click to reset. Keys: B backlit, D download, 0 reset view, F full screen.

Pipeline

  1. The image is drawn to a canvas at grid resolution, one pixel per sample, over white.
  2. Each pixel becomes a luminance, is optionally blurred, and maps to a thickness. Border samples are set to the maximum.
  3. The grid becomes the top surface. Walls drop from its rim to a flat base, which fans out from one centre vertex, so the shell is closed with no T-junctions.
  4. The preview and the STL share that one mesh. The file is binary STL in millimetres, flat side on Z = 0.

Thickness

L = 0.2126 R + 0.7152 G + 0.0722 B
t = t_min + (t_max − t_min) · (1 − L^γ)

Light through the plastic falls off roughly exponentially with thickness, so equal steps in t are equal ratios of brightness. The backlit view uses the same rule, exp(−k·t), with a guessed k; real filament varies a lot, so treat it as a sketch and print a test strip.