SDF Mesh Collision Performance

Using an SDF Mesh collider makes my simulation run like 20x slower than using convex hull. I’ve set the SDF Resolution as low as I can (1 in many cases) without getting Tensor errors.

Any tips on making the SDF Mesh more performant? Should the performance be better if two meshes are not close to each other? Or should the performance be constant regardless of proximity-to-collision?

Thanks!

1 Like

Hi, do you have an usd file such that we can reproduce the performance problem?
About the SDF performance: The SDF grid resolution is usually not the performance limiting factor, it mainly affects the memory consumption of the SDF. For performance, the number of triangles in the mesh is relevant. I cannot say how complex the mesh is. It is possible to have the rigid body API on an XForm which has two meshes as child nodes: One for rendering with as many triangles as you like and one for collision with the collider api. The one for collision can be hidden such that it won’t get rendered. For the collision mesh you can reduce the number of triangles in an external tool such that it matches the shape of the original mesh still very closely but contains a lot less triangles. Convexes will always be faster since the usually only have a maximum of 64 faces. A triangle mesh can have millions of triangles and each of them needs to get tested (the process is accelerated but still much more expensive than for a simple convex).

  1. I’m not going to upload the USD because it’s 226 megabytes. Presumably that means it’s too many triangles. I imported it using the OnShape importer. So what tool should I use to decrease the number of triangles?

  2. If I have separate collision and visualization meshes in Isaac Sim, how does Isaac Sim know which one to use for collision? Does it just assume the hidden one is used for that?

  3. Is there a way to see (GUI or API) how many vertices are in a mesh? Cause I looked at the STL files that OnShape generated when making the URDF file, and the STLs are small. But somehow the imported USD is monstrous.

Thanks!

  1. You can use a free mesh processing tool like Meshlab that offers simplification features like edge collapse
  2. If you have an Xform with the rigid body api and two child meshes, only one of the child meshes will have a collider api and that’s the one that will be used for collisions. The xform should not have a collider api.
  3. I guess you can query the number of vertices through the Python scripting API. But since mesh simplification needs to be performend, I would suggest to check the number of vertices in the meshing tool, e. g. Meshlab.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.