gizmobench

Lithophane Maker

A lithophane is a thin plate whose thickness follows a picture, so it shows the image when light shines through it. This lithophane maker writes the mesh in your browser and reads the file back before it downloads: each edge must be shared by exactly two triangles, walked in opposite directions, and every normal must point outward, or nothing is downloaded. You set the picture area in millimetres, a border at the thickest setting, the thinnest (white) and thickest (black) points and a grid from 0.2 to 1 mm. Before you download, the page shows the formula it uses, the exact triangle count and file size, a simulated backlit preview of the thickness, and a Relief view of the face as a second view.

imagenone yet

filechoose a picture, or try the example

xmm
mm frame at full thickness
mm, white, most light
mm, black, least light
mm

400 x 300 samples of the picture

thickness = 0.8 + (1 - L) x 2.2 mm
L = (0.299 R + 0.587 G + 0.114 B) / 255
gray 128 L 0.502, 1.90 mm

summarybacklit preview, simulated

Choose a picture to preview

PNG, JPEG, WebP, GIF or BMP. It is read in this browser and never uploaded.

overall
106 x 81 mm with the border
thickness
0.8 to 3.0 mm, flat back
cells
424 x 324 on the 0.25 mm grid
mesh
closed, every normal outward
triangles
552,496
face 274,752, back 274,752, sides 2,992
STL
binary, 27,624,884 bytes (27.6 MB)
preview
lit from behind: thin areas glow, thick areas stay dark. A shading of thickness, not a photo of a print in your filament
Overall
106 x 81 mm
Thickness
0.8 to 3.0 mm
Triangles
552,496
STL
27.6 MB

  • White and black test imagewhite 0.8 mm, black 3.0 mm
    white pixels come out 0.8 mm thick and black pixels 3.0 mm
  • Test mesh checkedevery edge and every face
    closed: each edge is shared by exactly two triangles and every normal points outward
  • Plain white image, 100 x 75 mm, no borderwhite 0.8 mm
    a flat slab 100 x 75 x 0.8 mm, volume 6,000 mm³, matching the formula

Each sample is the mean brightness of the pixels under one grid cell, and each corner of the face takes the mean thickness of the cells around it, so the face is one continuous surface. The back is flat and the border stands at the thickest setting. Each row above is worked out from a small real mesh at your current thickness, the plain-white slab also at your current size, and the middle row switches to your own STL once one has been checked.

Common questions

How do I make a lithophane from a photo?
Press Choose image, or drop a picture on the dark stage: PNG, JPEG, WebP, GIF and BMP files open. Set the width and height of the picture area in millimetres (Keep aspect holds the picture's shape), the border, the thinnest and thickest points and the grid. The preview shows the plate lit from behind. Then press .stl: the page writes the binary STL, checks it and downloads it. The example harbor, a picture drawn by the page, shows the whole process.
How does brightness become thickness?
Each pixel's brightness L is (0.299 R + 0.587 G + 0.114 B) / 255, with any transparent part laid over white. Each grid cell takes the mean L of the pixels under it, and its thickness is thinnest + (1 - L) x (thickest - thinnest), so white is the thinnest point and black the thickest. At 0.8 and 3.0 mm, gray 128 comes out 1.90 mm. Invert swaps the ends. Each corner of the face takes the mean thickness of the cells that touch it, so where white meets black the corners on the seam sit halfway. Border cells are the thickest setting.
What sizes, thicknesses and grids can I set?
Width and height of the picture area run from 10 to 300 mm, the border from 0 to 20 mm, and the thinnest and thickest points from 0.2 to 20 mm, with the thickest at least the thinnest. The grid is 0.2, 0.25, 0.3, 0.4, 0.5 or 1 mm. The page starts at 100 x 75 mm, a 3 mm border, 0.8 to 3.0 mm and a 0.25 mm grid, and it remembers your settings on this device. It does not say which settings suit your printer or filament.
Is the STL watertight?
Yes. The back is flat, the face and the back each cover the full grid, and the four sides join them cell by cell. Before the download, the page reads the file back, joins corners whose coordinates match exactly, and checks that each edge is walked by exactly two triangles in opposite directions, that every stored normal follows its triangle's winding, and that the enclosed volume is positive, which means the normals point outward. A file that fails, or that the browser lacks the memory to check, is not downloaded. Two of the rows under the stage run the same check on small meshes at your current thickness, the plain-white slab also at your current size.
How big will the STL file be?
It is a binary STL: 84 bytes plus 50 per triangle. The face and the back have two triangles a cell and the sides two a cell along the edge, so a grid of X by Y cells makes 4 x X x Y + 4 x (X + Y) triangles. 100 x 75 mm with a 3 mm border at the 0.25 mm grid is 424 x 324 cells, 552,496 triangles and 27,624,884 bytes (27.6 MB). The page writes up to 2,000,000 triangles (100,000,084 bytes) and says so before building anything larger; a coarser grid or a smaller size brings it under.
Does the preview show how my print will look?
No. The backlit preview is a shading of thickness: brightness falls by a fixed factor of exp(-0.9) for each millimetre over 0.5 mm, so thin parts glow and thick parts stay dark. How a real print looks depends on your filament, printer settings and light, which the page cannot know. The Relief view shows the face lit from the upper left.
Is my picture uploaded, and how large a picture can it open?
Nothing is uploaded. The picture is decoded and sampled in this browser tab, and the page remembers only its settings, never the picture. Before decoding, it reads the picture's declared size from its header and refuses one over 16,384 pixels a side or 100 megapixels, with a message saying so. A picture over 8 megapixels is scaled down to about 8 megapixels before it is sampled.

The STL is a closed heightfield mesh in millimetres whose thickness follows the formula on the page: white at your thinnest setting and black at your thickest, the other way round with Invert. How a print looks depends on your filament, printer settings and light, which this page cannot know, so the backlit preview is a simulation, not a photo of a print. It is a decorative model with no strength or structural rating.