Hemesh Colorizer

In a previous post I considered using the Processing programming language to design models for 3D printing. I decided to write my own tool in Processing based on HemeshGUI for the HE_Mesh library.

I’m calling the tool “Hemesh Colorizer”. The tool will allow me to interactively transform a 3D model and then colorize it for 3D printing.

I began by removing various features from HemeshGUI that I didn’t need for my tool. I also redesigned the GUI which is developed using the ControlP5 library for Processing.


At the top left of the GUI, I have a zoom control but I can also move the mouse up and down to do the same. Next are 6 color parameters. Depending on the coloring algorithm, these parameters would have different meanings. For example, for the 1 color linear algorithm, the first 3 parameters would control the RGB values of the color.

On the right are various dropdown controls with options. The first is to select the model to load. Toxiclibs is used to load an STL model which is then converted to the HE_Mesh format. The second dropdown control is to select a HE_Mesh modifier and the third is to select the coloring algorithm.

Here you can see the “twist” and “planar” modifiers applied to a sphere model:


Here you can see a the random color algorithm applied to a shell model. I have also invoked the “jiggle” feature which randomly shifts the vertices of the mesh.


The model can be rotated by holding down the left mouse button. The tool also supports various keyboard shortcuts to hide/show the GUI, generate screenshots, animate the rotation of the model and export the model to VRML. I wrote a very simple export function that would convert the HE_Mesh to VRML that includes the color information for each face in the mesh.

If I needed to manually edit the model, I could then import it into Blender. Unfortunately, Blender does not support colors in WRL files. So the file has to be converted to 3DS format to keep the colors in the model. I use a free tool called MeshLab to convert the WRL file to a 3DS file.

I’m experimenting with various coloring algorithms and I’ll keep tweaking the tool, but I think it is ready to use it on some models for 3D printing.

I have open sourced the code for Hemesh Colorizer on GitHub.

, , , , , , ,

No comments yet.

Leave a Reply

Powered by WordPress. Designed by Woo Themes