Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change size of spheres using Softbody
#3
(16-05-2024, 07:54 AM)spikebor Wrote: Yea can't have scaling in Obi Actor is a very big limitation for this plugin imho.
For example I want to make one Cape ObiCloth only, and scale that cape for different character size, and pin the attachment transforms to the character's shoulders dynamically via script when the game start. That will be great if the Cloth can be scaled.
But currently Actor does not support scale, so that for each cape size we have to make new cape mesh and setup new ObiCloth.

Deformable objects cannot be scaled. This is a mathematical limitation that stems from the fact that scaling is not a rigid transformation: it does not preserve euclidean distance between points, unlike translation and rotation: when you scale an object the distance between points on its surface changes. 

As result, scaling a deformable object would require altering a lot of data about its shape at rest, data that is precomputed during blueprint creation: distances between particles, shape matching matrices, angles - if applying non uniform scale, etc. This is not doable in realtime.

You can however scale the space in which the simulation is performed (since you can't bend space, at least not under everyday circumstances far away from a black hole Guiño ). This is done by scaling the ObiSolver component, note this involves all actors managed by the solver. Here's an example of the RubberDragon scene in ObiSoftbody, I've copied the ObiSolver 3 times and scaled it differently, all 3 share the same setup and blueprint:

[Image: HUlCZ3Z.png]

------

As a side note, this limitation applies not just to deformable bodies but to rigid bodies to some extent too: scaling a rigid object forces Unity to adjust the collider's size internally. Take a SphereCollider for example: you can't apply non-uniform scaling on a SphereCollider, one would expect it to result in an ellipsoid but it doesn't due to the fact that the sphere can only adjust its radius.

Another example with a BoxCollider: if you apply scale *only* you will get good results (as it only involves changing 3 values: width, height and depth of the box). This only works however if scaling is not compounded with rotation, as it gives rise to shear: parent a BoxCollider under a transform, then rotate the box and scale the parent transform: the box won't be able to match the sheared shape.
Reply


Messages In This Thread
RE: Change size of spheres using Softbody - by josemendez - 16-05-2024, 08:57 AM