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, free to download and use.

Amble, i.e., the projects:

POVRay img2mesh

Python program img2mesh developed for converting images into POV-Ray 3D mesh, 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 POVRay scene file contains everything necessary to be rendered right out of the box (camera, lights, texture), or may be edited later.

Update: In version 2.13.13.2 PPM and PGM import added to previous PNG one. With POV-Ray export, exported .pov files may be directly imported as .inc files intact, just by specifying a flag in external scene.

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

Read more...

POVRay Mosaic

Currently project POVRay mosaic includes Python programs converting PNG image into POV-Ray mosaic scene, consisting of various objects - spheres, cylinders, boxes, prisms, etc.

POVRay mosaic provide well structured easy to edit output.

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...

POVRay Thread

A set of 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 Scale2x and Scale3x image rescaling algorithms. Command line, GUI and batch processing programs available, free and open source.

Update: Batch programs since versions 2024.04.26 turned to multiprocessing, halving processing time.

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).

Read more...

Python batch files

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