While trying to use the soft-body physics simulator nvidia flex, the rabbit hole seems to end with some references and statements about it being integrated into physx5, and subsequently physx5 being available only through Omniverse. However, there doesn’t seem to be any reference to flex in the physics documentation. The deformable body API seems to be defining tets, which to my understanding does not represent the PBD method in flex.
So, where is flex, or is it not being used anymore?
p.s. is there a separate tag or forum for the physics API in Omniverse/Kit?
Hi! So the simple answer is that the code in the PhysX 5 SDK is inspired by Flex but it has been rewritten from scratch, it is neither a simple dependency on old code nor copy pasta. We also no longer use the Flex branding to identify these features, they have become native PhysX particle fluid and finite element simulation features.
Hi @AdamMoravanszky ! Thanks for the insights. I was partly wondering because, while the FEM aspect allowing the direct definition of physical material properties (youngs/poisson) is way better than ‘number of particles’, the simulation seems much slower than what I could achieve with the old Flex repo.
I would be interested in seeing your scene in OV and see details about the perf you are seeing. Maybe you could join our discord server and share it there? Without more information I am not sure what the reason is, but I can imagine 2 things:
OV does add overhead so if you are comparing using FLEX as standalone vs PhysX 5 in OV, its not expected to be the same, even if you are talking about the same simulation feature.
PBD Particles are not the same as FEM! Flex (at least more recent versions) had both FEM and PBD. FEM is a much more expensive and accurate way to simulate deformable bodies. So the perf will be, even independent of OV, be lower with FEM. PhysX 5 will have both features, but particles are not ready yet – in fact both features are still under active development. What you see today is just a very early first version.
Hi @AdamMoravanszky , thanks again for the detailed explanation. You answered it. I was using PBD before (didn’t know flex had FEM), so when I was reading that flex was integrated into physx (and some webinars mentioned that it would be faster and more accurate in physx), I got confused. As you say, its not an appropriate comparison.
I am not sure, but its quite possible the FLEX FEM feature never made it into the version of FLEX on github, so that would explain why you never saw it.