I’m trying to use a set of 2D pixels (generated in an FBO) to build a 3D heightmap mesh/model, but am having trouble figuring out how to do it correctly. I’m a bit confused about what the current “right” way to to generate meshes is, and am struggling a bit to find guides and resources online.

I have found resources about using ofMesh, and have seen a couple people talk about using ofVBO, and even a few people talking about ofVBOMesh (which I’m really not sure how to use). There is also a quite old forum post hinting at using things such as ofTessellator or addons like ofxVCG or point-cloud processors, but I haven’t found any information about how these can be used.

The openFrameworks website has a guide on using ofMesh to generate meshes from images using ofMesh, but this method doesn’t produce fully-connected and enclosed models like what I’m looking to do. I’ve attached an image of a sample FBO image that I’m generating, along with a visual representation of what I’m trying to achieve from that FBO image (just found on Google).

From what I learned so far, it seems pretty easy to generate and add the vertices I want to an ofMesh object, but actually connecting these vertices to form a coherent mesh/model is confusing me a bit. So, I feel like what I’m trying to do is learn how to connect these vertices together correctly using indices, rather than just toss all the points into an add-on and hope for the best.

Any tips, guides, resources or advice on doing this would be greatly appreciated!