I built this to turn any image into a clean, CNC-ready depth map — locally, on your own GPU. No cloud, no uploads, no subscription, no account.
I had Skyrim texture modding in mind when I started (bas-relief armor, ornament, and prop textures), but I've used it on plenty of other photos and textures too — anything you want turned into a height/depth map.
Current version: V0.8.0
I built two separate generation modes, since they trade off speed against real depth understanding:
- Relief mode — a pure algorithmic pipeline (de-lighting, frequency-band separation, tone mapping). No AI model involved, no GPU required, updates live as you drag sliders. I use this when I just need a quick, predictable result from a fairly flat texture photo.
- AI Depth mode — local neural depth estimation, running entirely on your own machine through ONNX Runtime with DirectML. I ship two model sizes:
- Large — Depth-Anything V2, the default.
- Pro — a different architecture (DPT-Hybrid/MiDaS), for when I want a second opinion rather than just a bigger version of the same model.
- HQ Tiled, when checked, runs large textures through the model in overlapping tiles near its native resolution instead of one global low-res pass — I'd recommend leaving this on for anything beyond a quick preview, since without it you're not getting the model's real detail resolution regardless of which model you picked.
Once you've run Generate at least once, I lock in the tone-mapping range for that image — so dragging sliders afterward changes contrast and detail within a stable frame of reference, rather than the whole image re-normalizing (and looking like the depth "flipped") on every tweak. Clicking Generate again computes a fresh range.
- De-Light (Flatten / Radius) — removes broad lighting gradients from the source photo before anything else touches it. Also the main lever if you're seeing a "pillow" bulge on a tiling texture.
- Frequency bands — Macro (huge soft volumes) → Low → Mid → High → Detail → Micro (finest sub-pixel grain). In AI mode these reshape the depth model's own output, not just the source photo's colors, which is why Small/Large/Pro actually look different from each other when these are engaged.
- Clarity — a local-contrast punch, distinct from the frequency bands; makes surfaces read as more defined without touching the fine grain or the overall brightness curve.
- Tone (Gamma, Shadows, Midtones, Highlights, 2%-98% percentile) — standard tonal shaping.
- Seamless blend / Zero Mid-Gray / Invert / Remove BG / Auto-Crop to Subject — the usual texture-prep tools I found I kept needing.
- Auto-Suggest Settings — analyzes the loaded image's contrast, edge/texture density, and large-scale structure with plain OpenCV statistics, and proposes starting slider values from that. I want to be upfront that this is a heuristic, not a trained model — treat it as a reasonable starting point to tune from, not a final answer.
- ? Ask — a small offline FAQ panel. Type a keyword (macro, clarity, hq tiled, pillow, model, export...) and it'll match against a curated list of answers about what each control does. It's plain keyword matching, not a real conversational AI — I didn't want to quietly break the "100% local" promise above by wiring this up to a cloud model.
- Presets — Save/Load to a
.jsonfile, plus 7 quick-access preset slots I can name and recall without leaving the app. - Normal Map and Cavity/AO Map generation — both derived directly from the depth map (not separate AI models). The AO map is a cheap approximation via a blurred difference, not a physically-based render — good enough to add some crease shadowing in a 3D tool, not meant to replace a real bake.
- 3D Preview — a live-rotating viewport built from the same downsampled grid the STL/OBJ export uses, so what you see in the viewport is what you get in the mesh.
- Batch Process Folder — applies your current settings to every image in a folder.
- Progress bar + pipeline indicator — I got tired of not knowing whether AI or Relief actually ran, or what resolution the model really computed at versus what got upsampled, so both are now always visible above the preview.
- Large Text toggle, if the sidebar's default size is hard to read.
Hardware
- Windows 10/11, 64-bit
- A DirectX 12–capable GPU (any modern NVIDIA, AMD, or Intel GPU works via DirectML — an RTX card isn't required, though it'll run faster). CPU-only also works, just slower.
- 16 GB RAM recommended
Model files
This build ships with model_large.onnx and model_pro.onnx expected in the app's Models folder. Relief mode works without either of these. If you're missing one, the corresponding radio button will show a "not found" status rather than silently failing — check the status text (or the log, see below) if a model doesn't seem to be doing anything.
No CUDA Toolkit, cuDNN, or separate NVIDIA driver install is required — GPU acceleration goes through DirectML, which ships with Windows.
- Launch AnvilDepth.
- Drag an image onto the window (or click the drop zone to browse for one).
- Leave Use AI unchecked for the fast Relief pipeline, or check it and pick Large or Pro for AI Depth mode.
- Click Auto-Suggest Settings if you want a starting point, or just start dragging sliders — Relief mode updates live; AI mode needs one click of Generate first, then live-updates from there.
- Export as 8-bit/16-bit PNG, 32-bit EXR/TIFF, STL, or OBJ — or hit Save All Maps to write everything at once.
- The pipeline indicator above the preview is the source of truth. If it's orange and says "RELIEF," no AI model touched that result, regardless of what's selected in the sidebar. If it's green, it names the model that actually ran and the resolution it actually computed at (not the output size — those are two different numbers, and I've made sure the label never conflates them).
- HQ Tiled matters more than which model you pick. Without it, every model size gets bottlenecked through the same coarse global pass and can look nearly identical. Turn it on before judging model quality.
- Large textures (2048px+) will feel slower to process — this is expected, it's a "click Generate and wait" tool in AI mode, not real-time.
- STL/OBJ export is capped at a 256×256 sampled grid to keep triangle counts sane for slicers/CAM tools.
- Seamless blend is a tiling aid for repeating textures, not a pixel-perfect guarantee at the corners.
- If something crashes or behaves strangely, check
Open Logs Folderin the app — every model load, generation, and slider live-update writes a line there, including the exact model file and resolution involved. I've found this catches almost everything faster than guessing.
This is a small, local tool — there's no online service or account behind it. Most failures (missing model file, a codec issue) show a plain-English reason in the status text. For anything that doesn't, the logs folder is the first place I'd look.
With thanks to Mazze45 for guidance in refining and creating this tool.
