creating a deformable body issue on IMSTK UNITY

So as per another topic in this discourse , I’m supposed to tetrahedrize the mesh using tetwild then export it to vtk using gmsh
Although I couldn’t use tetwild, I used gmsh instead to tetrahedrize and exported it as vtk,
Now I just need to import that vtk into unity as an imstk mesh. how do I do that?
unity takes that vtk file but doesn’t read it as an imstk mesh , what is missing in my steps?

Hi Mariam,

You put the .vtk file into the Models folder, then add a GeometryFilter to your object. In the GeometryFilter choose TetrahedralMesh for the Geom Type and select the mesh with iMSTK logo for the iMSTKmesh.

Hope it helps.

Yes it worked thank you
, but when i click play it took more than 30 mins to run and eventually it didn’t run , not sure if its because of the high poly count or some other issue im missing

hi Mariam,
can you please help in how you tetrahedrize a mesh in gmsh?

Best regerds,
Siokos Ioannis

i find this usefull toturial.

This is the exact same steps i followed

Did this cause any issues with you when exporting it as vtk and putting it in imstk unity?

i have not given this a shot, but the issue i have faced before is that if you using blender. The blender and unity have different oriententation (so edit the export setings to be compatible with unity). also try to apply Ctrl + A → location, rotation and scale.

Maybe so because gmsh require stl format so I use blender to convert to stl then apply tetrahedra on it then export it as vtk , maybe the initial step went wrong?

the blender by default changes the oriatentation when exporting in stl fomrat.

actually this might have helped a little but the original problem turned out that the game object inside the parent (the heart inside the heartmodel) had different orientation or different dimensions , now that it started working I’m facing another problem which seems like explosion


have u approached this problem before? regardless that its being computationally expensive due to high poly