A web app for a Raspberry Pi with a camera in a small fixed booth: put a model in, open the page on your phone or PC, and shoot. Lighting, camera settings and framing stay the same, so every model gets a consistent photo without setting everything up again. Focus stacking merges several shots into one sharp image in the background.
Shot with a Raspberry Pi 3B and the HQ Camera (5-50 mm varifocal, manual focus) in a black booth. Both are 8-frame stacks with the halo-free method: manual exposure 97 ms (~1/10 s), gain 1.0, white balance locked, so all frames are identical. Processing on the Pi 3B took 132 s and 176 s.
Chaos Chariot, painted by Michael Timmermans.
Skaven Verminlord, painted by Michael Timmermans.
Each source frame of the Verminlord is sharp at one depth only; the stack combines them:
At 100 % — a single frame (focused on the base) next to the stacked result:
The whole studio in one browser window — live preview with crop frame, clipping warning and focus check on the left, histogram in the middle, capture controls on the right. Works on a phone too.
A closed box keeps the light and background identical for every model: the camera looks in through the front, the Pi sits on the back, and the walls are painted with Black 3.0. The 3D-printable parts are on Thingiverse: thing:7416432.
The booth, closed | Open front, Pi at the back | Lit interior, Black 3.0 walls |
HQ camera looking in | Pi 3B, power HAT and USB disk | Tilt bracket with locking knob |
- Live preview with grid, histogram, clipping warning and a 100 % focus check
- Every camera control in the browser, with presets that load at boot
- Photos, video, and focus stacking — manual, or an automatic lens sweep on autofocus cameras — with a halo-free method made for black backdrops
- Crop to a tall or wide frame before shooting
- Fast captures: saving, compressing, stacking and uploading run in the background
- Storage on the SD card or a USB disk; upload to Google Drive or a NAS
- Gallery with multi-select, System tab with Pi stats, logs, reboot/shutdown
- Updates from the web app; runs on a Raspberry Pi 3B
On a Raspberry Pi running Raspberry Pi OS (Bookworm or newer), as your normal user:
curl -fsSL https://raw.githubusercontent.com/MichaelTimmermans/MiniatureStudio/main/install.sh | bashOr from a clone:
git clone --recurse-submodules https://github.com/MichaelTimmermans/MiniatureStudio.git
cd MiniatureStudio && ./install.shThe installer:
- installs the system packages from
apt-packages.txt(picamera2, Flask, OpenCV, ffmpeg, rclone, cifs-utils, nfs-common, …); - clones the app to
/opt/miniaturestudio(or uses your clone); - builds focus-stack from
vendor/focus-stack(a git submodule) — roughly a quarter of an hour on a Pi 3B; - installs a small root helper for mounting a USB disk or NAS;
- installs the
miniaturestudiosystemd service (starts at boot).
Then open http://<hostname>.local:8000.
- In the web app: Settings → Check for updates → Install update. The app restarts by itself.
- Or in a terminal:
miniaturestudio-update(--checkto only look).
Updates follow the main branch via git pull. New system packages, a new
focus-stack version or a new mount helper are picked up automatically.
Opening the page while the app restarts can briefly show "focus-stack
missing"; the page retries by itself.
- Hardware — tested setup, lens and aperture, the 3D-printable booth, supported cameras, Raspberry Pi 3B notes
- Camera settings — starting settings for miniatures, presets, preview vs. photo
- Focus stacking — manual stacks, lens sweep, the halo-free method, tips
- Cropping — tall or wide models
- Storage and upload — file names, gallery, USB disk, Google Drive, NAS
- Speed — what runs in the background
- Troubleshooting — System tab, logs, common problems
Raspberry Pi 3B, Raspberry Pi HQ Camera (IMX477) with a 5-50 mm C-mount varifocal lens, in a black booth — the 3D-printable parts are on Thingiverse: thing:7416432. A USB webcam (Sony IMX179) works too. Details and other cameras: Hardware.
MIT — see LICENSE.
The bundled focus-stack is © Petteri Aimonen, also MIT (see vendor/focus-stack/LICENSE.md).
This project was developed with the help of Claude Code, Anthropic's AI coding assistant.





0 comments
log in to comment.