Convert 2D images into multi-layered STL files for multi-color 3D printing
Stratum is a desktop application designed to help users transform 2D images into STL files optimized for multi-color 3D printing. It uses image segmentation and layering techniques to generate 3D models that can be printed with multiple filaments.
- Image processing algorithms segment images by color.
- Shade generation based on filament transparency and layering.
- Live preview for quick feedback.
- Filament library with material properties.
- Custom filament creation with transparency values.
- Layer count configuration for projects.
- Visual filament ordering.
- Resolution modes for different quality levels.
- Adjustable detail preservation.
- Customizable layer height.
- Automatic scaling to target dimensions.
- Real-time updates during adjustments.
- High-quality final preview rendering.
- Layer information on click.
- Zoom and pan for navigation.
- Save and load projects with settings.
- Export STL files for printing.
- Visit the Releases page.
- Download the latest version for your OS.
- Extract and run the executable.
Requires Python 3.10 or newer.
# Clone the repository
git clone https://github.com/yourusername/Stratum.git
cd Stratum
# Install dependencies
pip install -r requirements.txt
# Run the application
python main.py
- nicegui: Web-based UI framework.
- numpy: Numerical computing.
- Pillow: Image processing.
- scikit-image: Image analysis.
- trimesh: 3D mesh generation.
- shapely: Geometric operations.
- matplotlib: Visualization.
- geopandas: Geospatial data processing.
- pywebview: Native window support.
-
Load Your Image
- Supports common image formats (PNG, JPG, etc.).
- Works best with high-contrast images.
-
Add Filaments
- Use the filament library to add filaments.
- Adjust layer counts and order.
-
Configure Settings
- Set layer height, base layers, and target size.
-
Preview and Refine
- Use live preview for feedback.
- Adjust settings as needed.
-
Export for Printing
- Generate STL files for each filament layer.
- Import files into a slicer for printing.
- High-contrast images yield better results.
- Simple color schemes are recommended.
- Start with 2-3 filaments.
- Use contrasting colors for clarity.
- Use <0.1 layer height for more color shades and details.
- Ensure good bed adhesion with base layers.
- Shade Generation: Creates intermediate colors.
- Image Segmentation: Maps pixels to color combinations.
- Polygon Creation: Converts regions into geometric shapes.
- Mesh Generation: Builds 3D models.
- Input: PNG, JPG, BMP, etc.
- Output: STL (one file per filament layer).
# Run in browser mode
python main.py --browser
# Load a project file
python main.py --project /path/to/project.json
# Enable hot reload
python main.py --reload
- Prepare a high-contrast image.
- Add base and detail filaments.
- Configure layer height and size.
- Preview and refine settings.
- Export STL files.
- Slice and print.
"Load image and add at least two filaments"
- Ensure an image is loaded and at least two filaments are added.
Rendered result appears blocky
- Increase resolution or use a higher-quality image.
Export takes too long
- Reduce detail level or resolution.
Colors don't match expectations
- Check filament transparency values and order.
- Use live preview for quick adjustments.
- Limit image size and filament count for faster processing.
We welcome contributions. You can help by:
- Reporting bugs.
- Suggesting features.
- Submitting pull requests.
- Improving documentation.
git clone https://github.com/yourusername/Stratum.git
cd Stratum
pip install -r requirements.txt
python main.py --reload
Stratum © 2025 by Philipp Seelos is licensed under CC BY-NC-SA 4.0
- Built with NiceGUI.
- Image processing powered by scikit-image.
- 3D mesh generation using trimesh.
- Geometric operations via Shapely.
- Portions of opacity calculation adapted from
AutoForge – OptimizerHelper.py
by hvoss-techfak, licensed under
CC BY-NC-SA 4.0.
Changes include integration into
generate_shades_td
and removal of differentiable pipeline components.