This tool converts images in the PNG image format into a 3 dimensional representation. Two output formats (OpenSCAD and STL) are currently supported with several options for output parameters.
The task this utility performs is straightforward to describe, if a little more challenging to realise. The conversion of a two dimensional image into a three dimensional form requires construction of that dimension from an existing image property.
If the x and y dimensions are used directly from the image the only remaining source of information is the pixel colour. From the image a heightmap is constructed and used to generate the additional dimension information.
The operations used to perform the conversion are:
Each of these steps is the subject of academic study and could be extended beyond the basic algorithms currently used to obtain "better" results
The "best" output is difficult to define as for one application it could mean a mesh which is faithful to the source image but for a different application it could mean an approximation that has a low face count. The command line parameters give control over the steps to allow for these differing requirements, these are documented in detail in the usage section.
The mesh generation strategy has the largest influence on the final model. The utility, as of version 1.1, has two general purpose and one narrow purpose generators giving some flexibility to the user.
The aim of the mesh simplification step is to reduce the number of faces and vertices without detrimentally affecting the models topology. The implementation as of version 1.1 only allows for a single simplification method. The half-edge remove method implemented produces adequate results for synthetic models with mainly planar faces but fares poorly on other mesh types.
Released under the MIT License http://www.opensource.org/licenses/mit-license.php
Vincent Sanders (email@example.com)