2

In Unity 4 the cloth component contained a property pressure which allowed modelling inflated objects. However, in Unity 5 this option is gone.

I have tried variations of the parameters of the cloth object, but have not been able to achieve the same result as the one in Unity 4. In Unity 4 it was fairly simple to model a realistic inflated bouncing basketball. I am aware that this could be simplified, but what if I needed to model something that clearly bends on contact, such as a balloon?

Is there a way to model an inflated object in Unity 5?

user3071284
  • 6,955
  • 6
  • 43
  • 57
Igor Ševo
  • 5,459
  • 3
  • 35
  • 80

1 Answers1

2

The official 5.0 Physics Upgrade Guide says that cloth simulations have been improved, but there are some features that aren't available anymore like pressure:

However, some functionality which was available on the old InteractiveCloth is now no longer supported by the new version of PhysX as it is difficult to implement these with good performance. Specifically:

  • you can no longer use cloth to collide with arbitrary world geometry
  • tearing is no longer supported
  • you can no longer apply pressure on cloth
  • you can no longer attach cloth to colliders or have cloth apply forces to rigidbodies in the scene.

So for this question, there appears to be no built-in way to model an inflated object. The Cloth api doc doesn't seem to contain any way to apply forces to individual points, either, so I can't see a way to simulate it manually.

Hopefully some other answer can prove me wrong, but it doesn't look like you can model an inflated object using the physics engine in Unity 5.

31eee384
  • 2,748
  • 2
  • 18
  • 27
  • Unfortunately, that is what I found. Seems the old cloth simulation was more powerful, but impacted performance too much. – Igor Ševo Nov 24 '15 at 10:33
  • since world collision isn't a thing anymore the cloth object is pretty much useless as its been downgraded way too much (despite the gain of performance). tho im not shure if there are any non-official assets/plugins that bring their own more advanced cloth physics simulation? (sorry if this comment is too off-topic or opinion based) – Minzkraut Nov 24 '15 at 12:46
  • @Minzkraut Thanks for the comment--I can see a solution being to generate a spherical mesh and simulate each vertex using a bunch of raycasts and spring forces. It wouldn't have the benefit of whatever optimizations PhysX has in place, but it might be enough for some scenarios. If there's a plugin that does this that would be a good answer. – 31eee384 Nov 24 '15 at 15:17