Skip to content

Hahihula/printspots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mirror Notice

This repository is a mirror of the primary repository hosted on GitLab: https://gitlab.com/printspots/printspots. All development and contributions happen on the GitLab repository. Please submit issues and pull requests there.

Original README

PrintSpots

PrintSpots is an open-source toolkit for creating multi-layered 3D-printed grayscale images. It enables makers, designers, and researchers to turn standard images into printable 3MF objects, calibrated for grayscale and color 3D printing.

👉 Learn more at printspots.org


Features

  • 🎨 Convert images into 3D-printable grayscale models
  • �️ Alpha channel support - Use transparent images to create non-rectangular prints
  • �🖤 Generate grayscale calibration patterns for printer tuning
  • ⚙️ Flexible command-line interface with interactive configuration wizard
  • 🔧 Cross-platform configuration management
  • 📦 Distributed as binaries for easy installation (source release coming soon)
  • 🖨️ Output in 3MF format, ready for slicing and printing

Installation

Prebuilt binaries will be available soon in the Releases section of this repository. Download the version for your platform and run it.

Example (Linux/macOS):

chmod +x printspots
printspots --help

Quick Start Guide

Step 1: Configure Your Printer Settings

Before creating any prints, configure PrintSpots with your printer's specifications:

printspots configure

This interactive wizard will guide you through setting up:

  • Base thickness: The thickness of the base layer (typically 1.0mm)
  • Layer thickness: Your printer's minimal layer height (e.g., 0.05mm).
  • Image size: Default size for the larger dimension of generated images (e.g., 100mm)
  • Maximum layers: Maximum number of layers to stack (e.g., 19)

The configuration is saved and will be used as defaults for all subsequent commands. You can re-run configure anytime to update your settings.

Note: Other commands will work with built-in defaults even without configuration, but that is for testing purposes only. the results in real life will not match.


Step 2: Generate Calibration Pattern

Create a calibration object to tune printspots to your printer and filament for accurate grayscale objects:

printspots calibration

This generates calibration.3mf with test squares at varying thickness levels.

Printing the calibration:

  1. Open calibration.3mf in your slicer
  2. Set layer-height to the same as in Printspots configuration and infill to 100%.
  3. The object contains two parts:
    • Bottom part: Print in black filament
    • Top part: Print in white filament
  4. Slice and print the calibration object

Step 3: Scan and Process Calibration

After printing the calibration pattern:

  1. scan the printed calibration:

  2. if you do not have flatbed scanner, Photograph it

    • Use a white paper background for proper white balance
    • Ensure even lighting
    • Photograph from directly above
  3. Crop the image to include only the calibration squares

  4. Generate palette file:

    • Go to the Palette Generator Tool
    • Upload your cropped calibration photo
    • Align the image so that:
      • The darkest square is labeled 1
      • Squares get progressively lighter as numbers increase
    • Use flip/rotate tools as needed
    • Download the generated palette file
  5. Edit the palette file:

    • Open the downloaded .toml palette file in a text editor
    • Remove duplicate entries where colors are basically the same
    • Keep only distinct grayscale levels

    Note: Automatic cutoff will be added to the web tool in a future update.


Step 4: Generate Your Grayscale Image Object

Convert your image into a 3D-printable greyscale object:

printspots generate \
  --input your-input-image.jpg \
  --palette palette.toml \
  --output result.3mf

Review the preview:

  • A prediction.png file is generated in the current directory
  • Review this preview to see how your image will look
  • If the result doesn't look good:
    • Try a different source image or
    • Adjust the contrast and brightness of your original image
    • Re-run the generate command

Print your object:

  1. Open the output file (e.g., result.3mf or out.3mf) in your slicer
  2. The object contains parts named "black" and "white"
  3. Assign filament colors accordingly:
    • black part → black filament
    • white part → white filament
  4. Do not forget to set the same layer-height as for Printspots configuration
  5. Use 100% infill or enouth top/bottom layers so the object is printed solid
  6. Slice and print!

Command Reference

configure

Set up your printer configuration interactively.

printspots configure

calibration

Generate a calibration pattern for printer tuning.

printspots calibration [OPTIONS]

Options:
  -s, --size <SIZE>        Size of single square in mm [default: 10]
      --flat-top           Create calibration with flat top
  -f, --filename <FILE>    Output filename [default: calibration.3mf]

generate

Convert an image to a 3D halftone object.

printspots generate [OPTIONS] --input <IMAGE> --palette <PALETTE> --output <OUTPUT>

Options:
  -i, --input <IMAGE>      Input image file (supports PNG, JPG, etc.)
  -s, --size <SIZE>        Size in mm (larger dimension) [default: 100]
      --flat-top           Create output with flat top
  -p, --palette <PALETTE>  Path to palette file (.toml)
  -o, --output <OUTPUT>    Output 3MF filename

Alpha Channel Support:

  • Images with alpha channels (transparency) are fully supported
  • Transparent pixels (alpha < 128) are automatically excluded from the mesh
  • This allows creating non-rectangular prints that follow the shape of your image
  • Works in both CLI and GUI

Configuration File Location

PrintSpots stores configuration in a platform-specific location:

  • Linux/macOS: ~/.config/printspots/config.json
  • Windows: %APPDATA%\printspots\config.json

You can manually edit this file if needed, though using printspots configure is recommended.


Documentation

For more information and examples, visit printspots.org.

Full documentation coming soon.


Roadmap

  • ✅ Interactive configuration wizard
  • ✅ Website
  • ✅ Binary releases
  • ✅ Automatic palette optimization in web tool
  • 🔜 Comprehensive documentation
  • ✅ Open-source release of the full codebase
  • ✅ GUI application
  • 🔜 Additional calibration utilities
  • 🔜 inform user about progress of the process

Troubleshooting

Q: The preview looks wrong or pixelated

  • Try adjusting the contrast and brightness of your source image
  • Use a higher resolution source image
  • Ensure your source image has good tonal range

Q: Calibration squares look the same

  • Check your printer's layer height settings
  • Verify base and layer thickness in your configuration
  • Ensure proper filament contrast (pure black and pure white work best)

Q: Output file parts aren't labeled

  • Open in a slicer that supports 3MF part names (PrusaSlicer, OrcaSlicer, etc.)
  • Check that you're using the latest version of PrintSpots

License

MIT


Contributing

Contributions, bug reports, and feature requests are welcome! Please check back after the source code release for contribution guidelines.


Support


Made with ❤️ for the 3D printing community

About

mirror of printspots GitLab repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published