What's the right way to use TetGen? #97
Copy link
Copy link
Closed
Description
Hi~
I'm working on a FEM simulation on PositionBasedDynamics and get trapped by the right way to convert a obj mesh to a tet model.
In the example scene DeformableSolidCollisionScene, I learned that .ele file and .node file are required to get a tetrahedron model, they're produced by the tool TetGen.
But unfortunately, I found that TetGen seems not to support a direct approach to convert a .obj file to .ele and .node TetGen doc, it seems only support .off .ply .stl .mesh. And there is a command tetgen -pqa5000.0 Armadillo_UV_low.off at the last line of the files armadillo_4k.ele and armadillo_4k.node, which hints that a .off is required, but I don't know where can I get the .off file...
So my confusion is that,
- how can I use
TetGencorrectly when working onPositionBasedDynamics?
more specifically,
- what is the
.offfile? - is it simply converted from a
.objfile or whatever else? - what is the most recommended way to do with
TetGenandPositionBasedDynamics?
Best regards~
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
korzen commentedon May 10, 2021
Hi, you can convert obj to ply and/or stl using e.g. free MeshLab.
TetGen has great documention http://wias-berlin.de/software/tetgen/1.5/doc/manual/manual006.html#sec88
Xayah-Hina commentedon May 10, 2021
@korzen Oh yes, I used
MeshLab. my question now is: why don't thevisFileinxxxScene.jsondirectly supportplyoroffformat?and btw, if I want to realize dynamic tetrahedralization and fracture like this -> Adaptive Tetrahedral Meshes for Brittle Fracture Simulation, I wonder if there is any convenient approach for
PositionBasedDynamicsframework?Sorry to bother you for my personal problems~ I'm new to physics based animation, and really appreciate your help! ~(≥▽≤)/~
janbender commentedon May 10, 2021
The simple answer is: because nobody had time to implement this yet ;-)
Xayah-Hina commentedon May 10, 2021
@janbender I see it~ thank you guys for this awesome work~ ଘ(੭ˊᵕˋ)੭
Xayah-Hina commentedon May 22, 2021
@korzen I feel so sad that I still can not convert correctly using TetGen. T.T
in fact, I can successfully convert some simple model like
sphere.plyanddragon_vrip_res4.plyusingtetgen -pq mymodel.plycommand. But when it comes to some complex model likebun_zipper.plyand my branch modelbranch.ply, it can't work properly any more...terminal message:

output files:

my models:
models.zip
I really wonder why ToT... Apologize to bother you but could you please offer me some advice for my confusion? Thanks a lot!
janbender commentedon May 26, 2021
I'm no expert in using TetGen but maybe TetWild can give you better results:
https://github.com/Yixin-Hu/TetWild