Why a Depth Map Is Your Best Bet for CNC
When you convert a photo to a 3D model for CNC, the most straightforward method is to create a depth map. A depth map is a grayscale image where brightness represents height: white areas become the highest points, black areas the lowest. CNC software reads this grayscale data and translates it directly into Z-axis movement, cutting shallow where the image is dark and deep where it's light. This makes depth maps ideal for relief carving, where you want a 3D surface that varies in height but doesn't have undercuts.
This approach works because it's essentially a 2.5D carving. You're not creating a full 3D object that you can rotate and inspect from all sides; you're creating a one-sided relief. For many CNC projects—signs, decorative panels, topographic maps—that's exactly what you need.
- White = highest point, black = lowest point.
- CNC software converts grayscale values to Z-axis depth.
- Reliefs are one-sided and cannot represent undercuts.
Tools That Turn Photos into CNC-Ready Models
Several tools can help you generate a depth map or STL file from a photo. ReliefMaker, for example, offers a 'From Photo' mode that uses AI to create a depth map automatically. It also has an 'Upload Depth Map' mode if you already have a grayscale depth map. This tool is specifically designed for CNC relief carving, so it understands the constraints of machining.
For a more general approach, ImageToStl converts PNG or JPG heightmap images or logos into 3D STL mesh files. It offers Extrude and Heightmap conversion modes, a Detail setting (Medium by default, High for detailed images), and an Add Base option with Normal or Outline base types. The resulting STL is described as suitable for 3D printing, CNC machining, or 3D editing software. Just be aware that free online converters often resize large images—ImageToStl, for instance, fits images within 1000 x 1000 pixels.
- ReliefMaker: AI depth map generation from photos.
- ImageToStl: converts heightmaps to STL with detail and base options.
- Free converters may downsize your image.
AI Image-to-3D: Faster but Not Always CNC-Ready
AI image-to-3D tools like Meshy can generate a textured 3D model from a single photo in about a minute. Meshy accepts PNG, JPG, JPEG, or WebP up to 20 MB and lets you download in FBX, OBJ, GLB, USDZ, STL, BLEND, 3MF, or DXF. That's impressive for prototyping or visualization, but these models are often not directly machinable. They may have thin walls, non-manifold geometry, or lack the flat base needed for CNC workholding.
If you go this route, expect to spend time in mesh repair software before you can generate a toolpath. The AI doesn't know you're going to cut the model on a CNC; it's optimized for visual appeal, not manufacturability.
- Meshy generates textured models in about a minute.
- Outputs include STL and DXF, but may need repair.
- AI models are not guaranteed to be watertight or machinable.
When a Single Photo Isn't Enough
Converting a single photo into a full 3D model—not just a relief—is genuinely difficult. A Onefinity CNC forum thread describes photo-to-STL conversion as 'not easy' in Aspire or Fusion, and suggests alternatives like photogrammetry, manual modeling, sketching and extruding in Fusion 360, or paying someone to create the model. The problem is that a single 2D image lacks the depth information needed to reconstruct a full 3D shape. AI can guess, but the results are often unreliable for machining.
Flat, head-on photos of textures or patterns are especially problematic because they contain no depth cues at all. If your photo doesn't have shadows, perspective, or other depth indicators, the AI has nothing to work with.
- Full 3D from one photo is unreliable.
- Photogrammetry or manual modeling may be needed.
- Flat images with no depth cues won't work well.
From Mesh to Toolpath: The CAM Step
Even after you have a clean STL or DXF, you're not done. You still need CAM software to generate toolpaths. The conversion tools themselves don't handle mesh cleanup, watertightness checks, or toolpath generation. You'll need to import your model into software like Fusion 360, VCarve, or Aspire, set up your stock, choose tools, and calculate passes.
This is where the limitations of reliefs become clear. Because they're one-sided, you can't machine undercuts. You'll also need to consider stepover, tool diameter, and wall thickness—none of which are specified by the conversion tools. The brief notes that no source establishes minimum wall thickness or tool diameter requirements for CNC-machined photo-derived models, so you'll need to rely on your CAM software's simulation and your own experience.
- CAM software is required for toolpaths.
- Reliefs can't have undercuts.
- Tool diameter and stepover are up to you.
Frequently asked questions
Can I convert any photo to a CNC-ready 3D model?+
Not every photo works well. Photos with clear depth cues—shadows, perspective, and distinct foreground/background—produce better depth maps. Flat, head-on images of textures or patterns contain no depth information for AI to extract, so they won't yield a good relief.
What file formats do I need for CNC?+
STL is the most common format for 3D meshes, and DXF is often used for 2D profiles or reliefs. Some CAM software may accept other formats, but STL and DXF are widely supported. Always check your CAM software's documentation.
Are the free online converters safe to use?+
The brief doesn't cover pricing, licensing, or commercial-use terms for the tools mentioned. You should review each tool's terms of service before using it for commercial projects. Also note that free converters may resize your image, which can affect detail.