Animation collision in Omniverse

Hi all.

Do you know how I can add a collision to my animation (considering that I use the vertex cache)? I’m not able to make it work, it just considers the first frame.

I’ve tried various combination of colliding presets and physics and tried to enable/disable the physics flatcache and similar.

Is there a toggle that I’ve not seen?

Hello @eliabntt94. Appreciate you reaching out to us. I contacted the development team to help answer your questions. We should hear back soon!

Hi @eliabntt94. I just replied to this question on a different thread, but, I heard back from the physx developers and am told that collision against deforming vertices isn’t currently possible.

Hi @WendyGram and @makowalski , thanks for getting back to me.

May I ask: maybe it is possible to manually do it between frames. If I manually step the simulation through python the animation has effectively moved. At that point if I create a collision object with the new set of vertices through a python call it would have the updated position. Is it possible an approach like that?

Hi @eliabntt94. I’m sorry for the delayed reply. I will follow up with the physx team on this question and will let you know as soon as I hear back.

Hello again @eliabntt94. I heard back from the physx team and this is their reply:

This will only work in a very limited set of ways. If you either change vertex positions on an existing mesh, or you replace a mesh with a different mesh that represents the current deformed state, we will be able to generate contacts. However, we will not have any velocity information for the mesh, which means that collision response will not be correct.

It may be possible to leverage the soft body API to simulate animated meshes with per-vertex velocity data, but this hasn’t been done yet in omni.physx. One of the physx developers will try to prototype this approach in the near future. Also, collisions with animated meshes is an important use case that the physx team would like to support eventually.

Thanks for the support!
Right, didn’t think about velocity constraint.

What if I add the collision to the skeleton instead? Is that possible?

hi @makowalski and @WendyGram. I’ve just noticed that one could add a “deformable collision” to the meshes. However, when I try to do that, the simulation crashes (segmentation fault). I’ve tried both isaac and create. Can you check? Any hint? That should work if I’m not mistaken

00003_with_cache.usd (39.0 MB)

Hi @eliabntt94. I have forwarded your question to the physx developers. Thanks!

Hi,
I tried to add the deformable collision and its indeed crashing I will create internal Jira ticket to fix this.
However even if that would not crash it would not give you the desired behaviour. The deformable simulation would take over and it would modify the vertices array with the simulation data. It does not know about the animation.
Since there are no bones I am afraid current omni.physx does not really have any information about how the collider should be created and how it should move.
You could add an invisible mesh that would be simulated and animate its position to match the mesh animation you have. Otherwise I dont think we have a solution currently for the problem.
The deformable collider should be in the long term the right solution, but its no where near to work as you need. I will create internal Jira ticket to track this issue and we will try to resolve it for next release, sorry about that.

Hey @AlesBorovicka, no worries :) I’m just trying to help while trying to solve this. I noticed the crash and signaled that.

Thanks for your explanation!

Also, related, it might be worth it to investigate what I’ve described here. In short, apparently, the skinningMethod causes some issues/discrepancies between blender and omniverse. (I’ve already shared the blend file there)