Python program for conversion of bitmap image to some sort of solid objects in POVRay 3D format, resembling threads of canvas or cross stitches. Each source image pixel is converted to a 3D object, colored after source pixel.
Main program POVRayThread.py provides general linking between PNG and PPM/PGM reading modules and POV-Ray writing one.
Useful GUI features include mouse event handling:
- After starting program any click on preview area is equal to "Open image";
- After opening an image left-click is "zoom in", right-click is "zoom out";
- After filtering an image left click is source\result preview switch, Ctrl + Left click is "zoom in", Alt + Left click is "zoom out", similar to Photoshop.
- Linen.py - creates an object, simulating canvas, colored after source image (taffeta, print on canvas, and the like).
- Stitch.py - simulates common cross stitching embroidery appearance.
- PyPNG. Copy included into current POV-Ray Thread distribution.
- PyPNM. Copy included into current POV-Ray Thread distribution.
- Tkinter. Included into standard CPython distribution.
Programs distribution is rather self-contained and is supposed to run right out of the box. Program is equipped with minimal GUI, so all you have to do after starting a program is use "Open..." dialog to open image file, then use "Export..." to name 3D file to be created, then wait while program does the job, then open resulting file with POV-Ray and render the scene.
Averager was initially created as an accessory for preprocessing source PNG files. Averages colors in RGB PNG within linear or squarish areas between contrast edges, providing color reduction somewhat similar to used in real cross stitch.
Later this filtering module was added to POVRayThread, making Averager redundant; however, it is still included into distribution as an illustration of 100% pure Python image filtering program.
Dnyarri projects website - other Python freeware made by the same author.
POV-Ray Mosaic - parent project.