Lithophane maker - fotojockovic.com/lithophane ============================================= Turns a photo into a 3D-printable lithophane (light box, picture frame, flat with stand, curved, lamp, heart, round ornament), shows it lit and unlit in a 3D preview, and exports STL / 3MF. Two more modes: "3D relief" (AI depth -> bas-relief plaque, round, oval, medallion, keychain, plaque with stand; STL, 3MF, OBJ with vertex colours, 16-bit PNG height map for CNC) and "Crystal" (the same depth as a laser point cloud inside a K9 glass cube / block / heart / diamond / iceberg; DXF, PLY, XYZ points and a 2D engraving PNG). Everything runs in the browser; no image leaves the device. Our own work: the mesh generator (src-rs/, Rust compiled to WebAssembly: masked height-field solids with outline snapping and merged flat faces, arc/cylinder bending, swept frame and light-box profiles, extruded stand and back panel, colour (CMY) layer stack, binary STL and 3MF writers), the light-transmission model (Beer-Lambert per colour channel, used both for the thickness mapping and for the backlit preview, with scattering blur), the preview shaders and scene, the ZIP writer, the UI and texts. The physical idea of mapping brightness to thickness through a logarithmic transmittance model is general knowledge (it is also described in Ultimaker Cura's image reader); no code was taken from Cura or any other lithophane tool. Also our own (relief and crystal modes, src-rs/src/relief.rs, src/crystal.js, png.js, pointfiles.js, depthw.js): subject mask from the depth (Otsu threshold), gradient-domain depth compression with a multigrid Poisson solver, luminance band-pass detail, the relief solids (rim with chamfer, keychain tab, stand), the 16-bit PNG writer, the OBJ / DXF (R12 POINT entities) / PLY / XYZ writers, the jittered-grid point sampler, the glass and laser-point preview. Ideas from published research, re-implemented from the papers (no code used): T. Weyrich, J. Deng, C. Barnes, S. Rusinkiewicz, A. Finkelstein, "Digital bas-relief from 3D scenes", SIGGRAPH 2007; N. Otsu, "A threshold selection method from gray-level histograms", 1979; multigrid Poisson solving (Brandt 1977). Everything else that ships to the browser: 1. three.js r186 (npm three 0.186.1), three.js authors - MIT. https://github.com/mrdoob/three.js Bundled and minified into app.js, including the add-ons OrbitControls, EffectComposer, RenderPass, UnrealBloomPass, OutputPass, RoomEnvironment, RoundedBoxGeometry, ConvexGeometry and ConvexHull (all part of three.js, MIT). Licence: LICENSE-three.txt 2. Textures (tex/*.webp: resized, re-encoded). Poly Haven, CC0 1.0 (https://polyhaven.com/license): oak_veneer_01 (wood-filament frame look): tex/oak_d.webp walnut_veneer (table top): tex/walnut_d.webp 3. Sample photos (img/*.jpg: resized, re-encoded): photographs by Foto Jocković from the shop's own gallery on fotojockovic.com (static/img/galerija-04, -07, -14, -16, -34). All rights reserved by Foto Jocković; used here with the owner's permission. Not licensed for reuse. 4. Fonts from Google Fonts (self-hosted), SIL Open Font License 1.1: Inter Tight (Rasmus Andersson et al.), Instrument Serif (Instrument). 5. Depth model (relief and crystal modes, loaded only when a photo of your own needs depth): Depth Anything V2 Small (Lihe Yang, Bingyi Kang, Zilong Huang, Zhen Zhao, Xiaogang Xu, Jiashi Feng, Hengshuang Zhao; 2024). Apache License 2.0 - only the Small model is Apache-2.0 (Base and Large are CC-BY-NC-4.0 and are NOT used). Its DINOv2 backbone (Meta AI) is Apache-2.0. https://huggingface.co/depth-anything/Depth-Anything-V2-Small-hf ONNX exports by onnx-community (Apache-2.0): https://huggingface.co/onnx-community/depth-anything-v2-small model_quantized.onnx (8-bit, WebAssembly path) and model_q4f16.onnx (WebGPU path), unmodified. The files are shared with the 3D Photo tool and served from /static/tools/3dphoto/model/ (licence: /static/tools/3dphoto/model/LICENSE-Depth-Anything-V2-Small.txt), so a device downloads them only once. Depth maps of the sample photos (img/*_d.webp, depth to 12-bit precision in the red and green channels) were made with this model. 6. ONNX Runtime Web 1.30.0 (npm onnxruntime-web), Microsoft - MIT. https://github.com/microsoft/onnxruntime Runs the depth model (WebGPU when available, otherwise WebAssembly). Served from /static/tools/3dphoto/ort/ (licence: /static/tools/3dphoto/ort/LICENSE.txt, third-party notices: ThirdPartyNotices.txt there). 7. Language flags in the language picker (/static/tools/common/i18n.js): simplified flag drawings made for these tools, our own work. Translations of the interface are our own. No GPL code is shipped. The only machine-learning model is Depth Anything V2 Small (Apache-2.0, item 5), and it runs on the device. The Rust crate has no dependencies. Self-hosted web fonts (2026-10-19): Inter Tight, Instrument Serif. SIL Open Font License 1.1. The woff2 files are the ones Google Fonts serves (latin, latin-ext, cyrillic, greek subsets where the family has them), stored on our own server under /static/tools/common/fonts// with each family's licence text (OFL.txt) next to them; stylesheet /static/tools/common/fonts/ui.css. No font request goes to Google.