Tetrahedral meshes in Unity

I know there is an existing post about this, but it’s too old and the discourse recommended me to create a new topic.

I’m using another software apart from TetWild, a plugin from Matthias Müller ([link] that allows me to make the tetrahedral models. Now, I was trying to use Gmsh to convert the model to .vtk, but when importing the .vtk mesh to Unity, there is an error in the ScriptedImporter (GeometryImporter.cs).

NullReferenceException: Object reference not set to an instance of an object

So, pointset is null. It is created here:

Imstk.PointSet pointSet = Imstk.MeshIO.read(filePath);

If you have any fix for this, it will be very good news, because TetWild is hard to compile and the Müller plugin is very simple.

Thank you so much, again, and again!

Edit: I managed to build fTetWild (I have tried 6 or 6 times, but today was the day :slight_smile: ). I’m going to try it, I will update you. But blender plugin is still a very good option, let’s see if we can do it.

I don’t think we can support another file format at the moment, this would have to be debugged at the imstk c++ level with the file that is not working. But with the amount of different formats out there the bug might either be in gmsh or in the python or there is information that is missing that is needed to create a vtk file that imstk can import. Loading the file into Paraview might show what is missing.

It might be easier to look at the .msh import in C++ and add support for the muller format directly

Yes, I think I will work on it in the future. Muller is one of the people I have kept track of because of PBD and deformable bodies in general. I think this will be a good work for the future, give me time :slight_smile: