Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Initialize a softbody on scaled objects via script
#3
(23-08-2019, 09:57 AM)josemendez Wrote: Bone scaling is not supported. Well, it is, but won't act as you expect it to.

Suppose you scale a bone to double its size (scale <2,2,2>). Scaling a bone acts upon the mesh vertex positions after skinning is done each frame. However, the shared mesh (used to generate the topology, and the cloth asset) is not affected in any way by this. So skin constraints are constraining the cloth to the scaled/skinned mesh vertex positions, but all other constraints (distance, bend, etc) still work with the unscaled mesh. The end result would overstretch all constraints to double its rest length.

For this to work you'd have to bake bone scale onto the shared mesh vertices, freeze bone scale to 1 (so that the "doubled size" becomes its natural size), then generate the topology, and reinitialize the cloth. This is quite complex but could be done. The first two steps don't have anything to do with Obi. Generating a topology and reinitializing at runtime can be done. See the included "RuntimeCloth" sample scene and its associated scripts.

Thank you for your reply, but I couldn't find a scene named "RuntimeCloth".

Are we still talking about Obi Softbody Huh
Reply


Messages In This Thread
RE: Initialize a softbody on scaled objects via script - by aznaf - 23-08-2019, 10:16 AM