The Toad's Slimy Mudhole

where The Toad intercourses Python

Preamble

After closing AmphiSoft plugins project long ago in a universe far away The Toad of Great Mental Powers made a decision to implement some of spontaneous ideas, developed or implied, into something potentially easy to understand and hopefully simple to use by humans.

As an «easy to understand» mean of production Python was chosen (that was probably an unrecoverable mistake. Or may be not), as ideas regular ones like «what happens if we map image signal to something else» were used.

As a result, some Python projects described hereby were created and shared on GitHub.

All programs are completely free to download, use, and even modify in case you feel like improving them. Sharing your results is welcome, admiring, adoring and hailing The Toad of Great Mental Powers obligatory.

Amble, i.e., the projects:

POV‑Ray img2mesh

Python program img2mesh developed for converting images into 3D mesh, primarily in POV-Ray format (although OBJ, STL and DXF are supported as well), so that bright pixels turns into high peaks on resulting 3D landscape - the brighter source image pixel, the higher 3D mesh node point is. Exported POV‑Ray scene file contains everything necessary to be rendered right out of the box (camera, lights, texture), or may be edited later.

Update: 3D mesh structure changed completely, providing significant rendering quality improvement; therefore version 2 was cancelled, and program promoted to version 3.

For developers: 3D export functions now separated as list2mesh package, and may be freely reused for your own Python projects. Read more...

POV‑Ray Mosaic

Currently project POV‑Ray Mosaic includes Python programs converting PNG or PPM image into POV-Ray mosaic scene, consisting of various objects - spheres, cylinders, boxes, prisms, etc. - colored after source image pixels.

POV‑Ray Mosaic provide well structured output to simplify bulk object and attributes change.

Rendered images are suitable for scrapbooks, posters, and other creative ways to entertain and/or annoy people.

Update: In version 1.11.1.1 texture syntax changed to fully blown texture, thus providing a capability to build layered textures. Read more...

POV‑Ray Thread

Linen and Stitch are programs, which read pixels of source image and convert them into a complex 3D structure, simulating something textile and thread related, in POV-Ray format. Currently tabby/linen plain weave, and cross-stitching simulations are provided. Exported 3D structures are configurable regarding thread appearance and pattern distortions.

Update: Color simplification utility «Averager» added to repository, allowing to simulate using single thread for flat color image area. Read more...

Scale2x and Scale3x in pure Python

ScaleNx is a pure Python implementation of several pixel art image scaling algorithms, viz. Scale2x, Scale3x, Scale2xSFX and Scale3xSFX. Suitable GUI and batch processing programs available, free and open source.

Update: In version 25.2.1 optimization of Scale2x, Scale3x, Scale2xSFX and Scale3xSFX performed, speed gain in range from ca. 15% for Scale2x to ca. 50% for the rest. Read more...

PGM and PPM image files handling in pure Python

PyPNM is a pure Python implementation of read/write functions for Portable Gray Map (.pgm) and Portable Pixel Map (.ppm) image formats. Well, due to format specifications fluid nature it's hard to say that PyPNM is fully compliant, but it was tested side by side with different software, and it even understands 16-bit per channel PGM and PPM produced by Adobe Photoshop (which uses somewhat, err, unique separators).

Update: in ver. 1.14.8.19 memory usage for writing PPM and PGM files greatly reduced. Read more...

Python batch files

Some batch processing scripts made for my personal regular use. May appear to be useful to others. Read more...