Effect of PBDTissueCut example

Hi, I replaced the original model with my own liver.msh model in the PBDTissueCut example. I gave the model texture in the code.

But the texture is missing in the effect. Besides, I want to ask whether other cutting methods have been implemented besides the method of deleting the mesh grid, because the cutting effect of the way the mesh is removed is jagged, it does not look like very realistic.

To answer your second question first, the cell removal is the only way we are supporting for tetrahedral mesh modifications, the PbdObjectCutting component only works on surface meshes.

Wrt to the textures, the example only visualizes the surface of the tetrahedron which doesn’t have any texture coordinates assigned to it, it also only uses surface normals so that is the reason why the visuals look blocky.

This was only added recently and probably has not been fully tested yet but to add a textured mesh you would have to:

  • Create a surface mesh from the tetrahedral mesh
  • Generate UV coordinates and vertex normals for the surface mesh
  • Add the surface mesh as a visual model, adding a pointwise map between the tetrahedral model and the surface mesh
  • In the constructor for PbdObjectCellRemoval add VisualReuseVertices or VisualSeparateVertices

After this imstk will update the visual mesh whenever there is a modification to the tetrahedral mesh. BUT as you remove tetrahedra from the surface any points created on the visual representation would not have correct uv coordinates as they are inside the structure you’d still have to figure out how to assign those

Hi, thanks for all these suggestions above and I will try to work on these suggested steps. Thanks a lot!