vcglib is the brains behind meshlab
i’m interested in doing some meshlab-style processing (mainly simplification, point cloud alignment, and maybe mesh zippering). has anyone worked with vcglib and OF?
the closest thing i’ve seen to this is some work with cgal discussed elsewhere on the forum:
I did a few experiments with it for simplfying and smoothing meshes, note http://thefactoryfactory.com/vcg-screenshot.png from blender (I had a little trouble getting their meshes displayed in OF but I didn’t try too hard tbh). It’s really well put together, but iirc really namespace/shared_ptr heavy so it’d need some wrapping to be OF-ish. I’m about to go on spring break so I’d be happy to collab a little. What I had as a start to ofxVCG isn’t particularly useful, I think, I’ll dig it up and take a look.
This is really great! Thanks for sharing the addon, I’ve gone ahead and added it to github, it’d be fun to push this along a little in the next week or so: https://github.com/joshuajnoble/ofxVCGLib
wow, this is awesome to see a basic ball pivot remeshing implementation in action w OF. now i can see what are the important calls and what needs to be wrapped. thanks so much akira for posting it and josh for starting the repo…
i think the coolest thing would be something that’s tied to the (developing) ofMesh class. imagine being able to have an ofMesh, and pass it to an ofxVcgLib helper that processes it and spits back a modified ofMesh…
Agreed. I’m still trying to get my head around the new node/mesh stuff, but I’d see that as an excellent place to wrap, once it’s a little more ready to go. I’ve got 14 hours of flying tomorrow with nothing to do, so I’ll see what I can get started.
btw, ofMesh is mostly done, the api is not going to change for 007 unless you find something wrong or missing testing it with this ; )
I’m working away on the VCG lib fun, so far I’m imagining the things ofxVCGLib should handle are:
intersecting meshes (i.e do they overlap)
ray intersection for a mesh
finding adjacent point for a face on a mesh
finding adjacent faces for a face on a mesh
pivoting meshes (pretty much following akira on this one)
creating a mesh from a pointcloud
all these are pretty easy in VCG. Anything else that this should handle? As a quick update, it’s a bit slow getting everything into shape. I’ll be pushing to git what i have so far tomorrow or mon, so we’ll see how things look then.
I do have a 2D shape and I want to mesh it with three node triangles.Can I use vcglib to mesh my shape without passing it vertexes and just by defining the edge of my shape?
do you any sample of meshing a 2D shape? I have read http://vcg.sourceforge.net/index.php/Main-Page but it was not useful at all.
I do really appreciate your help.
If they’re polylines, I think it’s probably easier to just tessellate them into an ofMesh. I stopped developing ofxVCG after I ran into some super weird problems with GCC4.2 (i.e. what XCode 3 used). Now that I’ve upgraded to XCode 4 I might start it back up.
I have no idea what are you talking about :)…but I have a shape like what I attach that have a cavern in it and I want to mesh it with linear triangles and get the coordinate of each node and each element after the meshing is done so i can send the coordinates to my FEM code for solving it
Ok, now I’m not understanding You have a shape defined in code or is that a loaded JPG? If it’s in code, then you can just do this:
// put all the points into the line: line.addVertex();
// now tessellate all the points in the line to a 3d mesh
t.tessellateToMesh(line, OF_POLY_WINDING_ODD, mesh);
then you’ll have your polylines in a mesh that you can analyze as a 3d shape. Does that help?
I actually define my shape by giving the 2 dimensions of the rectangular and define my cavern as a polygon and give its vertex to my code…and I need my shape to be meshed by triangular element and get the nodes coordinates and numbers of each element after the meshing is done…I attached a sample but it has done with ansys and quad nodes…I need such meshing but with triangular meshing in visual studio…
It’s a bit of a tangent, but seeing that you use Ansys, maybe you have access to Gambit? that one can be heavily scripted for automated meshing.
I think it is better to define my question again :)…but I have a shape like what I attach that have a cavern in it and I want to mesh it with linear triangles
I actually define my shape by giving the 2 dimensions of the rectangular and define my cavern as a polygon and give its vertex to my code…and I need my shape to be meshed by triangular element and get the nodes coordinates and numbers of each element after the meshing is done…I can not use any software like ansys or what you said cause I can not call them in visual studio for each run and I do need a library that do the triangle meshing and get the coordinate of each node and each element after the meshing is done so i can send the node coordinates of each element to my FEM code for solving it
do you have any idea which library can do something like what I want that works with visual studio in C++ code?
I just found vcglib but i have no idea how it works or if it does such meshing or not?
Do you mean Delaunay Triangulation? http://en.wikipedia.org/wiki/Delaunay-triangulation
vcg is for making 3D meshes, like this: http://www.ceremade.dauphine.fr/~peyre/images/test-remeshing.jpg
It doesn’t sound like that’s what you want.
yep. I do exactly need a library that do Delaunay Triangulation… I did not know that vcglib just do 3D meshes…do you know any library that do 2D Delaunay Triangulation and then give me nodesh and coordinates for each elements which works with visual studio in C++ code for such shape?
You should look at ofxDelaunay: https://code.google.com/p/julapy/source/browse/trunk/openframeworks/ofxDelaunay/
Just for the record, and I’m just saying this because you say “visual studio in C++ code”, just to make sure you know: that addon is only going to work w/in oF, not outside of it. You could use it outside of oF but that would require quite a bit of reworking.
Did you make any progress on ofxVCG? It looks like you nuked your repo on Github (I’m getting 404 here: https://github.com/joshuajnoble/ofxVCGLib). James mentioned you’d hit some problems. What happened?
I could really use something like this and was thinking of taking a whack at it myself. What stopped you up? Is your code online anywhere?
I deleted it because there were some weird errors with GCC that the authors of the library basically said they weren’t interested in fixing. I wasn’t ever going to be able to get it to do what I wanted it to do and roxlu was working on a GTS based addon that we thought was better. https://github.com/roxlu/ofxGeometry I contributed some to my fork of it, but ran out of time for it later on.