Mesh Library for Processing 3

Hi Guys,

I am new to Processing. I think :slight_smile: Haven’t used it for a while. What is the good and fast mesh manipulation library nowadays? Which is steel in active development.

I remember ToxicLib was amazing, but it haven’t been updated for ages.

Basically I need a mesh Lib with some basic physics simulation potentially. Say for creating origami shapes and flat panels.

Thank you


Anyone who does 3D in Processing. Will appreciate any information.
Thank you


Did you check the 3D libraries listed on the Processing website ? :


Hi @artpen

If your meshes are complex and you need to do a lot of specific operations (split face, get vertices in sorted order, get neighbors in CCW-order, smooth, …), I would suggest HE_Mesh but the library doesn’t come with a physics engine.

For simpler operations, Toxiclibs still does a great job (although it is a bit slower than hemesh) and you get a simple physics engine.


Agree about HE_Mesh – for interchange I also recently stumbled on an old mesh translation library, although I haven’t tried it.


Hi @solub thank you. I looked at wblut last night.
It looks like what I need. I can probably find separate physics lib ?
Still experimenting…

1 Like

It really depends on your goal.

For a moving mesh (growing/folding/bending/…) I personally found Toxiclibs to be the easiest library to work with. It seems to me HE_Mesh is not really meant to deal with non-static meshes. Depending on the context you might have to rebuild the whole mesh at each iteration instead of updating a specific set of faces. I would advise asking @wblut on GitHub for a better and more detailed answer.

You could indeed import a separate physics library and apply the desired behaviors/forces to your he_mesh but the conversion between the 2 formats can be costly (ex: convert all the WB_Vertex of a mesh to Vec3D for force computation, then convert back to WB_Vertex for rendering). So, for simple forces like springs, attraction, planarity… you may be better off writing your own functions.

To sum-up: I would suggest Toxiclibs for origami-like folding meshes, and Hemesh for complex static meshes.

Hope that makes sense.


Thank you @solub. Good advice. I have tried He-Mesh it looks like you right it is not dynamic. But I will check on GitHub.
I have done some basic stuff using Toxiclibs, will try again.

1 Like

This thread is so nice! @artpen, would you consider posting some examples to get people even more excited about meshes?

1 Like

You might also be interested in bRigid, which uses JBullet. You can download an direct-install it in your libraries folder in order to access the examples.

There is also a Menger Sponge example from PixelFlow that uses bRigid for its physics.


WOW @jeremydouglass :smiley: :smiley: :smiley:

1 Like

I tried those examples but there is a lib missing…

The package “javax.vecmath” does not exist. You might be missing a library.

I’ll try to find it.

1 Like



I already found it, and have placed the jar in the sketchbook/libraries folder within a folder with the same name.
But it still complains that the lib is missing;
(I unzipped the jar, and the requested files do exist).

1 Like

The other two missing libs I found here.
But now I get the error:

Could not run the sketch (Target VM failed to initialize).
Make sure that you haven’t set the maximum available memory too high.

The line 534 face = box.getChild(1); was highlighted
I tried different memory settings without result.

Edit: I commented line 534 until 541, and now it works.
It’s a pity that my PC is so slow, it’s running at 2,5 fps.
But it’s really an incredible lib. I’m going to explore it.

1 Like

I’ve used HE_Mesh, ToxicLibs and plain PShapes all in the same project because each has its strength. It’s not hard to convert meshes from one format to the other. I actually used the first two to generate meshes and then convert them to PShape as they are kept in the GPU.

Even if the mesh itself is static, you can translate, rotate and scale them, you can move the camera, and you can deform them with vertex shaders, which is very fast. That allows you to bend, twist, stretch, glitch and apply all kinds of manipulations to them in real time (the same kind of deformations you have in Blender).

Just my 0.01€ :slight_smile: