Hemesh is an exciting Processing library by Frederik Vanhoutte (W:Blut) that can be used to create elaborate 3D shapes quickly. It is an implementation of the half-edge datastructure, hence the name Hemesh. What makes this datastructure interesting is it’s inherent ability to store connectivity information. So it’s much more than just a list of vertices and faces. Rather it’s about the efficient description of connections between them. This kind of information comes in handy when you want to manipulate, distort and creatively destroy three-dimensional shapes in a sensible manner.
The starting point is a mesh, for example one of the built-in primitives. Think box, cone, sphere. But you could also go half-edge on your own custom meshes. Anyway, the real fun starts in step two: modifiers and subdividors. There are many to play with. You can use those to change your initial shape. Accumulatively! So it’s possible to use (almost) any series of modifiers, one after the other. You can imagine this allows for a very diverse range of combinations. Better show than tell, so below I’ve selected works by a few different people who have been working with Hemesh. In addition check out the Hemesh Flickr tag for many more examples.
Geometry Studies by Dave Bollinger (Flickr)
Hemesh experiments by Jan Vantomme / vormplus (Flickr)
3D printed Hemesh shapes by Corneel Cannaert / intr0spector (Flickr)
While playing with the Hemesh library, I developed a gui using the controlP5 library by Andreas Schlegel. Although still a bit generic, it allows me to rapidly prototype different options. You start with a shape, then add any combination of modifiers. I decided to share all the source code for this project. In the past few days I’ve cleaned up and commented the code as much as possible. I hope it’s useful for someone. There are two versions. HemeshGui and HemeshGuiLight. The only difference is in their Sunflow rendering capabilities. The former can, while the latter cannot. Check out a high resolution and fully annotated version of the gui here. The video below shows some of HemeshGui’s basic functionalities.
Note that there are no built-in limitations. Meaning, with a few mouseclicks you can make any combination of modifiers and settings you want. Including those combinations that will bring your computer to a screeching halt due to the sheer amount of faces & vertices. Or worse. Just be sensible and retrace your steps when the console output turns red ;-) On the upside, HemeshGui currently holds 10 primitives, 15 modifiers, 5 subdividors and built-in Sunflow rendering functionality through Christopher Warnow’s SunflowApiApi.
You can get the latest version of Hemesh (beta 1.3.0) from here. Several examples and tutorials are included in the package to help get you started. You can download the latest version of HemeshGui and/or HemeshGuiLight from here. On the the download page you will also find detailed installation instructions to get everything up and running. Try it!
HemeshGui renders by Amnon Owed (Flickr)
Posted on: 22/12/2010
Posted in: Processing