The Xometry app works best with JavaScript enabled!
Resources3D Printing DesignImage to STL: How to Convert Images into STL Files for 3D Printing

Image to STL: How to Convert Images into STL Files for 3D Printing

Megan Conniff - Xometry Contributor
Written by
 38 min read
Published June 22, 2026

To convert images into STL files for 3D printing, some pipelines use vector-based extrusion (e.g., SVG paths) instead of pixel brightness. Image to STL converters automate the process by interpreting pixel data as height instructions, assigning each brightness value, which are typically normalized (e.g., 0–255 → min/max height range), before mapping to Z-axis displacement. Heightmap techniques drive the core of the conversion, where light pixels become raised surfaces and dark pixels become recessed ones, building a physical topography from tonal variation. Mesh generation creates triangular faces, but additional steps (e.g., watertight sealing, base thickness extrusion) are often required to produce a closed manifold suitable for printing.

Designers use the process to extrude logos and brand marks into dimensional badges, plaques, and embossed panels directly from existing artwork. Hobbyists convert portrait photographs into lithophanes, turning tonal gradations into translucent relief panels that reveal the original image under backlight. Engineers prototype embossed labels, textured inserts, and surface-detailed components from scanned drawings without rebuilding geometry in CAD software. The full workflow spans image selection, grayscale preparation, converter settings, mesh repair, slicing, and final output, making it accessible to users across skill levels. The process reduces the gap but does not eliminate it; manual adjustments, scaling, and print optimization are often required. 

1. Choose a High-Contrast Image and Save.

Choosing a high-contrast image is the first step because tonal separation across light and dark areas determines how much depth variation appears in the final 3D mesh. High contrast increases tonal separation, but values do not need to reach pure white (255) or pure black (0); usable heightmaps can operate across intermediate grayscale ranges. Images with flat, low-contrast tones generate shallow, indistinct geometry where surface features blur together and lose legibility in the printed output. Portraits with strong lighting, bold logos on plain backgrounds, and black-and-white line art qualify as effective source material. The PNG and BMP formats are lossless and suitable, but other formats like TIFF are also valid; high-quality JPEG can be acceptable if compression artifacts are minimal

2. Convert to Grayscale and Increase Contrast in GIMP or Photoshop.

Converting to grayscale and increasing contrast in GIMP or Photoshop prepares the image for accurate heightmap generation by reducing it to a single brightness channel and maximizing its tonal range. Open the image in GIMP via Image, Mode, or in Photoshop via Image, Mode, to strip color data and leave luminance values. Apply a Levels adjustment by opening Image Levels in either application, and dragging the black point slider right and the white point slider left until shadows reach 0 and highlights reach 255.  Full 0–255 usage allows maximum possible depth range, but actual depth variation depends on scaling settings in the conversion tool and may not require full range utilization. Save the processed image as PNG after adjustment to lock in the edited pixel values without reintroducing compression loss.

3. Upload to Lithophane Maker and Generate STL.

Uploading to a Lithophane Maker tool and generating the STL converts the prepared grayscale image into a printable 3D relief model through automated heightmap processing. Navigate to a browser-based tool (ItsLitho at itslitho.com or 3DP Rocks at 3dp.rocks) and click the upload or import button to load the grayscale PNG file. Set the maximum thickness from 3 mm to 8 mm, depending on the desired depth of relief, and define the base thickness at a minimum of 1 mm to 2 mm to create a structurally sound bottom layer. Adjust border width and plate orientation (flat, curved, or cylindrical) based on the intended display or mounting method for the final print. Click the generate or create button, wait for the tool to generate a mesh from the heightmap, but additional post-processing may still be required for optimization. STL is typically ready for slicing, but users may need to verify scale, orientation, and mesh integrity before printing.

4. (Optional) Use Blender With the Displace Modifier for Custom Depth.

Using Blender with the Displace Modifier gives full manual control over how the grayscale image maps to 3D surface depth, enabling precise customization beyond what browser-based tools provide. Open Blender, add a Plane object via the Subdivide function in Edit Mode to create a dense vertex grid that captures fine image detail. In the Properties panel, add a new Texture, set its type to Image or Movie, and load the prepared grayscale PNG as the texture source. Return to the modifier stack, add a Displace Modifier to the plane, and assign the created texture to it to control the physical depth of the surface displacement. Review the displaced mesh in the 3D viewport, refine the strength until the surface geometry matches the intended relief depth, then proceed to export.

5. Export/Download STL File.

Exporting or downloading the STL file captures the generated mesh in a format that slicing software and 3D printers read directly. In a browser-based tool, click the download button after generation completes and save the file to a designated project folder on the local drive. In Blender, apply active modifiers by right-clicking the Displace Modifier and selecting Apply, then select the mesh object, navigate to File, Export, STL, and confirm the export settings. Set the scale to match the intended physical print dimensions, ensuring the unit system (millimeters) aligns with the slicer's default unit setting to avoid unintended size changes after import. Save the file in binary STL format rather than ASCII, as binary files are smaller in size and process faster in slicing applications without any loss of geometric accuracy.

6. Repair Mesh in Meshmixer.

Repairing the mesh in Meshmixer removes geometric errors from the exported STL that prevent slicers from generating valid toolpaths. Open Autodesk Meshmixer, import the STL file via File, Import, and navigate to Analysis Inspector to run an automated scan of the mesh geometry. The Inspector tool highlights problem areas with colored pins, marking open boundaries in red, non-manifold edges in blue, and small disconnected components in white. Click the Auto Repair button to apply Meshmixer's automated fixes across detected error types in a single operation. After repair, re-export the corrected file via File, Export STL, and save it as a new version to preserve the original file, then confirm the repaired STL loads cleanly in the slicer before proceeding.

7. Import Into Cura or PrusaSlicer and Set Print Settings.

Importing into Cura or PrusaSlicer and setting print parameters configures the model for the specific printer and material before slicing begins. Open the slicer application, click the folder or import icon, and load the repaired STL file onto the virtual print bed. Position and scale the model as needed, ensuring the flat base sits flush against the bed surface to maximize adhesion during printing. Set layer height from 0.1 mm to 0.15 mm for image-derived relief models, as finer layers capture higher surface detail than the standard 0.2 mm setting. Enable a brim or raft if the base footprint is narrow or the model lacks a wide flat contact area, and confirm support structures are off for flat-based relief geometry that requires none.

8. Slice and Export G-Code.

Slicing the model and exporting G-code translates the 3D geometry into a sequence of machine instructions that the printer executes layer by layer. Click the Slice button in Cura or PrusaSlicer to run the slicing algorithm, which processes each layer of the model from base to top and calculates the nozzle path for each one. Review the layer preview by scrubbing through the slider to verify that surface detail appears intact, the base layers are solid, and no geometry is missing or misrepresented in the toolpath visualization. Check the estimated print time and material usage displayed after slicing to confirm the settings produce a practical job within available time and filament constraints. Click Save to File or Export G-code to write the finished instruction file to an SD card, USB drive, or direct printer connection, readying the job for physical production.

9. Load and 3D Print.

Loading the G-code file onto the printer initiates the final stage, where the prepared digital model becomes a tangible physical object. Transfer the G-code to the printer via SD card, USB drive, or a direct network connection, depending on the printer's interface. Level the build plate and confirm nozzle and bed temperatures match the loaded filament material, PLA at 190°C to 220°C nozzle and 50°C to 60°C bed, PETG at 230°C to 250°C nozzle and 70°C to 85°C bed. Monitor the first two to three layers to verify consistent extrusion and proper bed adhesion before leaving the job unattended. Each image-derived relief model, lithophane, or logo extrusion reaches its intended form through a clean, well-calibrated 3D Print executed on a properly prepared machine.

What Is an Image to STL Converter?

An image to STL converter is a software tool that reads pixel data from a 2D image file and generates a 3D mesh in STL format, ready for printing or further editing. The conversion process begins with image processing, where the tool analyzes pixel brightness across the entire image. Grayscale mapping assigns each pixel a numeric value from 0 (black) to 255 (white), and the converter translates the values into vertical height coordinates. A heightmap forms from the data, representing the surface topography of the intended 3D model. The converter then generates a triangle mesh over the heightmap.

Input formats (JPG, PNG) feed directly into the algorithm, though each behaves differently depending on compression type. JPG files use lossy compression that introduces artifacts at pixel edges, which create jagged transitions in the mesh. PNG files preserve exact pixel values without compression loss, producing cleaner heightmaps and smoother mesh surfaces. The algorithm reads each pixel's brightness, maps it to a Z-axis height value, and positions a corresponding vertex in 3D space. After processing the full image, the tool connects entire vertices into triangular faces and exports the complete mesh as a binary or ASCII STL file. Flat raster images (JPG, BMP) work well for relief-style outputs, while vector-based inputs produce sharper extrusion edges. Converting a PNG to STL through a lossless pipeline consistently yields better mesh quality than compressed raster alternatives.

How Does an Image Become a 3D Model in STL Format?

An image becomes a 3D Model in STL Format by following the seven steps listed below.

  1. Upload the Source Image. Select a high-contrast image in PNG, JPG, or BMP format and upload it to the converter tool. The tool reads the image dimensions and pixel data to prepare it for processing. Larger images with higher pixel counts produce additional detailed meshes.
  2. Preprocess the Image. Resize the image to a resolution range that is context-dependent; optimal resolution depends on desired print size, printer resolution, and performance limits. not fixed pixel ranges. Remove background noise and flatten unnecessary color channels to reduce mesh complexity. Preprocessing reduces errors in later stages and produces a cleaner heightmap.
  3. Convert to Grayscale. Strip color data from the image and reduce it to a single-channel grayscale map. Each pixel now holds a single brightness value from 0 to 255 that the converter reads as a height instruction. Bright areas become raised surfaces, and dark areas become recessed ones.
  4. Generate the Depth Map. The converter assigns a Z-axis height value to each pixel based on its grayscale intensity. High-brightness pixels receive greater height values, and low-brightness pixels receive lower or zero values. The resulting depth map portrays the three-dimensional topography of the future model.
  5. Build the Mesh. The tool places a vertex in 3D space for each pixel coordinate and its corresponding Z value. Triangular faces connect adjacent vertices to form a continuous surface mesh. Mesh density depends on image resolution and the polygon count setting chosen in the converter.
  6. Add a Base Layer. A flat base layer attaches below the mesh surface to close the geometry and create a watertight solid. The base thickness setting controls how thick the bottom of the model is, commonly from 1 mm to 5 mm. A closed solid is a requirement for valid STL geometry.
  7. Export the Mesh as STL. The tool finalizes the geometry and exports it as a binary or ASCII STL file. Binary STL files are smaller and process faster in slicing software. Checking the STL Format specification before export confirms the file meets the triangle normal and vertex ordering requirements that slicers expect.

The workflow moves from image upload through grayscale conversion, depth mapping, mesh generation, and base attachment before reaching export. Common pitfalls include skipping preprocessing, which creates noisy meshes, and using low-resolution images, which produce blocky geometry with poor surface detail. Running a mesh repair step after export catches any errors before slicing.

Image-to-STL conversion is a data translation process in which 2D pixel intensity is mapped into 3D geometry through heightmap generation and mesh construction. Each pixel becomes a vertex with a Z-value proportional to grayscale brightness, and the resulting field is triangulated into a continuous surface suitable for printing. Model fidelity is constrained by image resolution and contrast, which control vertex density and depth variation. High-resolution, high-contrast inputs yield smooth gradients and defined features, while low-quality images produce noisy, shallow meshes with limited clarity. The process removes the need for manual CAD modeling but restricts output to surface relief rather than true volumetric geometry. Mesh repair and validation are required to ensure watertightness and slicer compatibility. In practice, it is best suited for relief-based applications such as lithophanes, embossed features, and topographic models, where depth is derived from tonal variation rather than explicit geometry.
Mahder Tewolde
Dr. Mahder Tewolde PhD

What File Types Can Be Converted to STL?

The file types that can be converted to STL are listed below.

  • JPG (JPEG): JPG is a raster format that uses lossy compression, which introduces pixel artifacts at edges and gradients. The converter reads brightness values from the compressed pixel grid, but artifact noise creates irregular height spikes in the mesh. JPG files work acceptably for low-detail relief outputs but produce inferior results compared to lossless formats.
  • PNG: PNG is a lossless raster format that preserves exact pixel values without compression artifacts. The converter reads clean, accurate brightness data and translates it into smoother heightmaps with precise mesh surfaces. PNG files produce the best results among raster formats and are the preferred input for heightmap-based conversion.
  • BMP: BMP is an uncompressed raster format that stores raw pixel data without any encoding loss. The full pixel fidelity makes BMP a reliable input for converters that process brightness-to-height mapping. Large file sizes stand as the main drawback, but output quality matches PNG across standard conversion workflows.
  • SVG: SVG is a vector format that defines shapes through mathematical paths rather than pixel grids. Converters trace the vector outlines and extrude them to a set depth, producing flat-bottomed 3D shapes with clean, sharp edges. SVG files outperform raster formats for logo extrusion and text-based 3D models because edges stay precise at any scale.
  • TIFF: TIFF supports high bit-depth grayscale data, making it effective for detailed heightmap conversion. A 16-bit TIFF file stores 65,536 brightness levels, compared to 256 levels in an 8-bit PNG, producing far more precise depth gradations in the final mesh.TIFF is the preferred format for professional-grade lithophane and topographic relief work.
  • OBJ: OBJ stores vertex positions, face data, and texture coordinates as a dedicated 3D geometry format built for mesh exchange. Converting OBJ to STL repackages the existing mesh data into the triangle-based STL structure without generating a heightmap. The format converts with high accuracy because OBJ files already carry full 3D geometry that maps directly into STL's triangle face structure.

Can You Convert OBJ to STL?

Yes, you can convert OBJ to STL. Converting OBJ to STL is a straightforward process because the two formats store 3D mesh geometry. OBJ files hold vertex positions, polygon face definitions, and optional texture and material references, while STL files store solely the triangular face data and surface normals needed for printing. The conversion reads the OBJ mesh, triangulates any non-triangular polygons (quads or n-gons), and writes the resulting triangle list into STL format. Tools including Blender, MeshLab, and FreeCAD handle the process without altering the underlying geometry. The output retains the original model's shape and proportions, though texture and material data do not carry over since STL stores no color or surface property information. Running a mesh repair after conversion catches any non-manifold edges or open surfaces that appear during triangulation. The full workflow for OBJ to STL conversion, including tool-specific steps and export settings, is covered in detail for users working with existing 3D assets rather than image-derived geometry.

Can you convert JPG, PNG, and STL directly?

Yes, you can convert JPG, PNG, and STL directly. The JPG, PNG, and STL files convert through dedicated tools that interpret pixel data or existing mesh geometry without requiring intermediate format changes. JPG and PNG files feed into heightmap-based converters that read pixel brightness values and map them to Z-axis height positions, generating 3D geometry from flat image data in a single automated step. Direct conversion works best when the source image carries strong tonal contrast, as the converter relies entirely on brightness variation to construct depth since neither JPG nor PNG stores any native 3D information. Low-contrast images, heavily compressed JPGs, and images with complex backgrounds produce flat, noisy meshes that demand extensive post-processing before reaching a printable state. Extrusion mode offers an alternative path for JPG and PNG input, tracing the outline of detected shapes and pushing them to a fixed depth rather than generating a variable-height surface. Tools including ItsLitho, Selva3D, and Tinkercad's image import feature accept raster input and perform direct conversion without additional preprocessing software. Any reliable STL converter that supports raster input applies either heightmap generation or outline extrusion to bridge the gap across a flat image file and a printable three-dimensional model.

What Are the Best STL Converters Available?

The best STL converters available are listed below.

  • Blender: Blender is a free, open-source 3D modeling application that the Displace Modifier and heightmap workflow. It handles complex mesh editing, supports PNG and BMP grayscale input, and exports binary and ASCII STL files. Users who need full control over mesh density, depth scaling, and geometry cleanup rank Blender among the best STL converters for advanced image-to-relief production.
  • MeshLab: MeshLab is a free, open-source mesh processing tool that converts OBJ, PLY, and other 3D formats to STL with high accuracy. It excels at mesh repair, simplification, and remeshing operations before final STL export. MeshLab is the preferred choice for users working with scan data or high-polygon models that require cleanup before printing.
  • ItsLitho: ItsLitho is a free browser-based tool that converts PNG and JPG images into lithophane STL files through automated heightmap processing. The tool provides controls for thickness, border size, and curve type, making it straightforward for beginners. ItsLitho works best for single-image lithophane projects and produces clean, watertight STL output without requiring desktop software.
  • Selva3D: Selva3D is an online converter that accepts JPG, PNG, and SVG inputs and generates extruded or heightmap-based STL files. The platform offers adjustable extrusion depth and smoothing options directly in the browser. Selva3D suits hobbyists and designers who need a quick conversion without installing software.
  • Autodesk Fusion 360: Fusion 360 is a professional CAD platform that converts 2D sketches and imported images into precise parametric 3D models exported as STL. The tool supports dimension-accurate extrusion and surface modeling far beyond what heightmap tools provide. Fusion 360 targets engineers and product designers who require manufacturing-grade accuracy in their STL output.
  • FreeCAD: FreeCAD is a free, open-source parametric CAD application that converts 2D drawings and imported raster images into solid 3D models exported as STL. The Image Workbench feature allows direct image import as a reference for modeling. FreeCAD suits technical users who need parametric control without paying for commercial CAD software.
  • Meshmixer: Meshmixer is a free mesh editing and repair tool from Autodesk that processes STL files after initial conversion, fixing errors and optimizing geometry. It supports mesh sculpting, hollowing, and support structure generation before final export. Meshmixer functions best as a post-conversion repair and refinement tool in the broader STL workflow.

Which Free Image to STL Converters Offer the Best Results?

The free image-to-STL converters that offer the best results are listed below.

  • ItsLitho: ItsLitho processes PNG and JPG files reaching 20 MB in size and generates watertight lithophane STL files automatically. The tool includes controls for model thickness (from 0.5 mm to 10 mm), border width, and curved or flat plate orientation. ItsLitho does not support smoothing or advanced mesh editing, but the output requires minimal repair before slicing.
  • 3DP Rocks Lithophane Maker: 3DP Rocks accepts PNG, JPG, and BMP input and converts them into flat, cylindrical, or spherical lithophane STL models. The platform allows resolution adjustments and provides a 3D preview before download. Output quality is high for photographic images with a strong tonal range, though file size limits apply on the free tier.
  • Selva3D: Selva3D converts JPG, PNG, and SVG files to STL through extrusion or heightmap mode, with adjustable depth and basic smoothing options. The free tier restricts output resolution and limits the number of daily conversions. SVG input on Selva3D produces cleaner extruded geometry than raster input due to the precision of vector path tracing.
  • Tinkercad Image Generator: Tinkercad includes a built-in image import feature that converts grayscale PNG files directly into 3D shapes within the browser-based modeling environment. The tool applies a brightness-to-height map and places the resulting shape on the build plane for immediate editing. Resolution limits keep polygon counts manageable, making the output suitable for simple relief objects and beginner projects.
  • Convertio (STL output): Convertio operates as an online file converter that accepts multiple 3D input formats, including OBJ, PLY, and DAE, and exports the results as STL files. The free tier caps file size at 100 MB and restricts the number of daily conversions a user can run. Convertio does not generate heightmaps from flat images, but it works well for users converting existing 3D geometry into STL.

How Do Online STL Converters Compare to Software Tools?

Comparison of Online STL Converters to software tools is shown in the table below.

Tool TypeFeaturesEase of UseProcessing PowerOutput Quality
Tool Type
Online Converter (ItsLitho, Selva3D)
Features
Heightmap generation, basic depth and thickness controls, limited format support
Ease of Use
High, browser-based, no setup required
Processing Power
Processing is limited by service-imposed constraints (file size, queue limits), not raw server capability
Output Quality
Good for simple relief models and lithophanes; limited mesh editing.
Tool Type
Desktop Software (Blender)
Features
Full mesh editing, displacement modifiers, sculpting, multi-format support, scripting
Ease of Use
Moderate to low - steep learning curve for new users
Processing Power
High-level local CPU and GPU for complex mesh operations
Output Quality
Excellent - full geometry control with clean, optimized STL export.
Tool Type
CAD Software (Fusion 360, FreeCAD)
Features
Parametric modeling, dimension-accurate extrusion, engineering tolerances, assembly support
Ease of Use
Low, requires CAD knowledge and setup time
Processing Power
High - processes complex geometry with precision
Output Quality
Excellent for engineering parts; less suited for organic or image-derived relief models.
Tool Type
Mesh Repair Tool (Meshmixer, MeshLab)
Features
Mesh inspection, hole filling, remeshing, simplification, and repair automation
Ease of Use
Moderate, purpose-built interface reduces complexity
Processing Power
High, handles large polygon meshes efficiently
Output Quality
Output quality depends on input; repair tools improve but do not replace a clean source mesh.

Browser-based tools prioritize accessibility and speed, making them effective for straightforward image-to-relief conversions without any software installation. Desktop applications like Blender give users precise control over mesh density, depth range, and geometry cleanup, which produces better results for complex or large-format prints. CAD platforms excel at dimension-accurate work but require modeling knowledge that goes beyond basic image conversion. The right choice depends on project complexity, required accuracy, and the user's existing skill level with 3D tools.

How Do You Convert an Image to STL Step by Step?

You convert an image to STL step by step by following the nine steps listed below.

  1. Select a Conversion Tool. Choose a tool based on project complexity and available resources. Browser-based tools (ItsLitho, Selva3D) work for quick conversions without software installation. Desktop software (Blender, Fusion 360) provides greater control for detailed or precision-required outputs.
  2. Prepare the Source Image. Open the image in an editor and convert it to grayscale. Increase contrast so bright areas are near pure white and dark areas are near pure black. Save the file as PNG to preserve pixel accuracy before uploading.
  3. Upload the Image to the Converter. Open the selected tool and upload the prepared grayscale image. The converter reads pixel brightness values and maps them to height data. Confirm the image loaded correctly by checking the preview if the tool provides one.
  4. Adjust Conversion Settings. Set the maximum depth or extrusion height to match the intended physical print size. Adjust base thickness, smoothing level, and resolution settings based on the detail requirements of the model. Higher resolution settings increase polygon count and file size, so balance detail against printability.
  5. Preview the 3D Model. Use the tool's preview function to inspect the generated 3D geometry before exporting. Check that raised and recessed areas match the expected depth distribution from the original image. Identify any flat, noisy, or distorted regions and return to the image editing step to correct them if needed.
  6. Export the STL File. Click the export or download button and save the STL file to a local drive. Confirm the file saves in binary STL format, which is smaller and more compatible with slicing software than the ASCII format. Note the file size, excessively large files (above 500 MB) slow down or crash a few slicers, and benefit from mesh simplification.
  7. Repair the Mesh. Open the STL in Meshmixer or MeshLab and run a mesh inspection. Fix non-manifold geometry, open surfaces, and inverted normals before proceeding to slicing. A watertight, error-free mesh is a prerequisite for successful G-code generation.
  8. Slice the Model. Import the repaired STL into Cura or PrusaSlicer. Set layer height, infill, and support parameters appropriate for the model's geometry. Run the slice operation and review the layer preview to confirm the surface detail is intact.
  9. Export G-code and Print. Export the G-code to an SD card or send it directly to the printer. Start the print job and monitor the first layers to confirm bed adhesion and correct extrusion. Complex image-derived models benefit from a brim or raft to stabilize the base during printing.

The workflow runs from image selection and grayscale preparation through converter settings, STL export, mesh repair, slicing, and final printing. Insufficient image contrast, skipped mesh repair, and incorrect scaling during export cause the majority of conversion failures. Checking the output at each stage catches errors early and avoids wasted print time.

How Do You Convert a 2D Image to a 3D Model for Printing?

You convert a 2D image to a 3D model for printing by following the six steps listed below.

  1. Choose the Conversion Method. Identify the image type and intended output to select the correct approach. Photographs and detailed grayscale images convert best through heightmap methods. Logos, icons, and line art convert better through extrusion or vector tracing.
  2. Apply Heightmap Conversion (for Photos and Grayscale Images). Open a tool like ItsLitho or Blender and upload the grayscale image. The tool maps each pixel's brightness to a vertical height value, creating a surface that rises and falls with the original tonal variations. Export the resulting mesh as an STL file after adjusting depth and base thickness.
  3. Apply Extrusion (for Silhouettes and Simple Shapes). Import the image into Tinkercad or use the image import feature in Blender. Define a threshold value that separates the foreground shape from the background. The tool extrudes the detected shape to a fixed depth, producing a flat-bottomed solid model.
  4. Apply Vector Tracing (for Logos and Line Art). Open the image in Inkscape and use the Trace Bitmap function to convert it to an SVG vector outline. Import the SVG into FreeCAD, Fusion 360, or Blender and extrude the vector paths to the desired depth. Vector-derived extrusions produce sharp, clean edges that raster-based methods cannot replicate.
  5. Repair and Validate the Mesh. After generating the 3D geometry through any method, open the STL in Meshmixer and run mesh repair. Address open surfaces, non-manifold edges, and duplicate faces before slicing. A clean mesh ensures the slicer reads the geometry accurately and generates correct toolpaths.
  6. Export and Slice. Save the repaired STL and import it into Cura or PrusaSlicer. Set layer height and infill appropriate for the model type, relief models at 0.1 mm layers, and simple extruded shapes at 0.2 mm. Slice, export G-code, and proceed to printing.

Heightmap conversion suits photographic and tonal images, extrusion works for silhouettes and flat shapes, and vector tracing excels with logos and line-based artwork. The right method matches the image's visual structure to the conversion technique that preserves its critical features in 3D space. Each method produces a different type of 3D geometry, so understanding their differences prevents mismatched results.

What Settings Improve STL Quality from Images?

The settings that improve STL quality from images are listed below.

  • Input Resolution: Input resolution influences potential mesh detail, but actual vertex density depends on converter settings (sampling rate, subdivision, decimation), directly affecting surface detail in the final print. Set input resolution from 1000 px to 2000 px on the longest image edge for optimal mesh detail. Low-resolution inputs below 500 px produce blocky, faceted geometry that loses fine surface features during printing.
  • Maximum Depth: Maximum depth defines the physical height range from the base to the tallest raised point in the mesh. Set the maximum depth from 2 mm to 10 mm, depending on the level of relief required. Shallow settings below 1 mm produce nearly flat prints, while depths above 15 mm create fragile, unsupported geometry.
  • Smoothing: Smoothing reduces compression artifacts and pixel noise that map to irregular surface bumps in the 3D output. Apply a Gaussian blur from 1 px to 3 px to the source image before conversion for cleaner heightmap transitions. Smoothing values above 5 px erase fine surface detail and flatten the model's visual complexity.
  • Thresholding: Thresholding sets the brightness cutoff that separates raised geometry from the flat base in extrusion mode. Test threshold values from 100 to 180 on a 0–255 scale to identify the range that captures the target shape cleanly. A threshold set too high clips mid-tone details, while a threshold set too low pulls background noise into the mesh.
  • Base Thickness: Base thickness defines the depth of the flat bottom layer that closes the mesh and provides structural support. Set base thickness from 1 mm to 2 mm at a minimum to produce a watertight, printable solid. Thicker bases from 3 mm to 5 mm add stability for large flat prints, but increase material use and print time.
  • Mesh Density: Mesh density controls the polygon count of the output STL, balancing surface detail against file size and slicer performance. Target a polygon count from 50,000 to 200,000 faces for standard desktop FDM relief models. Counts above 500,000 slow slicer performance without producing visible improvement at standard 0.4 mm nozzle resolution.

Can You Create a 3D Printable STL from a Photo?

Yes, you can create a 3D printable STL from a photo.  A photo converts into a 3D printable STL file, though the output type depends on how the converter interprets the image's depth information. Photos lack true 3D data, so converters rely on grayscale brightness to simulate depth through heightmap generation. High-contrast photos with clear tonal separation across foreground and background deliver readable, well-defined 3D geometry. Low-contrast photos generate flat, indistinct meshes where depth variation is too subtle to perceive on a printed surface. Noise in photographic images, including grain, compression artifacts, and uneven lighting, translates into irregular surface bumps that reduce print quality.

Lithophanes act as an effective photo-to-STL application, where brightness values of a portrait or landscape image map to varying wall thickness in a thin translucent panel. The thickness variations recreate the original photo in light and shadow with high visual fidelity when backlit. Bas-relief prints work similarly but produce raised surface textures visible under direct light. The two applications perform best with photos that have been converted to high-contrast grayscale and preprocessed to remove noise before conversion. Photos with complex backgrounds, low lighting, or heavy compression deliver poor results regardless of the converter used.

What Are the Best Practices for Converting Images to 3D Models?

The best Practices for Converting Images to 3D Models are listed below.

  • Use High-Contrast Images: Select or edit images so that bright areas are near pure white and dark areas are near pure black before conversion. High tonal contrast gives the converter clear, unambiguous brightness data to map into height values. Low-contrast images generate flat meshes where depth variation is too subtle to distinguish in the printed output.
  • Simplify Complex Details: Remove fine background textures, noise, and unnecessary visual complexity from the image before uploading. Small details that appear clear in a 2D photo commonly translate into chaotic mesh geometry that loses legibility at standard print resolution. Keeping the subject clean and isolated from the background produces geometry that reads clearly on the printed surface.
  • Choose the Correct Input Format: Save the image as PNG or BMP before conversion to preserve lossless pixel data. JPG compression introduces artifacts at edges and gradient transitions that appear as irregular height spikes in the mesh. The format choice at this step directly impacts the smoothness of the final surface.
  • Match Image Resolution to Print Size: Set image resolution relative to the intended physical print dimensions, targeting from 100 DPI to 300 DPI at the final print size. An image too small for its target print size produces a coarse, low-polygon mesh with visible facets. Upscaling an image with a smart upscaling tool before conversion recovers a number of lost details compared to using a raw low-resolution file.
  • Set Realistic Depth Values: Keep maximum depth from 2 mm to 8 mm for standard desktop FDM prints to maintain structural integrity and visible detail. Extreme depth values either flatten the surface into an unreadable relief or exaggerate it into fragile spikes that break during printing. Matching depth to the printer's minimum feature resolution ensures the geometry transfers accurately to the physical print.
  • Repair the Mesh Before Slicing: Run any generated STL through a mesh repair tool (Meshmixer or MeshLab) before importing into the slicer. Non-manifold edges, open surfaces, and duplicate faces cause slicer errors that produce incomplete or broken G-code. A clean, watertight mesh is a prerequisite for a successful print.
  • Preview Before Exporting: Use the 3D preview function in the converter before downloading the STL to verify that raised and recessed areas match the expected geometry. Depth inversion errors, where dark areas become raised instead of recessed, appear at the preview stage before the file reaches the slicer. Converting a flat photo into a precise image to a 3D model requires attention at each step, from source image preparation through final mesh validation.

How Do You Prepare an Image for STL Conversion?

You prepare an image for STL conversion by following the six steps listed below.

  1. Resize the Image to an Appropriate Pixel Dimension. Open the image in GIMP, Photoshop, or an equivalent editor and resize it to a target resolution from 500 px to 2000 px on the longest edge. Larger dimensions produce detailed meshes but increase processing time and file size. Matching resolution to the level of detail the final printed object requires prevents unnecessary polygon bloat in the generated mesh.
  2. Convert to Grayscale. Switch the image to grayscale mode to reduce it to a single brightness channel. Color data does not contribute to height mapping in STL converters and introduces inconsistency in how the tool reads pixel values. A clean single-channel grayscale image feeds accurate, predictable data into the converter, directly improving depth accuracy in the output mesh.
  3. Increase Contrast. Apply a Levels or Curves adjustment in GIMP or Photoshop to push highlights toward pure white (255) and shadows toward pure black (0). Strong contrast produces a heightmap with clear, defined peaks and valleys that translate into readable surface geometry. Flat, low-contrast images generate shallow meshes that lose their shape in the final print.
  4. Remove Background Noise. Apply a light Gaussian blur from 0.5 px to 1.5 px in GIMP or Photoshop to smooth out grain, compression artifacts, and fine texture noise. Noise in the source image maps directly to irregular surface bumps and mesh spikes in the 3D output. Blurring at a low radius reduces artifacts without erasing the primary subject detail.
  5. Isolate the Subject. Use the eraser, masking tool, or background removal feature in Photoshop or remove.bg to eliminate unwanted background elements. A clean subject on a flat black or white background gives the converter a clear boundary from the raised geometry to the flat base. Background clutter generates unwanted mesh geometry that complicates cleanup before slicing.
  6. Save in a Lossless Format. Export the prepared image as PNG or TIFF before uploading to the converter. Saving as JPG at any stage after editing reintroduces compression artifacts that damage the pixel-level accuracy built through preprocessing. PNG files maintain entire edited pixel data through the full conversion pipeline, preserving the quality improvements made in each prior step.

Why Do Some Image-to-STL conversions Fail or Produce Poor Results?

Image to STL conversions fail or produce poor results because of low source image resolution, poor contrast, incorrect scaling settings, or unrepaired mesh errors that carry through to the slicer. Low resolution generates a sparse vertex grid that produces a blocky, faceted mesh with no visible surface detail. The fix is to use a source image of at least 800 px to 1500 px, or apply a smart upscaling tool (Topaz Gigapixel, GIMP GEGL upscale) before conversion. Poor contrast clusters pixel brightness values in a narrow range, leaving the converter too little tonal data to generate meaningful height differences. Applying a Levels adjustment in GIMP or Photoshop to stretch brightness across the full 0–255 scale resolves the issue. Incorrect depth scaling produces models too thin to print or too deep to remain structurally sound. Targeting a depth range from 2 mm to 8 mm for FDM printing prevents both failure types.

What Are the Advantages of Converting Images to STL Files?

The advantages of converting images to STL files are listed below.

  • Eliminates the Need for Manual 3D Modeling: Converting an image to STL produces printable 3D geometry directly from existing artwork without requiring CAD knowledge or modeling experience. Designers, educators, and engineers skip the modeling stage entirely by feeding photos, logos, or drawings into a converter and receiving a print-ready file in minutes.
  • Preserves Original Artwork in Physical Form: The conversion process translates the exact visual structure of a source image into a three-dimensional surface, maintaining the proportions and details of the original graphic. Product teams, artists, and archivists reproduce flat artwork as physical objects without redrawing or remodeling from scratch.
  • Accessible Across Skill Levels: Browser-based converters and desktop tools handle the technical conversion process automatically, making STL generation achievable for beginners and professionals alike. A hobbyist converts a personal photograph into a lithophane using the same pipeline an engineer applies to prototype an embossed label.
  • Supports Rapid Iteration: Editing the source image and rerunning the conversion generates a new STL version in minutes, bypassing the longer revision cycles of manual mode. Product design teams test multiple logo relief variations in a single session by swapping source files and re-exporting without rebuilding geometry.

The key benefits of converting images to STL files are listed below.

  • Enables 3D Printing from Flat Sources: Image to STL conversion creates printable geometry from photographs, scanned drawings, and digital graphics that desktop printers cannot produce without a mesh file. Manufacturing teams produce embossed panels, textured molds, and surface-detailed components directly from existing 2D artwork, cutting preparation time significantly.
  • Expands Customization in Product Design: The conversion process lets design studios produce personalized badges, custom stamps, and branded relief panels by feeding client-supplied artwork directly into the pipeline. Product customization at scale becomes practical because each unique image generates a unique STL without requiring a separate modeling session.
  • Accelerates Rapid Prototyping in Engineering: Engineers convert technical diagrams and scanned sketches into physical prototypes within a single workflow session, reducing the time from concept to testable object. Manufacturing environments apply the process to produce embossed labels, textured inserts, and surface-detail prototypes faster than traditional CAD-based approaches allow.
  • Supports Educational Applications: Schools and universities convert historical maps, biological diagrams, and architectural drawings into tactile physical models that students interact with directly. The education sector applies image-to-STL workflows to produce hands-on learning aids without specialized modeling staff or expensive 3D content libraries.
  • Enables Artistic and Decorative Production: Artists and hobbyists convert portraits, landscapes, and decorative patterns into lithophanes, bas-relief panels, and sculptural wall pieces through straightforward image upload and export workflows. The process opens physical art production to creators who lack 3D modeling skills but possess strong visual source material.

What Use Cases Benefit Most from Image to STL Conversion?

The use cases that benefit most from image to STL conversion are listed below.

  • Logo Extrusion: Logo extrusion converts brand marks, icons, and lettering from vector or high-contrast raster images into raised 3D solids. SVG input produces the sharpest edges, making it the preferred format for logo-based extrusion work.
  • Lithophanes: Lithophanes convert photographs and detailed grayscale images into thin-panel STL models where brightness values correspond to wall thickness. High-tonal-range photographs with strong highlight-to-shadow contrast produce the visually detailed lithophane output.
  • Bas-Relief Art: Bas-relief conversion transforms portraits, landscapes, and decorative patterns into shallow three-dimensional surface textures mounted on a flat base. Images with clear subject-background separation and smooth tonal gradations produce the cleanest bas-relief geometry.
  • Custom Stamps and Embossing Plates: Custom stamp conversion takes logo or text artwork and inverts the heightmap to produce a raised mirror-image surface suitable for pressing into clay, wax, or ink pads. Bold, simple graphics with line weights above 1 mm at print scale produce functional stamps with clean impressions.
  • Topographic Maps: Topographic conversion reads elevation data visualized as color-coded or grayscale height maps and generates physically accurate terrain models. High-resolution source data produces accurate slope profiles, while low-resolution inputs generate smooth, generalized terrain shapes.
  • Custom Coins and Medallions: Coin conversion takes portrait or emblem artwork and maps it onto a cylindrical disc base to produce collectible or commemorative medallions. Grayscale portrait photographs and vector emblems perform well at standard coin diameters from 25 mm to 50 mm.

How Does Image to STL Compare with Other 3D Model Conversion Methods?

Image to STL comparison with other 3D model conversion is shown in the table below.

MethodInput TypeComplexityAccuracyUse Case
Method
Image to STL Conversion
Input Type
JPG, PNG, BMP, SVG, TIFF
Complexity
Low to moderate, requires image preprocessing and converter settings.
Accuracy
Moderate, accuracy limited by pixel resolution and heightmap depth range.
Use Case
Lithophanes, bas-relief art, logo extrusion, custom stamps, topographic models
Method
CAD Modeling
Input Type
Manual geometric input, technical drawings, sketches
Complexity
High, requires CAD software proficiency and modeling knowledge.
Accuracy
Very high, dimension-accurate to specified tolerances.
Use Case
Engineering parts, mechanical assemblies, product prototypes, structural components
Method
3D Scanning
Input Type
Physical objects captured via LiDAR, photogrammetry, or structured light
Complexity
Moderate, requires scanning hardware, calibration, and mesh cleanup.
Accuracy
High, it captures real-world geometry with surface detail from 0.1 mm to 1 mm resolution.
Use Case
Reverse engineering, artifact preservation, custom-fit parts, organic shapes

What Is the Difference Between STL and other 3D File Formats?

The difference between STL and other 3D file formats is shown in the table below.

FormatFeaturesFile SizeCompatibility
Format
STL
Features
Stores triangle mesh and surface normals; no color, texture, or material data.
File Size
Small to moderate (binary STL runs from 1 MB to 50 MB for standard models).
Compatibility
Universal, supported by nearly the entire slicers, CAD tools, and 3D printers.
Format
OBJ
Features
Stores mesh geometry, UV texture coordinates, vertex normals, and references external material (.MTL) files.
File Size
Moderate, larger than STL due to texture and material data; commonly paired with MTL and texture image files.
Compatibility
Broad, major 3D modeling applications support OBJ natively, though slicer software adopts it less frequently than STL.
Format
3MF
Features
Stores mesh geometry, color, material properties, print settings, and support structure data in a single compressed file.
File Size
Small, compressed XML structure reduces file size relative to equivalent STL.
Compatibility
Growing, natively supported by Windows 3D tools, PrusaSlicer, Cura, and Bambu Studio; not yet universal.
Format
FBX
Features
Stores mesh, skeleton rigs, animations, materials, textures, and scene hierarchy for complex multi-object scenes.
File Size
Large, includes animation and rig data that adds substantial overhead for static print models.
Compatibility
Limited in printing, used in game engines (Unity, Unreal) and animation software; rarely used in 3D printing workflows.

STL remains dominant in 3D printing because of its simplicity and near-universal slicer support. Each major slicer application reads STL without additional plugins or format conversion. 3MF is emerging as a more capable alternative for color printing and multi-material workflows, but STL remains the standard interchange format for the majority of desktop and professional 3D printing applications.

What Factors Affect the Quality of an STL Generated from an Image?

The factors that affect the quality of an STL generated from an image are listed below.

  • Resolution: Image resolution sets the maximum available detail, but vertex density is controlled by the converter’s sampling and mesh generation settings. Images below 300 DPI produce blocky, stairstepped geometry, while 300 DPI to 600 DPI deliver adequate detail for standard relief prints. Inputs from 600 DPI to 1200 DPI capture fine tonal transitions, producing smooth surface gradients in the printed output.
  • Grayscale Depth: Grayscale depth controls the precision of height mapping across the mesh. 8-bit provides 256 tonal levels, but actual height resolution depends on scaling, smoothing, and mesh resolution. A 16-bit TIFF source stores 65,536 brightness levels, producing precise depth gradations that 8-bit files cannot achieve.
  • Mesh Density: Mesh density, measured in polygon count, determines how finely the surface geometry represents the heightmap data. Counts from 50,000 to 200,000 polygons balance detail against file manageability for typical relief models. Counts below 10,000 produce visible faceting, while counts above 500,000 offer diminishing returns at standard FDM print resolution.
  • Smoothing: Smoothing reduces noise-induced surface irregularities introduced by image compression artifacts and grain. A Gaussian blur from 0.5 px to 2 px applied to the source image before conversion smooths heightmap transitions without erasing primary features. Excess smoothing above 5 px flattens fine details and reduces the model's visual complexity in the final print.

How Does Image Resolution Impact STL Conversion Results?

The image resolution impacts STL conversion results by directly determining the vertex density and surface detail of the generated mesh. Each pixel in the source image corresponds to a vertex position in the 3D model, so higher pixel counts produce finer mesh geometry with accurate surface representation. A low-resolution image below 300 px on the longest edge generates a sparse vertex grid, resulting in a coarse mesh with visible stairstepping across curved and diagonal surfaces. A 500 px by 500 px grayscale image produces around 250,000 faces at default settings, adequate for simple relief objects but insufficient for photographic detail. At 1000 px by 1000 px, the face count rises to around 1,000,000 to 2,000,000 polygons, capturing fine tonal transitions and producing smooth surface gradients in the printed output. Images above 2000 px generate meshes exceeding 4,000,000 faces, which stress slicer memory and offer minimal visible improvement on standard 0.4 mm nozzle FDM printers. The jump from 300 px to 800 px produces a far greater improvement in surface readability than the jump from 1500 px to 3000 px, making mid-range resolution the practical target for desktop print quality.

How Does Grayscale Contrast Influence 3D Depth?

Grayscale contrast influences 3D depth by controlling the range and definition of height variation across the converted mesh. Each pixel's brightness value on a scale from 0 (black) to 255 (white) maps to a corresponding Z-axis height position, so the spread of brightness values determines how much depth variation appears in the final geometry. A high-contrast image spanning the full 0–255 brightness range produces a model where the deepest recesses and highest peaks cover the maximum set depth, creating clear, readable surface geometry. A low-contrast image where brightness values cluster from 100 to 160 maps to a height range of around 1.88 mm at a 5 mm depth setting, producing a nearly flat surface where depth differences are too subtle to print accurately. Mid-tone compression creates a mesh that appears flat even under ideal print conditions, regardless of the converter used. Applying a Levels adjustment in GIMP or Photoshop stretches the histogram to the full 0–255 range before conversion, restoring lost depth variation. An Unsharp Mask filter at low radius and high amount sharpens tonal edges in the grayscale image, producing crisper transitions from raised to recessed areas in the final mesh.

Disclaimer

The content appearing on this webpage is for informational purposes only. Xometry makes no representation or warranty of any kind, be it expressed or implied, as to the accuracy, completeness, or validity of the information. Any performance parameters, geometric tolerances, specific design features, quality and types of materials, or processes should not be inferred to represent what will be delivered by third-party suppliers or manufacturers through Xometry’s network. Buyers seeking quotes for parts are responsible for defining the specific requirements for those parts. Please refer to our terms and conditions for more information.

Megan Conniff - Xometry Contributor
Megan Conniff
Megan is the Content Director at Xometry

Read more articles by Megan Conniff